Sunday, December 1, 2024

Minimalist Linux III

If all that was too much work for you, go to my github where you will find all my config files and a nice little install script to do the heavy lifting for you.

 https://github.com/cjstoddard/My-Openbox

This will make your desktop look and function like mine. However if you actually read the blog posts, making minor changes should not be a problem.


You will still need a basic install of Debian 12.

Tiling windows managers still suck.

Minimalist Linux II

Now that we have a functional desktop, it is time to pretty it up a bit and add a bit of functionality. Nobody normal like a stock boring desktop, so I am going to show you some customization tricks.

The first thing most people do is set wall paper. Find an image you like and download it into your home directory and rename it to something simple, I named mine angel.jpg.

mv background.jpg angel.jpg
Next we want to make it available system wide, for later.
sudo mkdir /usr/share/backgrounds
sudo cp angel.jpg /usr/share/backgrounds/
sudo chown root:root /usr/share/backgrounds/angel.jpg
Now place the picture wherever you want it to go. Normally there is a Pictures folder, you can just put it there.
mkdir Pictures
mv angel.jpg Pictures/
Now run these commands;
feh --bg-scale Pictures/angel.jpg
nano ~/.config/openbox/autostart
Add this line to the autostart file;
(sleep 1; ~/.fehbg) &
Now if you exit out of Openbox and go back in, you should have a nice background. Our next step is to change the Openbox theme, the default is Clearlooks. Which is fine, but for whatever reason lots of people like darker themes. Edit the configuration file;
nano ~/.config/openbox/rc.xml
Look for the <theme> section, and replace <name>Clearlooks</name> with <name>Artwiz-boxed</name>. Restart Openbox and you should see a change in how the windows decorations look. If this is not to your taste, there are many themes available in /usr/share/themes. You will have to google the themes to see how they each look.

The biggest issue with this setup so far is when you boot to the system it drops to the command line and you have to run startx to get to you desktop. There is also no way to lock the screen if you need to. We will need a display manager for this, lightdm is the one I like.
sudo apt install lightdm
sudo systemctl enable lightdm
When you reboot the system, you should come to a graphical login screen. We could leave it there, but that would be boring. To change the background open the configuration file;
sudo nano /etc/lightdm/lightdm-gtk-greeter.conf
At the bottom, add the following line;
background=/usr/share/backgrounds/angle.jpg
This will set the background of the login screen. Any picture you want to use, will have to be placed in the /usr/share/backgrounds/, otherwise it will not work properly.

Next we want to add the ability to lock the screen when needed. Run;
nano ~/.config/openbox/rc.xml
search for </keyboard> and add these lines just above that line;
<!-- Keybindings for [l]ock screen -->
  <keybind key="W-l">
    <action name="Execute">
      <command>i3lock -c 000000</command>
    </action>
  </keybind>
Once you restart Openbox, the screen can now be locked by pressing the Winows key + l.

For the final piece of customization, we are going to use a program called conky to add a dynamic element to your desktop. The first thing we need is a default config file.
cp /etc/conky/conky.conf .conkyrc
nano .conkyrc
The first thing I like to do is make conky transparent. I mean why have wallpaper if you are just going to block it out. Right under conky.config = { add this line;
own_window_transparent = true,
Next look for this section;
${color grey}Networking:
Up:$color ${upspeed} ${color grey} - Down:$color ${downspeed}
and change it to look like this;
$hr
${color grey}Networking:
IP Address:$color ${addr enp3s0}
Up:$color ${upspeed enp3s0} ${color grey} - Down:$color ${downspeed enp3s0}
My network device is enp3s0, you will need to run the command "ip addr" to find your network device and replace accordingly. Now go to the bottom of the file and just above the ]], place these lines;
$hr
${exec cat .keys.txt}
$hr
Now save and exit the file. The last lines I had you place are there because I like to have an onscreen reminder of all those dumb keybindings we setup that I can never remember, so run this command;
nano .keys.txt

and put the following text into it, then save and exit.

-------------------------------------
Keybindings
-------------------------------------
ROX-filer     windows-f(ile manager)
Rofi          windows-m(enu)
Firefox-ESR   windows-w(eb)
Tilix         windows-t(erminal)
Thunderbird   windows-e(mail)
Audacious     windows-a(udio)
VLC           windows-v(ideo)

Print Screen  windows-prtscn
Lock Screen   windows-l

Switch Desktops;
  ctrl-alt-right
  ctrl-alt-left
-------------------------------------
Finally, edit the autostart file

nano ~/.config/openbox/autostart
and add this line, then save and exit the file.
(sleep 5 && conky -c .conkyrc) &
Finally, reboot the system and if all went well, things should look much better. With a display manager and conky running, the amount of memory consumed crawled up above 512 MB, but probably not by much. I consider it to be a worth while trade off for the added functionality and general look of the desktop.

As a final note, I know some of you are going to scream that I should have used a tiling WM like Suckless or i3. I do not like tiling WM's, I prefer stacking WM's. Tiling WM's make me work the way the developers think I should be working, fuck that is all I am going to say about it.

Mastodon