I have a live Debian Squeeze system on a USB drive, containing a script I use to image another drive. This script uses
udisks to mount a drive by label, but it doesn't work over a serial console. The reason is that the session associated with the serial console does not appear to be "active", which means that
udisks fails with:
user@my-live-usb:~$ udisks --mount /dev/disk/by-label/image-data --mount-options ro Mount failed: Not Authorized
allow_any key in
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy doesn't help, so I'd like to know how to tell ConsoleKit that the serial console is "active". Trying to do this via the DBUS interface fails:
user@my-live-usb:~$ dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Session7 org.freedesktop.ConsoleKit.Session.Activate Error org.freedesktop.DBus.GLib.UnmappedError.CkSeatError.Code0: Unable to activate session
Session7 is the one listed as being on /dev/ttyS0.
So how can I get ConsoleKit to recognise the serial console as an active session?
(In my case, udisks version is 1.0.1+git20100614-3, consolekit is 0.4.1-4.)
It's also probably worth noting the the Debian live system automatically logs the live user in on all 6 video consoles and the serial console.