Removing kits, in Sid

I am not exactly sure why I write this... but there might be two main reasons - I wasted enormous amount of time (80% of this googling crap) and need to get at least some kind of visible outcome. And secondly - it might be of help to someone as of 'how not to get results'.

The idea was to see if I can get rid of *kits in my Debian Sid. And possibly of PAM too. This last one I left aside pretty fast - too many unavoidable deps.
What consolekit and policykit do and why they are also shitty and unneeded part in single-user desktop, that can everyone google themselves.

In my Debian Sid I got such deps for kits: they and their libraries, and Lightdm. That was all, and life seemed rosy.

1. I removed lightdm and replaced it with slim (has optional consolekit dependency) from Debian repo.
As a by-thought - Slims' login-screen looks, frankly, like shit... But slim is real light-weight and easy to configure: /etc/slim.conf and themes reside in /usr/share/slim/themes. Graphical part of themes are quite extensive - and not so trivial to change. If pointed to correct folder, slim lists all your sessions automatically.
But never mind that - of course the debian slim had been compiled with consolekit support.

2. Recompiling slim with -DUSE_CONSOLEKIT=no. My installation needed additionally libpam0g-dev for that.
After playing around with original source - I even got it 'made' (after endless tries and some conf and parameter changes) - I decided for making proper debian package.
So I played several evenings with pbuilder and cowbuilder (there are tons of material to read, some heavy packages to install and not very simple conf to conf). I managed to create quite an impressive mess - and finally went for simpler way and used dpkg-buildpackage.
In very concise way, whole thing was like that:
apt-get source slim   # downloads source packages to current folder and unpacks tars in correct way.
-DUSE_CONSOLEKIT=no  - change it in /slim-unpacked-source/debian/rules
change conf in /debian/patches/slim-conf.patch to reflect your situation (less to do afterwards)
dpkg-buildpackage -rfakeroot -uc -b  # in source folder
and there should be new slim.x.x.deb in sources root.

3. Removing vanilla slim and *kits.
Went to console, killed slim and X, then removed slim, policykit, consolekit and deps. Installed:
dpkg -i
X did not start and dbus did not start (despite I had the second one in .xinitrc).
Manual dbus-launch worked but then X claimed to have a segmentation fault. Bugger!
I reinstalled consolekit - and X started without any problems... Double bugger!
To cut it short, after trying several things - to (unsuccessfully) root out consolekits' leftovers, I threw a towel.
Shame-facedly, I reinstalled both kits. That's that - a defeat.

At the same time - there are cases of successful removals. So, it can be done. I suspect that without display manager (but I wanted to keep it), linux-with-no-kits is possible.


Jeff said...

I've managed to get this working, so a few tips :-

Make sure you do apt-get build-dep slim so that you're absolutely sure you have the required dependencies. You can remove the libck-connector* stuff later (you can also tag '-s > build-dep.txt' on the end to record all of what gets added if you want to clean up afterwards).

Try altering app.cpp and slim.service according to the patch from (see for more info).

In addition to your change in debian/rules, in debian/control remove libck-connector-dev from Build-Depends and consolekit from Depends.

After you've made your changes run:-
debchange --nmu
dpkg-source --commit

I installed the deb from a terminal within X and then rebooted. I removed consolekit first, rebooted, then policykit, rebooted and then anything else deborphan flagged up plus the two libck-connector* packages. (The reboots are for safety and an apt-get purge foobar -s will help flag up if anything else depends on what you're removing).

Player with Linux said...

Thanks for tip - marvelously precise as it is.
Would have appreciated it even more some time ago :) ... but as it is - I moved on, and my Sid/Slim got formatted some time ago.
In Slackware (gdm2) I tolerate *kits (at least currently), and in Crux I don't have pam, *kits and display manager installed anyway.
But thanks for non-nonsense advice again.