HOWTO remove *kit

Share your own howto's etc. Not for support questions!

HOWTO remove *kit

Postby DominiqueM » 2013-09-02 16:01

Policykit and console-kit are not useful in many system. And worst, they can cause all kinds of regressions like making impossible to configure things with sudo, or automounting that stop to work with light desktops, and so on. In fact, such programs are only needed by paranoid companies that doesn't trust their working forces.

We will explore how to remove these programs. I started with a fresh install. To make things worst, I choosed to install kde. As it was not possible to install fvwm-crystal, I updated to Sid. After the installation of FVWM-Crystal, the first modification I made was to auto-login my user and to auto start X without the need of a display manager like kdm.

For that, I just removed all the symlinks to kdm in /etc/rc*.d. And I changed the following in /etc/inittab:
1:2345:respawn:/sbin/getty 38400 tty1

Code: Select all
1:2345:respawn:/bin/login -f dom tty1 </dev/tty1 >/dev/tty1 2>&1

Replace "dom" by your user login name.

In your home directory, create or edit ~/.bash_profile:
Code: Select all
source .bashrc
pidof X >/dev/null || startx

We also have to tell startx which WM/desktop to start. in ~/.xinitrc:
Code: Select all

Code: Select all
/usr/bin/fvwm-crystal 2> .errors_fvwm-crystal

if we want to redirect stderr to a file.

This is only useful if you want to autostart X at boot time. An alternative, the Debian way, is to install nodm;
Code: Select all
sudo apt-get install nodm

At that point, you can reboot to try your new and fast login system.

For a multi-users system, you will have to login manualy, or to install a display manager that doesn't depend on *kit.

If you want to be able to start different display managers with starx, it is possible to script it, but this is another subject.

Now, we can remove the non wanted stuffs. What to do here, and its exact order, can depend on which softwares are installed on your system:

Code: Select all
su -
apt-get remove pulseaudio
apt-get remove kde #not sure for this one, it is in my history...
apt-get autoremove
apt-get remove kdelibs-bin kdelibs5-data
apt-get autoremove
apt-get remove libgnome
apt-get remove policykit
apt-get remove consolekit
apt-get autoremove
apt-get autoremove

We are done.

If that fail, read the apt-get messages to know which package(s) is/are blocking the removing, and remove them. If you want to use kde in a *kit free system, use gentoo with a *kit free profile like the one in the pro-audio overlay. If you want to use Gnome in a * kit free system, wait for Gnome 4. If you want to use pulseaudio, wait for ever. A good alternative is jack-audio-connection-kit with the snd-aloop module and jack_connect, or best, zita-ajbridge.

The fonts in libreoffice will be very small. We need to install
Code: Select all
apt-get install libreoffice-gtk
Posts: 40
Joined: 2013-08-30 10:08

Re: HOWTO remove *kit

Postby stevesr0 » 2013-10-01 00:05


I just started looking for information on the need for policykit-1 on my personal home laptops on which I am the only user. I am running Wheezy with startx and openbox and a few apps (iceweasel, libreoffice, VLC, aptitude being the main ones).

As a nontechie linux user, my usual concern is that I remove something that will break the system (had a bad experience with libc6).

Recently, started trying to logout from within Openbox or the command line, using sudo WITHOUT having to type password.

The editing in sudoers is simple and works from a terminal if I launch sudoers and save without editing, before commanding shutdown. Doesn't work from other terminals or the Openbox menu.

Also have authorization denied messages if I try to eject usb drives with PCMANFM.

Apparently, these are blocked by default policykit-1 rules, which creation of local policy kit files and possibly other editing to overcome. Have also heard that for the shutdown problem, a dbus statement in the Openbox menu item for Shutdown could work. All of this presupposes that policykit-1 is appropriate or necessary for all user setups.

I will reflect on your HOWTO and then - unless I uncover drawbacks/problems - will try it, as I have no obvious need for that sort of security approach on these machines.

Thanks much.
Posts: 156
Joined: 2012-05-05 03:32

Re: HOWTO remove *kit

Postby asbesto » 2013-11-17 21:59

This howto is GREAT! :D

Now for the next step - that is my DREAM: do you think it's possible to compile MATE without PolicyKit support? My goal will be to create .deb packages of a Mate without this PolicyKit.

73 de IW9HGS
User avatar
Posts: 17
Joined: 2010-11-02 21:00

Re: HOWTO remove *kit

Postby stevesr0 » 2014-01-20 03:43

I have a "minimalist" Debian Wheezy install and I had trouble getting startx to launch Xwindows after removing console kit.

Without making the changes listed by the OP, I was able to get startx working without console (or policy or package) kit by changing the ~/.xinitrc from
exec ck-launch-session openbox-session
exec dbus-launch openbox-session

(I didn't realize that "ck" stood for consolekit, NOT "check" <g>)

Now, startx works and also my exit, shutdown and reboot commands from the openbox menu. (In the Openbox menu, I edited the latter two commands to invoke /sbin/shutdown -h now and /sbin/shutdown -r now respectively, after editing the sudoers file.)

Not sure if the system is functioning faster, but at least I don't have stuff installed that I don't seem to need.
Posts: 156
Joined: 2012-05-05 03:32

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests