Hanabi Factory

Navi's Personal Blog


Arch, Debian, Suckless and wrapping up the Linux experience

tony

If you want to read the spanish version visit the following link

After spending some time tinkering with a second-hand ThinkPad T480 that I ended up buying in a remote corner of the city where I live, I’ve been trying out different Linux distributions and desktop environments, but overall I’ll focus on two distributions that in my opinion are the most important: Debian and Arch. In addition to this, I wanted to try out a new Tiling Window Manager that had also caught my attention, as well as a set of software that embodies an interesting philosophy: Suckless.

Some experiences with Arch and Debian

To start with the distributions, Debian is incredibly simple to get started with, the installation is approachable, and I must admit that I like that it is (or pretends to be) 100% free software. Furthermore, once you go through the installation process, the desktop you choose just works, no surprises, it’s rock solid, and of course, you don’t expect much on the horizon regarding updates. In fact, every time I did an apt update, everything was simply up to date. So it’s a rather boring distribution if you want to be constantly surprised with new things, but for me, this is quite positive, as it maintains certainty in the system, you know it won’t fail unless you do something stupid. Regarding the software you install, obviously this is where you notice the gap, since Debian is quite conservative when it comes to bringing software into its main repository and therefore it’s not uncommon to have software versions that may be 10 or 12 months behind the current development version. This may not be a big problem, but each software has a different development speed, and in a year you can have significant differences. Also, if you’ve been carrying more updated versions of programs that have some kind of config file, that can be a problem. An example where I noticed this was when I wanted to install Alacritty and port my .toml file with my configurations, when using it, I realized that the changes weren’t applied. The reason was that the version of Alacritty that comes from Debian’s apt was an old version that used .yml files, so I had to 1) adapt my configuration files to this version, which for this case wasn’t complicated, or 2) compile from source.

Compiling from source isn’t a bad approach, however, it means that you’re at the mercy of your package manager taking care of future updates, and obviously that can represent a risk. An important issue with a system like Linux is that you have your software updated and operating harmoniously with your operating system. Of course, there’s nothing wrong with compiling from source, I’ve done it with some software, but it’s important to note that it’s not the most desirable. However, a positive aspect to recognize is that Debian has a vast repository, which reduces the chances of having to resort to installing from source code.

On the other hand, I’m now using Arch (btw) so I’m still in a process of experimentation with this variant. Arch is different in its installation process, although now there’s a script that simplifies the process, the manual installation is in the terminal by typing commands and where you have to follow the instructions from the wiki, it’s not that difficult, but obviously it’s more likely that you can make a mistake along the way and therefore mess up, in fact, I messed up a couple of times because I didn’t configure the Nvidia driver properly and therefore my system failed, so I had to start the process again.

If you want up-to-date software, this is the distribution and even if you want to access proprietary software, Arch has no problems, it’s a distribution agnostic and therefore has a laissez-faire mentality towards users, I can run the analog of apt update which in this case is Pacman -Syu every day and there may be new updates. Obviously with software like Alacritty or Neovim I didn’t have to resort to compiling it from source because Arch itself provides recent updates which is also a pleasure not to have to directly intervene with the code, another thing is that in addition to the base repository, Arch has the AUR which is another repository where the community can upload software and of course that allows your possibilities to expand, however in my experience, it’s in the AUR where you have more chances of software failure.

Here are some other examples of software that allowed me to compare distributions. As I like to watch anime, I wanted to install ani-cli which is an application to watch content from the terminal (you have to thank that the hacker community is quite otaku), unfortunately, this software in Debian is not considered in its main repository yet and will apparently be added in version 13, so one option was to compile it, but I finally gave up on it. On the other hand, with Arch there was no problem, the repo was in AUR so the installation was quite simple. The second case was Anki, a flashcard application, which I like and have used a lot to learn languages so I thought about installing it on my pc as well (although the Android app is quite good to be honest), unfortunately Anki is a mess, I went to the documentation and tried to install it following the instructions but had problems in the process, fortunately Debian has Anki in its main repository, so installing it with apt was the best option, on the other hand Arch had it in the AUR, however, I had problems with the installation so I didn’t continue with it. The third and last case was Librewolf, in this case Debian had no problems, by following the steps in the documentation the issue worked without problems, Arch had it in the AUR, and the installation process took quite some time and finally I had problems with that but the binary worked fine.

