Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How do I kick hal in the backside?

  1. #1
    Join Date
    Jun 2008
    Location
    Kln, Deutschland
    Posts
    1,054

    Default How do I kick hal in the backside?

    I've done quite a bit of searching, and reading various howtos, but still can't get that ratbag hal to allow me to mount removable storage through dolphin!

    I really hate hal, I think he needs reprogramming with an axe!

    How do I make hal allow all users in group wheel to mount/unmount ALL volumes, especially external?

    This is on openSUSE 11.1 32bit, using the original KDE 4.1 version of dolphin, but surely this is all controlled by the hal daemon, and not dolphin?
    HP dv6645, Nvidia 8400m-gs, KDE 4.

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,284
    Blog Entries
    1

    Default Re: How do I kick hal in the backside?

    Hi growbag

    Within Dolphin, I presume you get notifier icon (on Places panel) when you insert usb memory stick? Is it the manual mounting (by clicking on icon) you don't like, or is hal giving you grief with "org.freedesktop.hal.storage.mount-removable no <-- (action, result)" messages. If the latter, there was a bug with openSUSE 11.1, and I remember an adjustment with /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy was required:

    <action id="org.freedesktop.hal.storage.mount-removable">
    <description>Mount file systems from removable drives.</description>
    <message>System policy prevents mounting removable media</message>
    <defaults>
    <allow_inactive>yes</allow_inactive>
    <allow_active>yes</allow_active>
    </defaults>
    </action>
    As described here:

    http://i-nz.net/2009/01/13/opensuse-...e-workarounds/

  3. #3
    Join Date
    Jun 2008
    Location
    Kln, Deutschland
    Posts
    1,054

    Default Re: How do I kick hal in the backside?

    Thanks for the reply deano, it was actually one of your posts that I followed to try getting it working.

    But sadly I still get the dreaded org.freedesktop.youare.not.allowed.to.do.this.stupid.error.message nonsense .


    I added this to -

    /etc/dbus-1/system.d/hal.conf

    Code:
    <policy group="wheel">
       <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
       <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
     </policy>
    But everything else in that file is set to allow already so I don't think it makes a difference.

    /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy contains -

    Code:
    <action id="org.freedesktop.hal.storage.mount-fixed">
        <description>Mount file systems from internal drives.</description>
        <message>System policy prevents mounting internal media</message>
        <defaults>
          <allow_inactive>yes</allow_inactive>
          <allow_active>yes</allow_active>
        </defaults>
      </action>
    
    <action id="org.freedesktop.hal.storage.mount-removable">
        <description>Mount file systems from removable drives.</description>
        <message>System policy prevents mounting removable media</message>
        <defaults>
          <allow_inactive>yes</allow_inactive>
          <allow_active>yes</allow_active>
        </defaults>
      </action>
    As you can see, I changed everything to yes, then restarted hal (I assume!) by issuing the command -

    /etc/init.d/haldaemon restart

    The problem is that dolphin will not allow me to mount FAT volumes on my USB stick (I can do it as root from the command line ok).

    I can mount my USB disk drive (encrypted LUKS partition) with Dolphin when used locally, but not when I do it remotely through an ssh'd dolphin (another story though!). So that's not a problem.

    I've compared all the files in /usr/share/PolicyKit/policy to my other updated KDE 4.3.1 machine, and they all seem to be identical.

    Here's a screenshot of what I get -



    Seeing as this is my server, I didn't restart it between edits believing that a hal restart was enough, is that my mistake?

    Thanks
    Free Image Hosting by ImageBam.com
    HP dv6645, Nvidia 8400m-gs, KDE 4.

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,284
    Blog Entries
    1

    Default Re: How do I kick hal in the backside?

    Seeing as this is my server, I didn't restart it between edits believing that a hal restart was enough, is that my mistake?
    Actually, I remember playing with the policies recently (openSUSE11, KDE4.2.4), and from memory, I found that I needed to restart the desktop (with a new session too) for the settings to take effect.

    See if this makes a difference:

    polkit-action --reset-defaults org.freedesktop.hal.storage.mount-removable

  5. #5
    Join Date
    Jun 2008
    Location
    Kln, Deutschland
    Posts
    1,054

    Default Re: How do I kick hal in the backside?

    No, nothing, still the same .
    HP dv6645, Nvidia 8400m-gs, KDE 4.

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,284
    Blog Entries
    1

    Default Re: How do I kick hal in the backside?

    Can you create another user, then login as that user, and see whether the problem persists?

    This is frustrating. It only seems to happen to a few. I'll see what else I can dig up...

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,284
    Blog Entries
    1

    Default Re: How do I kick hal in the backside?

    Have a read of this thread

    Re: [opensuse] Strange "PermissionDeniedByPolicy" Problem with 11.1

    all the way through to the last post. This guy tried just about everything including this

    Here. Just put this in /etc/PolicyKit/PolicyKit.conf, between <config
    version="0.1"> and </config> will solve both of you problems (just
    replace "your user name or uid" with the real thing):

    <match action="org.freedesktop.hal.storage.mount-removable">
    <match user="your user name or uid">
    <return result="yes"/>
    </match>
    </match>
    <match action="org.freedesktop.hal.storage.unmount-others">
    <match user="your user name or uid">
    <return result="yes"/>
    </match>
    </match>
    <match action="org.freedesktop.hal.power-management.hibernate ">
    <match user="your user name or uid">
    <return result="yes"/>
    </match>
    </match>
    In his last post, he seems to find the cause (with directory ownerships and problems with /etc/psswd). It didn't make complete sense to me, but see what you can make of it.

  8. #8
    Join Date
    Jun 2008
    Location
    Kln, Deutschland
    Posts
    1,054

    Default Re: How do I kick hal in the backside?

    Thanks for all your help and suggestions, I'll play with it throughout the day.

    It drives me nuts too, I reported a bug about this sort of thing in milestone 2 and 6, and it seems the devs have done some work and fixed internal partition mounting, external stuff seems to have been fixed already with 11.1 updates, but for some reason it's not working on my server.

    But sadly none of the work is backported .

    I'll report anything I find that helps.
    HP dv6645, Nvidia 8400m-gs, KDE 4.

  9. #9

    Default Re: How do I kick hal in the backside?

    As per the comments in the link you can change it with
    Code:
    sudo polkit-auth --grant org.freedesktop.hal.storage.mount-removable --user <user_name>
    sudo polkit-auth --grant org.freedesktop.hal.storage.eject --user <user_name>
    But before that what permissions do you have
    Code:
    polkit-auth --user $USER
    But also a little clarity I don't understand are you saying that it works ?
    ...I can mount my USB disk drive (encrypted LUKS partition) with Dolphin when used locally...
    You seem to be tackling all kinds of stuff,
    /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy is defaults
    /etc/dbus-1/system.d/hal.conf is hal.conf

    In theory to override defaults you need /etc/hal/fdi/policy/n-*.fdi but iirc I also had some issues with Suse listening to my request. But I'm still not sure whether I understand the problem, if just a usbpen doesn't, but usb drive with crypto does work. then try the couple of bits suggested. Next you do have some defaults that may cause no mounting in some things like hidden recovery partitions, certain labels etc just under volume.fsusage /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi

    If you come back with what permissions your user does have, and any additional if trying to add it doesn't work.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  10. #10

    Default Re: How do I kick hal in the backside?

    Edit
    HAL - ArchWiki I find this the best wiki to get at the basics of hal using vanilla hal.

    Also correction
    /etc/dbus-1/system.d/hal.conf is also default system permissions
    Where as /usr/share/hal/fdi/policy/* is per device(probably incorrect terminlogy)
    The other way is to edit /etc/PolicyKit/PolicyKit.conf as per the wiki, for shutdown but iirc I tried this for a keyboard problem but had little joy.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •