KDE 4.5.3, unable to mount internal media.

Before you simply assume "oh, fix your PolicyKit stuff" let me explain..

I -can- mount the very same media in gnome...

An error occurred while accessing 'Windows 7', the system responded:
Code:
org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.storage.mount-fixed no <-- (action, result)

my user is in group wheel..

cat /usr/local/etc/PolicyKit/PolicyKit.conf
Code:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="wheel"/>
</config>

Which means he should be designated as admin.. so he should get asked for a password to do -whatever-

cat /usr/local/kde4/share/PolicyKit/policy/org.freedesktop.hal.storage.policy
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">

<!--
Policy definitions for HAL's drives/media mechanims.

Copyright (c) 2007 David Zeuthen <david@fubar.dk>

HAL is licensed to you under your choice of the the Academic Free
License Version 2.1, or the GNU General Public License version 2. Some
individual source files may be under the GPL only. See COPYING for
details.
-->

<policyconfig>

  <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>no</allow_inactive>
      <allow_active>auth_admin_keep_always</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>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.unmount-others">
    <description>Unmount file systems mounted by other users.</description>
    <message>System policy prevents unmounting media mounted by other users</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep_always</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.eject">
    <description>Eject removable media.</description>
    <message>System policy prevents ejecting removable media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.crypto-setup-fixed">
    <description>Set up decryption for encrypted fixed storage devices.</description>
    <message>System policy prevents accessing encrypted fixed media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep_always</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.crypto-setup-removable">
    <description>Set up decryption for encrypted removable storage devices.</description>
    <message>System policy prevents accessing encrypted removable media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

</policyconfig>

This file is actually located in /usr/local/share/PolicyKit/policy (which is symlinked into the kde4 heirarchy) - so it should either -ask for my admin password, which it does -not do!- OR it should simply mount the media.

Now.. here is where things get fun! If I log out of KDE, and into Gnome 2.30 - everything mounts correctly.. and then I can log out, and back into KDE.. and it'll work right.. and I will even be able to unmount the drives that I mounted under gnome..

But it wont mount them back..
And, for good measure: ck-list-sessions from Konsole shows:

Code:
Session13:
        unix-user = '1001'
        realname = '<removed>'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/ttyv8'
        display-device = 'ttyv0'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2010-11-09T05:21:25.911663Z'
        login-session-id = ''
 
Update: I -can- get most PolicyKit-related stuff to work if I start from console via:

.xinitrc
Code:
exec ck-launch-session startkde

So I tried this, as a dirty kludge (unsuccessfully, I might add)

Code:
mv /usr/local/kde4/bin/startkde /usr/local/kde4/bin/startkde.real
then I created another /usr/local/kde4/bin/startkde:
Code:
#!/bin/sh
/usr/local/bin/ck-launch-session /usr/local/kde4/bin/startkde.real

And then tried to log in again from both KDM and GDM (obviously they werent both running at once) and it still will not let me do -anything- PolicyKit related.
 
Just some more info, to show where the file(s) are installed..

Code:
ls -l /usr/local/kde4/share/PolicyKit/ && ls /usr/local/share/PolicyKit/policy/
total 1
lrwxr-xr-x  1 root  wheel  33 Nov  8 12:32 policy -> /usr/local/share/PolicyKit/policy
org.freedesktop.hal.dockstation.policy          org.gnome.policykit.examples.policy
org.freedesktop.hal.killswitch.policy           org.kde.fontinst.policy
org.freedesktop.hal.leds.policy                 org.kde.kcontrol.kcmclock.policy
org.freedesktop.hal.policy                      org.kde.kcontrol.kcmkdm.policy
org.freedesktop.hal.power-management.policy     org.kde.kcontrol.kcmremotewidgets.policy
org.freedesktop.hal.storage.policy              org.kde.ksysguard.processlisthelper.policy
org.freedesktop.hal.wol.policy                  org.opensuse.cupspkhelper.mechanism.policy
org.freedesktop.policykit.policy
 
So.. no one has a clue what is going on? Am I the only one who is either loading kde from a DM, or having trouble with this??

I can't be..
 
So, an update.. I noticed that I was able to mount -external- media in KDE when I launch it via gdm - but internal media was not prompting me for "Admin Authentication" which is set as default, where all users in the group "wheel" are set at Admins.. and my user is in wheel (as evidenced by the fact that I -could- mount em under gnome -and when I'd start via startx (ck-launch-session kdestart)- just not under KDE. I will continue to update this thread if and when I get or determine more information about this..

To reiterate where we are now: KDE is failing to ask me for a password when mounting internal media under dolphin, when using defaults.. However, it -does- prompt me for a password when I change default PolicyKit settings with the system-settings PolicyKit kcm plugin...
 
I have the same problem and running KDE as well. I was at least able to get my dvd device to be read by:

Code:
kldload atapicam

...but then I cannot access it due to authorization rules.


Please, if anyone knows. I'm betting many people just give up and switch because this is a real killer not being able to read the dvd device. :(
 
Back
Top