As a side note, I must praise the Arch Linux Wiki, you may or may not like Arch, but I think no one can deny that its documentation is of a high level, it helped me to see a specific case where I wanted to see how to install the Japanese keyboard on it with the kanas specific to the writing of this language, I checked the documentation in Debian and Arch, finally the latter gave me clear instructions on how to configure it correctly, besides that on other occasions when I’ve had problems with something in Debian/Ubuntu/Fedora or even Arch itself the Wiki has been helpful.

Finally, I want to highlight that both have the possibility of minimal installations, so if you have a laptop with hardware restrictions, I think there’s no problem with any of these variants for you to do a minimal installation and instead of using a bloated desktop environment, you can use a window manager that will be much lighter and more efficient in resources like Sway, i3, or dwm. Although I wrote about Sway in another post, now I want to focus on dwm and another set of software that belongs to suckless.

Suckless: Software that suckless

Suckless is a community of hackers who have built a set of software based on the concepts of minimalism, simplicity, and frugality, part of this decision you can read in their philosophy, but to try to get to the point, all the code is written in C, and there are no configuration files, if you want to install this, you download the code and compile it, if you want to make modifications to something, you go straight to the C source code and modify it and recompile it. The most important software (in my opinion) are:

  1. st a terminal emulator
  2. dwm the window manager
  3. dmenu the dynamic menu that you can use to run your programs

Something you have to notice is that this software has minimal features, for example, St doesn’t have a way to scroll, nor does it have a way to make your terminal transparent, if you want to achieve this, you have two options: the first is to write the code yourself, but if you’re like me and have no idea about C then accessing the patches that the community has created and improved over time is the option, so for example, to the terminal I can add transparency with alpha and a gruvbox color scheme. To dwm I can add patches to add gaps with useless gaps. all this just with the command

patch -p1 < path/to/patch

It should be noted that starting to add patches can lead to errors, so you will have to be the one to make the corresponding adjustments for the failures, and in some cases if you have several patches in mind, you have to consider that there is a more appropriate order to do it to reduce the potential number of errors. Obviously the idea is not that you go and take a collection of patches that you “like” and apply them, but that you be much more austere and select them according to a real need that arises, for example, I only applied useless gaps to dwm for a bit of aesthetics, but the truth is that dwm by itself has been fantastic, I haven’t had the intention of adding another patch for now, I haven’t needed to add scrolling to st, since I use tmux quite a bit, which serves that function as a substitute. So if you like to add things to your application just because, it’s possible but you’ll have to deal with debugging the errors that occur while adding the patches.

Other software that I have been adding and that follows a similar philosophy:

  1. nsxiv: To display images
  2. scrot: screenshots
  3. feh: set an image as background
  4. cmus: music player
  5. ly: minimal session manager.
  6. mpv: Media player
  7. slock: lock your system with a password.
  8. xclip: X11 clipboard

Among others…

Obviously I have to point out that these exercises for a machine that isn’t really that old and has relatively decent hardware maybe is considered exaggereted, as an exercise it was worth it and it taught me a lot about minimal installations and how you can reach customization levels while keeping resource usage to a minimum and in fact I will continue using this configuration until I get bored, but if you’re not interested in that Gnome or KDE run quite well on a machine like this.

Conclusions at the end

Regarding Arch and Debian I don’t have a clear preference yet, both have their pros and cons, for now I’ll continue using Arch to continue evaluating how it goes. Although there are other distributions, even some more hardcore ones like Gentoo, for now my curiosity hasn’t reached that point yet.

Suckless software is an interesting perspective, quite radical to market trends and for a niche taste, I can’t imagine many people wanting to get into this point, but for those who do, I’m sure it’s a good exercise to use something like dwm, inspect the C code, customize, add patches, etc. If you can do that, the idea of making your own software for a specific personal need may not be so far-fetched.

