Ricing Kali

Sometimes Kali linux (a debian-based linux distribution geared toward penetration testing) is a little too indiscreet. The giant dragon on your laptop might cause fellow coffee shop patrons some concern.

It comes with preconfigured gnome themes. Editing these is a little different to the typical gnome process, especially as major updates can overwrite.

One could install any desktop environment, but this guide is for gnome. For example, changing the log-in user's background (the login screen) and lockscreen must be done by editing and recompiling a gresource file. Rebuilding grub to remove the Kali splash can also be confusing at first.

Maybe you want to hide the fact you're using Kali to someone who might overlook your screen, or just want to make it feel more like home. This guide can help.

0. Personal Desktop Background/Lock Screen

Run settings (gnome-control-center) and navigate to Background. This is straightforward, changing it for the login user (the background/lock screen used before you log in) is harder as we'll see later.

1. Fonts/Themes/Extensions

Run Tweak Tool (gnome-teak-tool). This is pretty intuitive. Appearance and Fonts have most of the basics. You will have to reopen windows or refresh gnome to see all effects.

gnome-font-viewer makes installing fonts painless. I recommend 1001fonts and fontspace. Check out these monospace pixelated fonts with decent character range: basis33 and 7:12 Serif.

Loads of themes are available at gnome-look.org. I'm a fan of Candra, but there are more fun ones like this.

Extensions work somewhat similar to browser extensions thanks to this site. Here are a few I like

  • Pixel Saver - Removes titlebar when maximised, or when mod+left/right'd.
  • Move Clock - Moves to the clock to the right rather than the centre.
  • Removable Drive Menu - A small menu for drives like USB sticks/SD cards, only shows when they're plugged in.
  • Show IP - Shows your network addresses, you can choose which. Public is viewable if you have a link that'll show you your own IP.
  • Straight Top bar - I hate those curves.
  • Remove Dropdown Arrows - Saves space.
  • Gradient Top Bar - Looks nice, especially if you like your terminal emulators transparent.
  • NetSpeed - Displays your network usage. I like this positioning fix at github.
  • ShellShape - Basic window tiling. I use awesomewm on my other computers, so this is nice. With one screen, I prefer mod+left/right for simplicity, though.

2. Login background/lock screen

The data loaded for this is in /usr/share/gnome-shell/gnome-shell-theme.gresource. In order to change things, we need to recreate this file. We will do this first by disassembling it.

#!/bin/bash

#change workdir to whatever you want
mkdir -p /usr/share/gnome-shell/extracted/theme
workdir=/usr/share/gnome-shell/extracted
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource

for r in `gresource list $gst`; do
        gresource extract $gst $r > $workdir${r/#\/org\/gnome\/shell/}
done

Now we have the files in /usr/share/gnome-shell/extracted/theme.

Just overwrite background.png and lock.png. If you are overwriting with .jpgs or other file formats, edit all occourences of the *.png files in gnome-shell-theme.gresource.xml and gnome-shell.css.

Now, we must recompile via

#!/bin/bash

cd /usr/share/gnome-shell/extracted/theme

echo "" > gnome-shell-theme.gresource.xml
echo "" >> gnome-shell-theme.gresource.xml
echo "" >> gnome-shell-theme.gresource.xml


for i in *; do echo " $i"; done >> gnome-shell-theme.gresource.xml

echo "" >> gnome-shell-theme.gresource.xml
echo "" >> gnome-shell-theme.gresource.xml

glib-compile-resources gnome-shell-theme.gresource.xml
mv gnome-shell-theme.gresource /usr/share/gnome-shell/

Now one can restart gnome and check the login/lock screen to test if it worked.

3. Grub background

Simply replace /usr/share/images/desktop-base/desktop-grub.png with your own png file and run update-grub. One could also look in /etc/grub.d and change the path where the background image is located

sudo mv mypic.png /usr/share/images/desktop-base/desktop-grub.png 
sudo update-grub

4. Parting thoughts

So, now you can get rid of the tell-tale Kali dragon from appearing on your monitor at coffee shops, or perhaps disguise it as debian.

At least, that was part of my motivation for editing things. Sadly, that reason shot itself in the foot when I bombarded the back of my laptop with hacker-esque stickers including one saying "powered by Kali." Ah well, at least it feels more like home.

↑ Top  ⌂ Home