How to mount USB drive for a user who is not logged in? (HAL, ConsoleKit, DBUS)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everybody!

I've got a challenge I want to meet which came together with F7.

I want to mount a particular USB drive as soon as it is plugged in - as a 
user who is NOT logged in. It has to be done as "user", because the user 
must be able to unmount it after he logged in. The system I've created 
worked perfectly with FC5 and FC6 but ceased working since F7.

I use a hal .fdi spec to call a script which mounts my USB drive. 
Additionaly I had to write a DBUS rule allowing this particular send 
messages without being logged in. All scripts are attached below.

F7 comes with a new component: ConsoleKit. It seems to me that hal with 
compiled-in ConsoleKit support does not allow anybody who is not logged 
in to mount anything. I only get messages like

** (gnome-mount:32736): WARNING **: Mount failed 
for /org/freedesktop/Hal/devices/volume_uuid_8658_2213
org.freedesktop.Hal.PermissionDenied : Permission denied: Not in active 
session

The workaround I found: I've rebuilt the hal package without ConsoleKit 
support.

Is there a way to convince hal WITH ConsoleKit support to cooperate and 
respect my wishes? ;) Or is it a bug?
Maybe you know a smarter way to do what I need?

-- 
Bye,
Adalbert
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 

<deviceinfo version="0.2">

  <device>
    <match key="@info.parent:info.product" string="Cruzer Micro">
      <match key="volume.label" string="USBDISK">
        <append key="info.callouts.add" type="strlist">dongle-mount</append>
      </match>
    </match>
  </device>

</deviceinfo>

Attachment: dongle-mount
Description: application/shellscript


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux