IgnorantGuru's Blog

Linux software, news, and tips

devmon’s New Installation Instructions

The installation instructions for devmon have been rewritten based on what I have learned about ConsoleKit. If you want gory details, read on.

ck-launch-session sets env variables and other voodoo which enables udisks to have the required policykit permissions to mount devices. If devmon is started outside of a consolekit session, it doesn’t appear to work, even if the pklocalauthority file is created to allow users to mount unconditionally. Except when it does. It seems to be able to run from a tty terminal. But if you try to run it from within Openbox, for example, without ck-launch-session, it won’t work, presumably because xinit does not inherit its parent’s authority (at least as far as consolekit/policykit is concerned). You can read a little more in this mailing list discussion which directly addresses this problem.

So I now solely recommend launching your window manager with consolekit (if that isn’t already built into it?), then launching devmon from one of your WM’s initialization scripts (such as Openbox’s autostart.sh).

I completely removed the pklocalauthority instructions from devmon’s installation instructions because it seems to have no effect on the problem of starting devmon from xinitrc.

The only way I was able to start devmon in xinitrc and have it work was like this:

exec ck-launch-session bash -c "devmon & openbox-session"

You could also write a script to launch devmon and your window manager, and as long as you launch your script with ck-launch-session, it should work. Simply launching devmon from a script launched in xinitrc outside of the consolekit session did not work (as expected).

They certainly didn’t make udisks simple with all this linkage to consolekit and policykit. I have a good mind to write a root daemon that just mounts things for users, as doing this in Linux is ridiculously convoluted. But consolekit is increasingly required by many apps, so devmon requiring it shouldn’t be too much of a hassle – it’s just important where you start it. And udisks does work reliably once this is handled correctly.

So devmon’s installation instructions have been rewritten to reflect all of this. Please let me know if they need any refinement for any particular setup.

Other than the permissions problems (which I didn’t encounter until I forced the issue to help troubleshoot others’ installations), devmon has been working very well for me. This is the first time I’ve had an automounting solution, on any distro, that behaves reliably and how I want, so in that sense udisks has been helpful.

February 6, 2011 - Posted by | Scripts

Sorry, the comment form is closed at this time.

%d bloggers like this: