You are not logged in.

#26 2011-12-28 16:04:07

42sec
Member
Registered: 2011-12-28
Posts: 16

Re: pcmanfm is "Not Authorized" to mount usb drives

Psykorgasm wrote:

Well apart from that I have no idea, the last time I had this issue it was consolekit that was causing it.

Just to be sure do you have dbus installed and in the daemons array?

Yes I have hmm

Offline

#27 2011-12-28 16:16:59

grandmouse
Member
From: germany, bonn
Registered: 2005-05-14
Posts: 90

Re: pcmanfm is "Not Authorized" to mount usb drives

~/.config/autostart/PCManFM.desktop (to launch pcmanfm as child of xfce4-session)

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=PCManFM
Comment=
Exec=pcmanfm --desktop
StartupNotify=false
Terminal=false
Hidden=false

Check this autostart entry in xfce4-session-settings to make it active.

Offline

#28 2011-12-28 16:22:31

42sec
Member
Registered: 2011-12-28
Posts: 16

Re: pcmanfm is "Not Authorized" to mount usb drives

grandmouse wrote:

~/.config/autostart/PCManFM.desktop (to launch pcmanfm as child of xfce4-session)

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=PCManFM
Comment=
Exec=pcmanfm --desktop
StartupNotify=false
Terminal=false
Hidden=false

Check this autostart entry in xfce4-session-settings to make it active.

What do I have to write in the ~/.xinitrc when I want to do it this way?

Offline

#29 2011-12-28 18:33:37

grandmouse
Member
From: germany, bonn
Registered: 2005-05-14
Posts: 90

Re: pcmanfm is "Not Authorized" to mount usb drives

exec ck-launch-session startxfce4

You can hide programs from DEs with 'OnlyShowIn=' or 'NotShowIn=' (choose XFCE, GNOME or KDE)

Offline

#30 2011-12-28 18:55:21

oldpond
Member
Registered: 2010-01-26
Posts: 43

Re: pcmanfm is "Not Authorized" to mount usb drives

I am struggling with this as well.  I just noticed that gamin interferes with pcmanfm's ability to load usb's on insert.  Do you have gamin installed?


oldpond = glide

Offline

#31 2011-12-29 07:53:52

tpfkanep
Member
From: South Africa
Registered: 2009-12-15
Posts: 127

Re: pcmanfm is "Not Authorized" to mount usb drives

do you have ntfs-3g installed...?

Offline

#32 2012-01-02 23:31:09

snaz
Member
Registered: 2010-10-15
Posts: 14

Re: pcmanfm is "Not Authorized" to mount usb drives

I have this problem too.

Offline

#33 2012-01-03 13:38:40

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: pcmanfm is "Not Authorized" to mount usb drives

If your running slim you can change login_cmd in /etc/slim.conf to this:

login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1

Then you don't need ck-launch-session and dbus-launch in your .xinitrc

I got the same error with udisks before except that I got it for internal disks instead.

To authorize users that are members of the group storage I had to add the following file

/etc/polkit-1/localauthority/50-local.d/50-filesystem-mount-system-internal.pkla

and put this in it

[Mount a system-internal device]                                                                                                                            
Identity=unix-group:storage                                                                                              
Action=org.freedesktop.udisks.filesystem-mount-system-internal                                                           
ResultActive=yes

Sounds like your having a similar problem like I had and that there is
some permission you need to grant your user in policykit.


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#34 2012-01-03 23:50:56

andesho91
Member
From: London, UK
Registered: 2011-11-20
Posts: 71

Re: pcmanfm is "Not Authorized" to mount usb drives

I remember I had to edit a consolekit/policykit file to resolve this issue, something to do with it saying "...=false" when it should have said "...=true". I will have a look for the article, on some GIT or source code page if I remember correctly


Laptop: AMD A4-3305M, 4GB RAM, Archlinux 64bit with XFCE4 and Linux Mint Maya with MATE.

Offline

#35 2012-01-04 16:24:43

mandalar
Member
Registered: 2011-10-14
Posts: 7

Re: pcmanfm is "Not Authorized" to mount usb drives

