Registered Member
|
So when I plug in my USB drive, I can click on the little icon in the device notifier and it will mount the drive. It doesn't ask for a password or anything.
However when I try to mount the drive from the command line using something like
it says I have to be root to do so. What command is KDE using that doesn't require a sudo? Something similar happens when I unmount it and I'd like that command too. Thanks in advance. [Edit: Thanks wolfi323 that works perfectly]
Last edited by jistanidiot on Mon Apr 29, 2013 6:42 pm, edited 1 time in total.
|
Manager
|
if the drive is always the same drive you could add an entry to /etc/fstab with the user and noauto options then you'd just need to do
you can use the device notifier settings to automatically mount the drive without having to click, look at the removable devices -> device overrides section |
Registered Member
|
There is no single command. It's stack of udev, udisks and polkit, maybe among others. I admit that I do not fully understand it, so I can not explain the details.
If you are interested, you may take a look at Arch wiki article about udisks: https://wiki.archlinux.org/index.php/Udisks#Udisks .You will find example scripts that ease work with udisks there. Most (all?) of them should be generic enough to work on other distributions as well, at least as long as version numbers match.
Best regards
Mirosław Zalewski |
Registered Member
|
Depends on which version you are using.
You can mount drives either with
or
|
Administrator
|
One may also use the "solid-hardware mount <udi>" command to mount a disk drive, although that requires retrieving the matching UDI first.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Perfect! That is exactly what I was looking for (one can get the udi by using `solid-hardware list`) |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]