You are not logged in.

#1 2009-11-22 20:21:36

sokuban
Member
Registered: 2006-11-11
Posts: 412

[SOLVED]HAL automounting works on root but not as user

HAL automounting stopped working. I'm pretty sure I had it working before, though I'm pretty sure it stopped working on some HAL update and I had to add some lines somewhere to get it working again, and it seems it happened again.

This is my PolicyKit.conf:

<?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 action="org.freedesktop.hal.storage.*">
                        <return result="yes"/>
                </match>
                <match action="hal-storage-mount-fixed-extra-options">
                <!-- for internal devices mounted with extra options like a wished mount point -->
                        <return result="yes" />
                </match>
                <match action="hal-storage-mount-removable-extra-options">
                <!-- for external devices mounted with extra options like a wished mount point -->
                        <return result="yes" />
                </match>
</config>

I have tried adding <match user="sokuban"></match> into the file in various positions, but none seemed to work.

If I open up Thunar (NB: I do not have Thunar Volman, Gnome Volman or any Volman installed) and click the "KINGSTON" icon on the left to try and mount it, I get this error message:

Failed to mount "KINGSTON".

Rejected send message, 1 matched rules; type="method_call", sender=":1.33" (uid=1000 pid=2974 comm="exo-mount) interface="org.freedesktop.Hal.Device.Volume" member="Mount" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=2829 comm="/usr/sbin/hald)).

However, if I run Thunar in root and try to do the same thing there are no errors.

Last edited by sokuban (2009-11-22 20:46:54)

Offline

#2 2009-11-22 20:29:42

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: [SOLVED]HAL automounting works on root but not as user

Have you tried starting your sessions with Consolekit?  I haven't had to look at PolicyKit.conf for months now.

exec dbus-launch --exit-with-session ck-launch-session [session]

The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#3 2009-11-22 20:46:40

sokuban
Member
Registered: 2006-11-11
Posts: 412

Re: [SOLVED]HAL automounting works on root but not as user

Thanks, that works.

Offline

#4 2009-11-26 11:44:00

Dr.U
Member
From: Ettlingen, Germany
Registered: 2005-03-03
Posts: 68

Re: [SOLVED]HAL automounting works on root but not as user

Meyithi wrote:

Have you tried starting your sessions with Consolekit?  I haven't had to look at PolicyKit.conf for months now.

exec dbus-launch --exit-with-session ck-launch-session [session]

Hi,
I'm using openbox and pcmanfm and I'm having the same problem with mounting my USB sticks (i.e. I can mount them from pcmanfm when running it as root but not as a normal user). Your suggested solution seems to work for sokuban and I would like to try it -- only I seem to be too stupid to understand your solution tongue

So what do I need to do to "start my session with Consolekit" ??? Your solution appears to me as if I must run the "exec dbus-launch" line from within my openbox autostart.sh file. So I added the line, logged out of openbox and started it again, but nothing changed!?! hmm

Should the line actually look exactly as you wrote it? Or is the "[session]" entry a place-holder for something (such as "openbox" or whatever)?

Thanks in advance for any help -- which will be greatly appreciated,
Dr.U

Offline

#5 2009-11-26 15:03:39

sokuban
Member
Registered: 2006-11-11
Posts: 412

Re: [SOLVED]HAL automounting works on root but not as user

Dr.U wrote:
Meyithi wrote:

Have you tried starting your sessions with Consolekit?  I haven't had to look at PolicyKit.conf for months now.

exec dbus-launch --exit-with-session ck-launch-session [session]

Hi,
I'm using openbox and pcmanfm and I'm having the same problem with mounting my USB sticks (i.e. I can mount them from pcmanfm when running it as root but not as a normal user). Your suggested solution seems to work for sokuban and I would like to try it -- only I seem to be too stupid to understand your solution tongue

So what do I need to do to "start my session with Consolekit" ??? Your solution appears to me as if I must run the "exec dbus-launch" line from within my openbox autostart.sh file. So I added the line, logged out of openbox and started it again, but nothing changed!?! hmm