I think the file andesho91 is talking about is /usr/share/polkit-1/actions/org.freedesktop.udisks.policy (on debian at least, I'll check on arch tonight) and putting many "true" in it solved the problem for me.
I hope someone would explain the meaning of every option and the (security) implications of this file though.

Last edited by mandalar (2012-01-04 16:25:28)

Offline

#36 2012-01-04 16:46:27

theunknown
Member
Registered: 2012-01-04
Posts: 2

Re: pcmanfm is "Not Authorized" to mount usb drives

I had the same problem. I fixed it by changing

-session      optional        pam_ck_connector.so nox11

to

session         optional        pam_ck_connector.so

in /etc/pam.d/login.

Offline

#37 2012-01-04 16:47:43

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: pcmanfm is "Not Authorized" to mount usb drives

I guess that if you modify any policy under /usr/share/polkit-1/ you risk losing them when the package gets updated.

If I got it right then it is there the "default policy" is stored and if you want to override it you should add a pkla-file for it
under /etc/polkit-1/localauthority/50-local.d/


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#38 2012-01-04 22:34:41

andesho91
Member
From: London, UK
Registered: 2011-11-20
Posts: 71

Re: pcmanfm is "Not Authorized" to mount usb drives

mandalar wrote:

I think the file andesho91 is talking about is /usr/share/polkit-1/actions/org.freedesktop.udisks.policy (on debian at least, I'll check on arch tonight) and putting many "true" in it solved the problem for me.
I hope someone would explain the meaning of every option and the (security) implications of this file though.

Yes, you would be correct in that I have certainly done this for a Debian-based OS, when I fiddled with e17. I also remember doing for arch with XFCE, LXDE and e17, a combination which definitely doesn't work too well together.


Laptop: AMD A4-3305M, 4GB RAM, Archlinux 64bit with XFCE4 and Linux Mint Maya with MATE.

Offline

#39 2012-01-06 06:41:05

c2ypt1c
Member
Registered: 2012-01-05
Posts: 10

Re: pcmanfm is "Not Authorized" to mount usb drives

I'm having the same problem...except, I can't mount a couple of my other ntfs partitions, although manually mounting works fine. I Keep getting "Not Authorized" in pcmanfm. I've tried EVERYTHING in the wiki. This is starting to get frustrating sad

Last edited by c2ypt1c (2012-01-06 06:46:38)

Offline

#40 2012-01-06 19:27:13

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: pcmanfm is "Not Authorized" to mount usb drives

Try starting pcmanfm, then opens a terminal (both as your normal user) and run this:

pkcheck --process `pidof pcmanfm` --allow-user-interaction --action-id org.freedesktop.udisks.filesystem-mount && echo "Succes"

What does it say?

Succes

or

polkit\56retains_authorization_after_challenge=1
Authorization requires authentication but no agent is available.

?

Do you have a .pkla file under /etc/polkit-1/localauthority/50-local.d/ that look something like this

[Mount a device]
Identity=unix-group:storage
Action=org.freedesktop.udisks.filesystem-mount
ResultAny=yes

?


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#41 2012-01-06 19:43:08

snaz
Member
Registered: 2010-10-15
Posts: 14

Re: pcmanfm is "Not Authorized" to mount usb drives

It says Success and I have the same exact pkla file.

Offline

#42 2012-01-06 19:47:50

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

Re: pcmanfm is "Not Authorized" to mount usb drives

The point of consolekit is that you do *not* need to be in any groups. So if you need that pkla file, it means that consolekit is not working.

Offline

#43 2012-01-07 14:27:41

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: pcmanfm is "Not Authorized" to mount usb drives

snaz wrote:

It says Success and I have the same exact pkla file.

Sorry to say it but I don't have any more ideas I think...

Have you tried to mounting it with udisks directly?
Like:

udisks --mount /dev/sdc1

I found out that for pcmanfm I didn't need the policy in the case of usb-drives, but I need the policy for internal drives.
I remember now that I added it for udisks to allow me to mount the usb-drives (usually use the udisks-tool to do it and not pcmanfm).

Gusar wrote:

The point of consolekit is that you do *not* need to be in any groups. So if you need that pkla file, it means that consolekit is not working.

To some extent if I got it right...

Consolekit will manage your session, decide if your a local or remote user, allow you to change user without logging out.
But when you request to mount a drive or change some network settings etc it's polkit that decide if your allowed or not based on the system policy.
The policy thou would most likely allow a local user more then a remote user.

Might be me that's wrong, I haven't done any deeper readings about consolekit and since it's page say's

ConsoleKit is currently not actively maintained. The focus has shifted to the built-in seat/user/session management of Software/systemd called systemd-loginctl

I'm not likely to do either wink


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#44 2012-01-08 01:08:36

snaz
Member
Registered: 2010-10-15
Posts: 14

Re: pcmanfm is "Not Authorized" to mount usb drives

I've magically fixed it by removing all the extra stuff from .xinitrc. That is, starting Openbox with

exec openbox-session

EDIT: Sort of. I can't seem to unmount anything if I do it this way.

EDIT EDIT: And now it's magically fixed again. Wtf.

Last edited by snaz (2012-01-08 01:18:28)

Offline

#45 2012-01-08 17:30:13

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: pcmanfm is "Not Authorized" to mount usb drives

snaz wrote:

I've magically fixed it by removing all the extra stuff from .xinitrc. That is, starting Openbox with

exec openbox-session

EDIT: Sort of. I can't seem to unmount anything if I do it this way.

EDIT EDIT: And now it's magically fixed again. Wtf.

Odd... well, hope it keeps working then smile


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#46 2012-01-08 19:07:06

c2ypt1c
Member
Registered: 2012-01-05
Posts: 10

Re: pcmanfm is "Not Authorized" to mount usb drives

snaz wrote:

I've magically fixed it by removing all the extra stuff from .xinitrc. That is, starting Openbox with

exec openbox-session

EDIT: Sort of. I can't seem to unmount anything if I do it this way.

EDIT EDIT: And now it's magically fixed again. Wtf.

Doesn't work on my end...

Offline

#47 2012-01-09 00:12:44

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: pcmanfm is "Not Authorized" to mount usb drives

c2ypt1c wrote:
snaz wrote:

I've magically fixed it by removing all the extra stuff from .xinitrc. That is, starting Openbox with

exec openbox-session

EDIT: Sort of. I can't seem to unmount anything if I do it this way.

EDIT EDIT: And now it's magically fixed again. Wtf.

Doesn't work on my end...

You got to give a little more to go on then...

Are you using any login-manager (slim, gdm etc) or starting X by hand?
Usb or internal drives?
What wm are you running?

If you run

ck-list-sessions

do you get

is-local = TRUE

on your listed sessions?

c2ypt1c wrote:

although manually mounting works fine. I Keep getting "Not Authorized" in pcmanfm.

Mounting them as root with mount or as your user with udisks --mount /dev/sdx?

Last edited by greyscale (2012-01-09 00:47:22)


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#48 2012-01-09 01:04:26

c2ypt1c
Member
Registered: 2012-01-05
Posts: 10

Re: pcmanfm is "Not Authorized" to mount usb drives

greyscale wrote:

You got to give a little more to go on then...

Are you using any login-manager (slim, gdm etc) or starting X by hand?
Usb or internal drives?
What wm are you running?

I'm starting x via startx (no login-manager), trying to mount internal drives, and using openbox wm

If you run

ck-list-sessions

do you get

is-local = TRUE

on your listed sessions?

yes

Offline

#49 2012-01-10 07:12:50

c2ypt1c
Member
Registered: 2012-01-05
Posts: 10

Re: pcmanfm is "Not Authorized" to mount usb drives

Well, I was able to solve this issue by using polkit-gnome instead of policykit.
https://wiki.archlinux.org/index.php/LXDE#PCManFM

EDIT: Here's exactly what I've done:

install polkit-gnome, gvfs packages (also, copy polkit-gnome-authentication-agent-1.desktop to ~/.config/autostart)
rc.conf: DAEMONS=(...dbus)
~/.xinitrc: exec ck-launch-session dbus-launch startlxde
install ntfs-3g package for ntfs support
note: consolekit was installed with lxdm, which was installed with lxde group

Last edited by c2ypt1c (2012-01-10 09:14:14)

Offline

#50 2012-01-10 10:48:18

oldpond
Member
Registered: 2010-01-26
Posts: 43

Re: pcmanfm is "Not Authorized" to mount usb drives

Yeah, this whole setup is definately not robust.  I finally gave up and rebuilt the system up from scratch.  It works now, don't touch it,shake a rubber chicken.  In my humble opinion, this doesn't follow the KISS principle.  Simple would be, you plug in a usb, udev sees the event and mounts it in /dev, and you can read and right to it.  The idea that the normal desktop user can't read and right to his own devices is just silly.  Instead you've got udev wrappers, policy kit deamons, consolekit deamons, systemd, pcmanfm wants to do it's own thing, thunar has volman, gvfs and all that crap, and if you mix and match them you are in for pain.  Arch allows us to build a system to our own specs.  If you go with a full blown DE you will likely never experience this pain.  Arch also makes it easy to try out other DE's very easily via .xinitrc, or go with a lightweight WM instead of a DE.  It's this flexibility that leads us to banging our heads against this issue.  It should be simpler.  Just my two cents.


oldpond = glide

Offline

Board footer

Powered by FluxBB