You are not logged in.

#1 2011-12-28 13:07:46

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

pcmanfm is "Not Authorized" to mount usb drives

Hi,

I recently installed arch linux it's a nice distro but I got a few problem with it.
The biggest one is that I am actually not able to mount usb drives with pcmanfm this means that I am not able to use my old debian /home so far.
I tired multiple thinks (some of them are still active)  e.g for example I used to setup a udev rules which wasn't helpful at all (and even after deleting this rule I always see server empty folder in /media (but that's another problem)).
Any ideas why I am not able to mount encrypted and not encrypted USB drives in arch linux?

Last edited by 42sec (2011-12-28 13:21:41)

Offline

#2 2011-12-28 13:12:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

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

How do you start your WM? If you use .xinitrc, do you have

exec ck-launch-session dbus-launch <your wm>

there?
Note that 'ck-launch-session' comes before 'dbus-launch'. If you do them the other way around you might get "Not authorized" errors when you try to mount your drive.

Offline

#3 2011-12-28 13:14:07

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

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

karol wrote:

How do you start your WM?

exec ck-launch-session dbus-launch --exit-with-session startxfce4

and yes I have ~/.xinitrc

Not sure if this is important, but I created ~/.xinitrc as root (yeah I know that's stupid) so I am only able to edit it with root rights...

Last edited by 42sec (2011-12-28 13:29:42)

Offline

#4 2011-12-28 13:34:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

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

Change the permissions for ~/.xinitrc.

karol@black ~]$ ls -l ~/.xinitrc
-rwxr-xr-x 1 karol users 1449 12-25 05:19 /home/karol/.xinitrc

Offline

#5 2011-12-28 13:36:58

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

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

karol wrote:

Change the permissions for ~/.xinitrc.

karol@black ~]$ ls -l ~/.xinitrc
-rwxr-xr-x 1 karol users 1449 12-25 05:19 /home/karol/.xinitrc

Well I just deleted it and afterwords I recreated it with the same content, which has the same effect, but even after rebooting my machine mounting usb drives is still not possible ;'(

Last edited by 42sec (2011-12-28 13:41:24)

Offline

#6 2011-12-28 13:50:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

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

Can you mount them by hand?
Is your user in the storage group?
Do you have consolekit installed?
Are you using Slim Login Manager?

Offline

#7 2011-12-28 13:58:34

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

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

he has a proper authorization in place. the only thing missing is an agent to take care of login.

install polkit-gnome and be sure that after login, /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 is running

after that it will ask the root password if the user is not in wheel group, your user password if is in wheel group, like sudo

Last edited by wonder (2011-12-28 13:59:24)


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#8 2011-12-28 14:01:04

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

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

karol wrote:

Can you mount them by hand?
Is your user in the storage group?
Do you have consolekit installed?
Are you using Slim Login Manager?

I can mount them using pmount
Yes he is
Not so sure, but I don't think so
Nope I am logging in using the shell

Offline

#9 2011-12-28 14:01:41

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

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

wonder wrote:

he has a proper authorization in place. the only thing missing is an agent to take care of login.

install polkit-gnome and be sure that after login, /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 is running

after that it will ask the root password if the user is not in wheel group, your user password if is in wheel group, like sudo

What does the login even has to do with my mount problem?

Offline

#10 2011-12-28 14:04:32

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

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

42sec wrote:
wonder wrote:

he has a proper authorization in place. the only thing missing is an agent to take care of login.

install polkit-gnome and be sure that after login, /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 is running

after that it will ask the root password if the user is not in wheel group, your user password if is in wheel group, like sudo

What does the login even has to do with my mount problem?

well, mounting internal partition needs root. consolekit+polkit does this in the desktop, like sudo works. For this to work it needs an agent to take care of that, giving proper authorization for mounting.

if polkit-gnome is installed (a.k.a the agent) when trying to mount it will ask for a password. In your system, this is missing and returns Not Authorized.


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#11 2011-12-28 14:11:06

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

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

wonder wrote:
42sec wrote:
wonder wrote:

he has a proper authorization in place. the only thing missing is an agent to take care of login.

install polkit-gnome and be sure that after login, /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 is running

after that it will ask the root password if the user is not in wheel group, your user password if is in wheel group, like sudo

What does the login even has to do with my mount problem?

well, mounting internal partition needs root. consolekit+polkit does this in the desktop, like sudo works. For this to work it needs an agent to take care of that, giving proper authorization for mounting.

if polkit-gnome is installed (a.k.a the agent) when trying to mount it will ask for a password. In your system, this is missing and returns Not Authorized.


Ok I installed polkit-gnome what to do now?

Offline

#12 2011-12-28 14:23:00

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

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

wonder wrote:
42sec wrote:
wonder wrote:

he has a proper authorization in place. the only thing missing is an agent to take care of login.

install polkit-gnome and be sure that after login, /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 is running

after that it will ask the root password if the user is not in wheel group, your user password if is in wheel group, like sudo

What does the login even has to do with my mount problem?

well, mounting internal partition needs root. consolekit+polkit does this in the desktop, like sudo works. For this to work it needs an agent to take care of that, giving proper authorization for mounting.