Should the line actually look exactly as you wrote it? Or is the "[session]" entry a place-holder for something (such as "openbox" or whatever)?

Thanks in advance for any help -- which will be greatly appreciated,
Dr.U

I put that line in my .xinitrc and replaced [session] with my window manager.

Offline

#6 2009-11-27 10:02:17

Dr.U
Member
From: Ettlingen, Germany
Registered: 2005-03-03
Posts: 68

Re: [SOLVED]HAL automounting works on root but not as user

Hi,

Thanks for the quick reply! I have now tried putting various forms of the entry, such as:

dbus-launch --sh-syntax --exit-with-session ck-launch-session openbox

or

dbus-launch --sh-syntax --exit-with-session ck-launch-session openbox-session

in my autostart.sh for openbox, but nothing changes sad

The exact form in my autostart.sh looks basically like it has always looked (except for the addition of the "ck-launch-session openbox" part, which was previously not present back in the days when I could mount my usb-stick by just clicking on it in pcmanfm...), namely

if which dbus-launch >/dev/null 2>&1 && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
    eval `dbus-launch --sh-syntax --exit-with-session ck-launch-session openbox`
fi

Any other tips that I could try out?

Thanks in advance,
-- Dr.U

Offline

#7 2009-11-27 12:19:44

Hickin
Member
Registered: 2009-01-30
Posts: 27

Re: [SOLVED]HAL automounting works on root but not as user

Ive got same problem as described.
When trying to mount my cellphone (SonyEricsson w880i) i get:

Rejected send message, 1 matched rules; type="method_call", sender=":1.96" (uid=1000 pid=16894 comm="pcmanfm) interface="org.freedesktop.Hal.Device.Volume" member="Mount" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=2606 comm="/usr/sbin/hald))

And I have worked only some weeks ago.
I use fluxbox so I believe that it will have the same sollution as Dr.U will have to his problem.

Best regards

Hickin

Offline

#8 2009-11-27 14:14:20

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [SOLVED]HAL automounting works on root but not as user

This is my .xinitrc:

eval $(dbus-launch --sh-syntax --exit-with-session)
exec ck-launch-session startlxde

Replace startlxde with openbox-session or whatever it is you're using and see if things work now.

Offline

#9 2009-11-27 16:03:19

Hickin
Member
Registered: 2009-01-30
Posts: 27

Re: [SOLVED]HAL automounting works on root but not as user

Worked, thanks a lot big_smile

Offline

#10 2009-11-27 19:38:13

sokuban
Member
Registered: 2006-11-11
Posts: 412

Re: [SOLVED]HAL automounting works on root but not as user

Dr.U wrote:

Hi,

Thanks for the quick reply! I have now tried putting various forms of the entry, such as:

dbus-launch --sh-syntax --exit-with-session ck-launch-session openbox

or

dbus-launch --sh-syntax --exit-with-session ck-launch-session openbox-session

in my autostart.sh for openbox, but nothing changes sad

Don't put anything in your autostart.sh; I have no clue what that file is, but it is not what you want unless you start openbox from it. (Well, I just checked, and it seems to be a place where you can put programs you want to run after openbox starts. That is not what you want; you want to run openbox with the above command.)

Put it in your .xinitrc or your .xsession if you use a login manager. I'm not sure whether you use "openbox" or "openbox-session" to run openbox, but it should already say something like "exec something" in your .xinitrc and you put whatever "something" was in the [session] placeholder in the command.

Offline

#11 2009-11-29 10:49:00

Dr.U
Member
From: Ettlingen, Germany
Registered: 2005-03-03
Posts: 68

Re: [SOLVED]HAL automounting works on root but not as user

Hi,

Thank you very much, Gusar and sokuban -- Your tips solved my problem cool

I removed the entries from openbox's autostart.sh file and have the following in my .xinitrc file:

eval $(dbus-launch --sh-syntax --exit-with-session)
exec ck-launch-session openbox

Now I can plug-in my usb-stick and just click on it in pcmanfm to automatically mount it and open it.

Thanks again,
-- Dr.U

Offline

Board footer

Powered by FluxBB