I’ve also had a lot of fun with Linux over the past 4 months, it has taught me a lot about how an operating system works especially when I’ve wanted to go to slightly deeper levels and start eliminating the use of interfaces, I’m not going to call myself a “power user”, but certainly t here’s some knowledge that I value and I understand a bit more about those people who want to know more about their system and adjust it to their liking and have absolute control over it. If there’s anyone interested in knowing what my “learning path” was, which by the way was not planned at all it was just pure curiosity, I would describe it as follows:

  1. Install free and open source software on your own machine, even if you’re on MacOS or Windows. Install and familiarize yourself with their basic uses and if you can include it in something you do daily even better. For example, Vim, Python, R, LibreOffice, etc.

  2. Learn basic commands in a terminal: commands like cd, mv, rm, cp, ls. I use them constantly nowadays and I would recommend reading a bit about them and doing some tests to remove the fear of the black screen, then you can add new commands like curl, grep, sed, etc.

  3. Install Ubuntu or another friendly distribution: I used Ubuntu at the time, there are people who criticize it currently for various reasons. But something that Ubuntu has is that its installation process was super friendly, a modern look, there’s plenty of documentation on the internet and it works well. Linux Mint seems like another good alternative to Ubuntu, but I don’t have experience with that distribution. This is for a start, later if you want to move to another distribution nothing will prevent you from doing it

  4. Get familiar with the package manager: The first way to install software is from the terminal using your package manager, if you’re on Ubuntu or Mint you’ll have to use something like sudo apt update and then sudo apt install yoursoftware, there are other alternatives to install software but this should be your priority method.

  5. Install software by compiling source code: Take a software that interests you, go to its documentation or the repository where it is and read about its installation process, probably besides the package manager it will have a space where it will give instructions on how to do it, follow those instructions.

  6. Use a Tiling Window Manager: There are two major desktop environments in Linux GNOME and KDE, both have a lot of features and you can easily navigate in them, adjust brightness, connect to wifi, explore your folders with files, screenshots, etc. With a twm you won’t have any of that, and you’ll have to look up how to execute each of these commands, you need to connect your mouse via bluetooth, one possible solution is to install bluez and bluez utils, open the terminal and use the bluetoothctl command, there are also GUI options, but it will depend on you to find a way to execute it. Play with this and if you want try to do a ricing (configure your environment to look aesthetically attractive).

  7. Create a remote server and run some programs on them: If you have an old laptop, or a raspberry pi, or rent a vps, you can try to create a remote server where you can host some programs, this is the path to another world that is self-hosting, I’m quite a newbie in this, but there are a couple of experiences that can teach you something, for example create a personal website and host it on your server, buy your domain and redirect it to your website. One thing I did for example was to get rid of Kindle and host my books in Calibre, so now I can access my personal library from my own server. With this you can learn a bit about connecting via ssh, nginx, dns, docker, etc. There are people who host a bunch of applications from a youtube frontend, emails, vpn, etc. There you can see for yourself what to do.

  8. Install Arch Linux manually: If you installed Ubuntu before, you’ll notice that the process is quite simple in general, installing Arch is more complex, but it will teach you how to make an operating system from scratch, so you can understand what some of the base libraries are for, make the partitions manually, configure network, timezone, keyboard, decide between X11 or Wayland, etc. Try to use it for a period of time as your main machine and use it for everything you can.

  9. Contribute to Linux: I plead guilty of not doing it yet, I suppose this is a note for the future…

Anyway, it’s been an interesting journey and I think I’ll continue using Linux for my personal machines. I’ll probably continue to see some self-hosting things, but I think I’ve had enough with ricing and trying distributions, it’s time to move on to another topic.

Articles from blogs I follow around the net

Alpha Capture and Acquired

People are never short of a trade idea. There is a whole industry of researchers, salespeople and amateurs coming up with trading ideas and making big calls on what stock will go up, what country will cut interest rates and what the price of gold will do …

via Dean Markwick September 19, 2024

Is Basketball a Random Walk?

About two years ago, I attended a seminar given by Dr. Sid Redner of the Santa Fe Institute titled, “Is Basketball Scoring a Random Walk?” I was certainly skeptical that such an exciting game shared similarities with coin flipping, but, nevertheless, Dr. …

via HasItHalted August 17, 2024

Consciousness and Materialism

Hume’s Parallel David Hume has often been quoted for his “Is” vs. “Ought” distinction. The argument is that fact and morality are two different domains, and from no accumulation of statements of fact alone can we ever jump to a statement of morality. We can …

via Luke Smith's Webpage on Luke's Webpage January 16, 2023

Generated by openring