Utilities

Suckless Tools

Many software packages for Linux have been adding features for decades now. The question becomes; How much of these features are helping you and how much is just cluttering up your disc and memory resources? Our heroes over at suckless.org have taken to solve this problem by removing all features in the standard code. Love features? Any features are available as patches, so you can decide how many and which features you want. With this system, you stay in control of what features you need, or want. The price is that you need to put some effort in to compile your code on your own. Most suckless tools are actually available in most distributions as binaries. However, this defeats the purpose since you will have a very limited set of features. It is better to download the source code! You will be compiling the binaries, don’t worry, it is not as hard as many think.

The tools needed

In general, you will need a compiler to create your binaries. The standard GCC will usually work though the maintainers prefer tinycc. This requires some setup, so choose this after you have compiled a few times and figured out how compiling works. When you have chosen your compiler, you need to download the files. The source is available as git repositories so install git and use git clone in your source code directory.

Setting up your system

If you go with gcc, you can easily install with your standard package handler and then run ‘make’ to compile your code. If instead, you choose tinycc you have some more work to do. Fortunately, tinycc can compile itself so download from the git repositories.

$ git clone git://repo.or.cz/tinycc.git

You may compile and install it on your system though you can use the compiler directly from its directory. Once you have this configured, you want to look through the features you may want. This is probably where you need to pay the most attention, choose only features you actually want and implement as few as possible each time. The reason is that all features are patches, get the patches wrong and you are stuck with a lot of digging around source code to find out what should actually be there. The tools you need are ‘patch’ and diff to make sure you can handle the patches and investigate them.

$ apt install patch && apt install diff

Finally, you should be able to compile your favourite tools!

Some interesting projects

Suckless Terminal

st – The simple terminal is designed to just run your commands. It does not come with scrolling by default. In fact, not many features are on at all. To find which features you want, go and look for them on their webpage. When you find one, you need to download it and use patch to get it. You may want to add a feature to create a new terminal with a keyboard shortcut. To do this, download https://st.suckless.org/patches/newterm/st-newterm-0.8.2.diff. With that file at hand you can update the main file. Run patch in the source code directory.

$ patch -p1 < st-newterm-0.8.2.diff

This may cause you some trouble because your starting point is not always correct, read the reject file to correct. With the patch successfully applied you can move on to setting your preferences. This is done in the config.h file. When finished, compile your code. In most packages, you have a single command to do this.

$ make clean install

There is a README file for each package, read it!

DWM

DWM is a replacement for any window managers out there, it has very few features making it small and fast. It runs on X, though some efforts has been made to port it to Wayland. Many tiling window managers are based on this code.

surf

The simplest web browser you never even imagined! You can follow links and open new ones with Ctrl-g, programmers can also embed it in other applications. As a “regular” user, you can add it to Emacs! There are no more features by default. For tabbed browsing, use the ‘tabbed’ package.

sinit

After you fall in love with suckless tools, you can switch the startup and process control to sinit. It does away with most of the unnecessary features. This way to start your machine only handles three signals, making it possible to have a very minimal system.

What will be missing?

When you use the suckless tools, you will be missing some features but try it out before you judge. You may not be missing anything at all.

Conclusion

The suckless tools are a bit extreme for most people. However, most people will not take a chance on major improvements out of fear that all will be lost. Join the brave and try a package at a time until you feel good about it. The next step is to dual-boot into a suckless system to make sure you can still continue with daily tasks.

About the author

Mats Tage Axelsson

Mats Tage Axelsson

I am a freelance writer for Linux magazines. I enjoy finding out what is possible under Linux and how we can all chip in to improve it. I also cover renewable energy and the new way the grid operates. You can find more of my writing on my blog.