Jump to content
  • 0

How to mount removable media


hick518
 Share

Question

What's the recommended way to handle mounting of USB sticks and such?  I'm running LXDE with the pcmanfm file manager.  It asks for the root password any time I try to mount a USB stick.  Do I need to create a rule for policykit, or is there some higher level setting I can choose?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Actually, I use udevil and spacefm on a machine I use at work.  But I find that music players such as Clementine, Quodlibet, and Guayadeque do not recognize a usb stick device as removable media if it's mounted in such a way.  That means I can't drag/transcode songs to a portable player.  Do you know any way of addressing that issue?

Link to comment
Share on other sites

  • 0

I've no oxperience about lxde; but in KDE the usbkeys or others are mounted in /run/media/username/

 

now I make an experiment installing lxde :)

I wil tell to you :)

 

PS: very strange..... either in lxde than in KDE reduires root password to have access at the usbkey or other "pluggable" devices (i'm in plugdev and usb  and cdrom,cdrw group :|)

 

few time ago ... there wasn't the request of root password..... may be a little bug ? or same wrong impostation ?

 

This is not the first time that there is this trouble..... it seems the "anytime" the policy changes @_@

Sometimes more permissive ... sometimes more restrictives ...... Boh :(

 

I don't know Sorry and excuse me ... :(

Link to comment
Share on other sites

  • 0

Lxde uses udisks2 with console-kit/polkit enforcing user permissions.
If user console-kit session is active = TRUE then user can mount/eject usb flash drive without being asked for the password.
This works on my system with no configuration using a display manager such as lxdm,slim,or lightdm.

Output after using a login manager:
ck-list-sessions
Session1:
unix-user = '1000'
realname = '(null)'
seat = 'Seat1'
session-type = 'x11'
active = TRUE
x11-display = ':0.0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = TRUE
on-since = '2015-09-12T15:32:33.676540Z'
login-session-id = '1'

My .xinitrc to login from console followed by startx for xsession:

rj@funtoo ~ $ cat .xinitrc 
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session startlxde

Output after console login followed by startx:
rj@funtoo ~ $ ck-list-sessions
Session1:
unix-user = '1000'
realname = '(null)'
seat = 'Seat1'
session-type = ''
active = FALSE
x11-display = ''
x11-display-device = ''
display-device = '/dev/tty1'
remote-host-name = ''
is-local = TRUE
on-since = '2015-09-12T20:28:56.582349Z'
login-session-id = '1'
idle-since-hint = '2015-09-12T20:29:32.526813Z'
Session2:
unix-user = '1000'
realname = '(null)'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = '/dev/tty1'
remote-host-name = ''
is-local = TRUE
on-since = '2015-09-12T20:29:05.207903Z'
login-session-id = '1'

Udisks2 default polkit policies to mount/umount removable media:
implicit active: yes from policies, if ck-list-sessions outputs active = TRUE then password is not required.

Mount removable media,usb flash drives:
pkaction --verbose --action-id org.freedesktop.udisks2.filesystem-mount
org.freedesktop.udisks2.filesystem-mount:
description: Mount a filesystem
message: Authentication is required to mount the filesystem
vendor: The udisks Project
vendor_url: http://udisks.freedesktop.org/
icon: drive-removable-media
implicit any: auth_admin
implicit inactive: auth_admin
implicit active: yes

Eject/ unmount removable media flash drives:
pkaction --verbose --action-id org.freedesktop.udisks2.eject-media
description: Eject media
message: Authentication is required to eject media
vendor: The udisks Project
vendor_url: http://udisks.freedesktop.org/
icon: drive-removable-media
implicit any: auth_admin
implicit inactive: auth_admin
implicit active: yes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...