Friday, December 20, 2024

GUIX Package Manager

 For those who don't know, GUIX is a package manager for Linux. It is supposed to work across all (or most) Linux distributions and provides some level sand boxing between applications. There is also a distribution based entirely on this software. It is supposed to be an alternative to Flatpak and Snap, both of which have their own problems.

Yesterday I spent the day messing around with it. I installed the distro on my test machine, I also tried it on an clean install of Debian. I have used a lot of package managers over the years, Apt, Yum, Pacman, Portage, and yes, Flatpak and Snap, I have used most all of them at one point or another. Guix is without a doubt the worst package manager I have ever used. I have no idea who thought this package manager implementation was a good idea, but I hope they did not quit their day job to develop this garbage.

First the things I liked; Nothing, I didn't like anything about Guix. It does nothing Flatpak or Snap doesn't do, it brings no new ideas or technology to the table, it is just a terrible implementation of a good idea.

Things I didn't like. Fuck where do I start. The Guix distribution took half a day to install a basic system and I do mean basic, no web browser, no email client, nothing more complex than a text editor. Debian takes 30 minutes for a full install, bells, whistle and all. On top of that once I had it install, it was taking up close to 20 GB of storage, what the hell Guix? A full install of Debian comes in well under 5 GB.

Once I had the basic install, I started installing programs, that was a bloody mistake. Every program took half an hour to install and a boat load of other packages would install with it, often simply reinstalling packages that were already on the system. To make things worse, commonly used programs like Firefox and Thunderbird were not available. I either had to compile from source or use Guix equivalents, Icecat and Icedove. Which apparently are freer and more open sourcey than Firefox and Thunderbird, but lack just about every feature implemented in those two programs in the last 5 years.

After nearly 8 hours of screwing about with the distro and still not having a system I could use as a daily driver, I gave it up. I installed a basic install of Debian and whittled it down to the same state the basic install of Guix gave me, as I said earlier, this took me less than 30 minutes to accomplish. I then installed the Guix package manager on this poor machine. Guix immediately brought all its worst features to Debian. It took over an hour to pull down its repository information and then promptly installed a bunch of packages that already existed on the system, which took an hour. Then I tried to install Icecat, and it repeated the same bullshit it did on its own distro and after half an hour when it was finished, I could not actually run Icecat. It was not on the menu and I could not run it from the command line. At this point, I was done with Guix.

No one should be using Guix. I would recommend Gentoo Linux before I would recommend Guix as a distribution. Debian + Flatpak will give you everything Guix gives you, but you will have more storage left, you will spend far less time managing it and you will not hate your computer and yourself everyday. If you want a challenge, install Arch Linux, install Gentoo, heck to Linux from Scratch, but please for the love of god, do not use Guix, don't encourage them.

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/angel.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