if polkit-gnome is installed (a.k.a the agent) when trying to mount it will ask for a password. In your system, this is missing and returns Not Authorized.

How do I start the agent?

Offline

#13 2011-12-28 14:24:42

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

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

it starts automatically because it has a .desktop in /etc/xdg/autostart/. If not, just do

/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & after ck-launch-session command


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#14 2011-12-28 14:33:57

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

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

wonder wrote:

it starts automatically because it has a .desktop in /etc/xdg/autostart/. If not, just do

/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & after ck-launch-session command

Yeah ok you are right, but I didn't fixed my problem at all still get the error

Not Authorized

Offline

#15 2011-12-28 14:35:14

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

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

paste ck-list-sessions output, uname -r and cat /etc/pam.d/login


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#16 2011-12-28 14:44:29

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

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

wonder wrote:

paste ck-list-sessions output, uname -r and cat /etc/pam.d/login

[sec42@archlinux ~]$ ck-list-sessions
Session1:
	unix-user = '1000'
	realname = ''
	seat = 'Seat1'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/tty1'
	remote-host-name = ''
	is-local = TRUE
	on-since = '2011-12-28T14:28:01.840505Z'
	login-session-id = '1'
	idle-since-hint = '2011-12-28T14:28:32.462384Z'
[sec42@archlinux ~]$ uname -r
3.1.5-1-ARCH
[sec42@archlinux ~]$ cat /etc/pam.d/login
#%PAM-1.0
auth		required	pam_securetty.so
auth		requisite	pam_nologin.so
auth		required	pam_unix.so nullok
auth		required	pam_tally.so onerr=succeed file=/var/log/faillog
# use this to lockout accounts for 10 minutes after 3 failed attempts
#auth		required	pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog
account		required	pam_access.so
account		required	pam_time.so
account		required	pam_unix.so
#password	required	pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
#password	required	pam_unix.so sha512 shadow use_authtok
session		required	pam_unix.so
session		required	pam_env.so
session		required	pam_motd.so
session		required	pam_limits.so
session		optional	pam_mail.so dir=/var/spool/mail standard
session		optional	pam_lastlog.so
session		optional	pam_loginuid.so
-session	optional	pam_ck_connector.so nox11
-session	optional	pam_systemd.so

Offline

#17 2011-12-28 14:47:46

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

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

ok so you have active = FALSE. that's the problem. it must be TRUE, as well as is-local

paste ~/.xinitrc

Last edited by wonder (2011-12-28 14:48:08)


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#18 2011-12-28 14:49:48

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

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

wonder wrote:

ok so you have active = FALSE. that's the problem. it must be TRUE, as well as is-local

paste ~/.xinitrc

Where does it have to be true?

[sec42@archlinux ~]$ cat ~/.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

exec ck-launch-session dbus-launch --exit-with-session startxfce4
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

Last edited by 42sec (2011-12-28 14:49:59)

Offline

#19 2011-12-28 14:58:48

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

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

drop the if block along with the for and just have in xinitrc only the line exec ck-launch-session startxfce4


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#20 2011-12-28 15:03:41

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

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

wonder wrote:

drop the if block along with the for and just have in xinitrc only the line exec ck-launch-session startxfce4

Ok did that but still same error

[sec42@archlinux ~]$ cat ~/.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

#if [ -d /etc/X11/xinit/xinitrc.d ]; then
#  for f in /etc/X11/xinit/xinitrc.d/*; do
#    [ -x "$f" ] && . "$f"
#  done
#  unset f
#fi

exec ck-launch-session dbus-launch --exit-with-session startxfce4
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

Last edited by 42sec (2011-12-28 15:05:32)

Offline

#21 2011-12-28 15:06:39

TheHebes
Member
From: New England
Registered: 2011-07-07
Posts: 138

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

On another note, I was having the same problem. I found that if you launch your WM in the .xinitrc WITHOUT dbus-launch, instead putting dbus-launch before pcmanfm, it seems to fix the problem
Example .xinitrc

exec dbus-launch pcmanfm --desktop &
exec ck-launch-session startfluxbox

Laptops:
MSI GS60 Ghost
Asus Zenbook Pro UX501VW
Lenovo Thinkpad X120e

Offline

#22 2011-12-28 15:17:35

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

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

TheHebes wrote:

On another note, I was having the same problem. I found that if you launch your WM in the .xinitrc WITHOUT dbus-launch, instead putting dbus-launch before pcmanfm, it seems to fix the problem
Example .xinitrc

exec dbus-launch pcmanfm --desktop &
exec ck-launch-session startfluxbox

Nope same error ;'(
It has no effect at all hmm

Offline

#23 2011-12-28 15:52:29

Psykorgasm
Member
From: England, UK
Registered: 2011-11-24
Posts: 158

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

Do you have gvfs and consolekit installed?

Offline

#24 2011-12-28 15:54:36

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

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

Psykorgasm wrote:

Do you have gvfs and consolekit installed?

Nope installed them and rebooted but I still have the same fucking error I can't believe this what am I doing wrong?

Offline

#25 2011-12-28 15:58:10

Psykorgasm
Member
From: England, UK
Registered: 2011-11-24
Posts: 158

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

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?

Offline

Board footer

Powered by FluxBB