3

My X login manager (slim) has brought with it a dependency on a package consolekit I don't know what consolekit is good for, other login managers such as wdm do not need it.

But anyway, the problem I am having is that consolekit is logging lots of garbage in /var/log/ConsoleKit/history. I am not interested in those logs. Is it possible to disable logging?

I have tried removing the log file and creating a symlink to /dev/null

ln -s /dev/null /var/log/ConsoleKit/history

But that does not work, because consolekit now complains that there are too many levels of symbolic links.

3 Answers 3

1
+50

ConsoleKit doesn't accept symbolic links for the log file as you mentioned in your question.

But you can trick consolekit a bit, when you create a null device instead of a normal log file. First remove the history file:

rm /var/log/ConsoleKit/history 

And then use this command:

mknod /var/log/ConsoleKit/history c 1 3

That creates a null device (c: character special, 1: major number and 3 minor number).

Now, everthing that is logged in this file is deleted and needs no space on the filesystem.

2
  • so basically, this will create a second /dev/null file, named /var/log/ConsoleKit/history ? I have /var partition mounted with nodev option, will this still work? Commented Jul 18, 2014 at 16:45
  • @MartinVegter This will end in a Permissin denied when writing to this device. But, there is stil another option: a bind mount. Before creating the null device, run this command: mount --bind $(mktemp -d) /var/log/ConsoleKit/. Then create the device as in my answer. You can test with echo "blah" >/var/log/ConsoleKit/history which should not fail in a permissin error. Commented Jul 18, 2014 at 17:03
1

From FreeDesktop.Org

ConsoleKit is a framework for defining and tracking users, login sessions, and seats.

Also note:

ConsoleKit is currently not actively maintained. The focus has shifted to the built-in seat/user/session management of Software/systemd called systemd-logind!

Documentation

No longer maintained but available here

To disable it, see:
console-kit-daemon Hogging CPU and RAM or
Gentoo Wiki: Consolekit

0

Make the log file immutable as root.

sudo echo "" > /var/log/ConsoleKit/history/<log_filename>
sudo chattr +i /var/log/ConsoleKit/history/<log_filename>

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.