Clearing out the Linux Cruft

I don’t know about you, but for me an operating system – at least above the kernel level – should be little more than a file manager and a means of launching and organising applications, sadly most distributions now a days seem to assume you need much more fluff and as a result its not uncommon to see /usr/bin/kitchensink in your process list…

Many daemons are simply sleeping waiting to periodically thrash scan the hard drive, why some tool authors seem to think that having their software loaded all the time hogging resources, instead of a periodic execution from cron job or udev rule is beyond me.

In many instances you’ll probably never notice an mlocate cron job running for example, but for every daemon you have running in the background you have a potential bug and possible exploit available all the time, if something is run seldom, for a brief time, its much less likely to be exploited.

Some people think boot speed is really important – and while a reasonable boot time is nice – lets face it we’re not waiting twenty minutes for a BASIC environment to load off an audio tape, but that said the fewer daemons that are running the less the hard drive has to be thrashed exercised, and the quicker everything starts.

There are a couple of tools that make slimming your system down rather easy, a great deal of cruft can be uninstalled without the need to disable it.  You’re probably quite familiar with the first tool, Synaptic Package Manager.  There is however one little wrinkle.  I have sometimes found synaptic’s quick search facility makes synaptic completely freeze – for a tool of such importance this is intolerable, and while I could probably find out what is causing xapian library to make synaptic stall I found it much quicker just to grab the source for synaptic from launch pad and ensure that   libxapian-dev isn’t installed when you run configure, result no quick search but equally a faster synaptic that doesn’t freeze…

Right detour aside, what makes synaptic so useful is that it will warn you of what other packages will be removed because they rely on the package you’re ripping out,  apt-get will do just the same but for suck it and see scenarios a graphical interface can be a little more comfortable.

For example say you decide that you want to see if the half dozen or so gvfs daemons are really needed… when you try to uninstall it you will notice that it also want to uninstall brasero, now for me I prefer the more tool like K3b over the dumbed down methodology of brasero so it wasn’t a difficult choice…

While in many instances ps ax is just fine – a much better view can be had by running pstree by default it looks something like this…

     │         ├─lightdm─┬─init─┬─dbus-daemon
     │         │         │      ├─dconf-service───2*[{dconf-service}]
     │         │         │      ├─evolution───9*[{evolution}]
     │         │         │      ├─evolution-alarm───4*[{evolution-alarm}]
     │         │         │      ├─evolution-calen───5*[{evolution-calen}]
     │         │         │      ├─evolution-sourc───2*[{evolution-sourc}]
     │         │         │      ├─gconfd-2
     │         │         │      ├─gnome-keyring-d───4*[{gnome-keyring-d}]
     │         │         │      ├─lxsession─┬─alltray
     │         │         │      │           ├─fdpowermon
     │         │         │      │           ├─lxpanel───2*[{lxpanel}]
     │         │         │      │           ├─openbox
     │         │         │      │           ├─pcmanfm───2*[{pcmanfm}]

Its even more useful when you play with the command line switches for which I encourage you to look at the man page

Of course it does rather all depend upon you running a reasonably lightweight desktop environment – I personally favour LXDE it seems to get out of the way nicely and can be configured to my particular tastes.

For me the fact you can completely reconfigure Gnu/Linux is one of the pleasures and advantages of open source software – not only can you find out just what is going on in the background – if for whatever reason you don’t like it, you can change it with only a moderate level of fu (skill) …

Leave a Reply

Your email address will not be published.