This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to automount and unmount USB stick?

Tags: None
(comma "," separated)
User avatar
pavel
Registered Member
Posts
134
Karma
1
OS
In KDE3 the USB stick was mounted automatically. And I could umount it by using "Removable devices" applet.

Now, when I insert stick into USB it appears in the device notifier. And only operation allow to me is to open the disk in Dolphin. As for me, I don't like using Dolphin or Konqueror: I prefer Midnight Commander. Stick is mounted only after opening it through Dolphin. After, I am to close Dolphin and go to MC.

I have not found any way to unmount or safely remove USE stick in KDE 4 under non-root user. That is why I have to use console command "sync" before USB stick removal. It is very uncomfortable for most users.


pavel, proud to be a member of KDE forums since 2008-Dec.
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
pavel wrote:In KDE3 the USB stick was mounted automatically. And I could umount it by using "Removable devices" applet.

Now, when I insert stick into USB it appears in the device notifier. And only operation allow to me is to open the disk in Dolphin. As for me, I don't like using Dolphin or Konqueror: I prefer Midnight Commander. Stick is mounted only after opening it through Dolphin. After, I am to close Dolphin and go to MC.

I have not found any way to unmount or safely remove USE stick in KDE 4 under non-root user. That is why I have to use console command "sync" before USB stick removal. It is very uncomfortable for most users.


Hi
I can only suggest to use autofs to mount your device. You can set a time out to unmount the device after some time of no activity. This seems a nice howto:
http://freespace.sourceforge.net/guidod ... utofs.html
But I think in SuSE linux you can use yast to activate it.
David

Last edited by dcrabs on Mon Jan 05, 2009 8:27 am, edited 1 time in total.


dcrabs, proud to be a member of KDE forums since 2008-Oct.
User avatar
pavel
Registered Member
Posts
134
Karma
1
OS
dcrabs wrote:I can only suggest to use autofs to mount your device. You can set a time out to unmount the device after some time of no activity.


I use autofs very frequently but for mounting network resources. But I don't think it is a good idea to wait for timeout before unplugging the usb stick. Very often I need USB stick to be unmounted immediately after I wrote something on it. I don't want to wait a lot of time before unplugging... :-(


pavel, proud to be a member of KDE forums since 2008-Dec.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You could still use the eject button in the Device Notifier plasmoid to eject the USB Drive, which will sync and unmount it safely. You do not have to use Dolphin for this.

Device actions appear to have been added at some point in the lead up to 4.2, however it still forcibly uses Dolphin ( and must be triggered by clicking on the device in the device notifier plasmoid ). I hope this is the beginning of the return of this functionality to KDE 4.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
pavel
Registered Member
Posts
134
Karma
1
OS
pavel wrote:I have not found any way to unmount or safely remove USE stick in KDE 4 under non-root user. That is why I have to use console command "sync" before USB stick removal. It is very uncomfortable for most users.


My friend told me how to unmount the USB sticks:
Click on the Device Notifier applet, and move you mouse cursor over the mounted USB device. Then small icon of unmount action shoul appear, if device have been mounted. The simple click on the icon should unmount USB stick.

Thanks to Username (it's his nick)

But the problem with mounting usb sticks without dolphin remains


pavel, proud to be a member of KDE forums since 2008-Dec.
User avatar
qdlaty
Registered Member
Posts
40
Karma
0
Why don't search for udev rules that will automatically mount certain type of USB devices whenever you plug them to system?

http://www.kernel.org/pub/linux/utils/k ... /udev.html

will tell you how to write your own rules for udev


Chaos, panic and disorder - my work here is done.
User avatar
pavel
Registered Member
Posts
134
Karma
1
OS
qdlaty wrote:Why don't search for udev rules that will automatically mount certain type of USB devices whenever you plug them to system?

As far as I know (I may be wrong), udev does just mounting the device. But to be used properly by me, it should be owned by me. Can Udev know who am I when mounting the USB stick?
qdlaty wrote:will tell you how to write your own rules for udev

If you can, please help me to do this. But... I can do such a thing... ordinal users cannot :-(


pavel, proud to be a member of KDE forums since 2008-Dec.
User avatar
beermad
Registered Member
Posts
104
Karma
0
OS
pavel wrote:
qdlaty wrote:Why don't search for udev rules that will automatically mount certain type of USB devices whenever you plug them to system?

As far as I know (I may be wrong), udev does just mounting the device. But to be used properly by me, it should be owned by me. Can Udev know who am I when mounting the USB stick?
qdlaty wrote:will tell you how to write your own rules for udev

If you can, please help me to do this. But... I can do such a thing... ordinal users cannot :-(


This is something KDE3 did so much better than KDE4.
Plug in device, pop-up appears asking how you want it handled, choose action, optionally tell KDE3 to perform that action every time it sees that particular device.

...and easy to write shell scripts to run as part of the action.


User avatar
pavel
Registered Member
Posts
134
Karma
1
OS
beermad wrote:Plug in device, pop-up appears asking how you want it handled, choose action, optionally tell KDE3 to perform that action every time it sees that particular device.

I try to delete KDE3 from my computer. I do it slowly, but straight. I don't want to do something with KDE3.


pavel, proud to be a member of KDE forums since 2008-Dec.
User avatar
sayakb
Administrator
Posts
1973
Karma
12
OS
For the automount, try Add widgets -> Install new widgets -> Download new plasma widgets -> and install -- New device notifier with automount


User avatar
beermad
Registered Member
Posts
104
Karma
0
OS
LinuxIsInnovation wrote:For the automount, try Add widgets -> Install new widgets -> Download new plasma widgets -> and install -- New device notifier with automount


Does that widget allow configuration of where the device is mounted? That's an annoyance with the other automounter - mounting it and opening it with Dolphin's all very well, but as I don't use file managers and want my devices mounted where I want them mounted, it's not much use to me. Apart from popping up to tell me when the device is ready.


User avatar
pavel
Registered Member
Posts
134
Karma
1
OS
LinuxIsInnovation wrote:For the automount, try Add widgets -> Install new widgets -> Download new plasma widgets -> and install -- New device notifier with automount


Thanks, this plasoid does the automounting job. But I could not installed from internet. So, I had to download it and compile by hands


pavel, proud to be a member of KDE forums since 2008-Dec.
sbandeira
Registered Member
Posts
1
Karma
0
OS
Looks like usbmount is playing a part here. It is mounting the usb automatically before KDE has a chance. Since it mounts as root, ordinary users cannot umount it. In Debian (not sure about other distros), just edit /etc/usbmount/usbmount.conf and change:

ENABLED=1
to
ENABLED=0

save the file, unplug your usb drive and plug it in again. No need to reboot.
HTH.
User avatar
tdfischer
KDE Developer
Posts
6
Karma
0
OS
4.4 has automatic device mounting now :)
fbt
Registered Member
Posts
48
Karma
0
OS
As an aside, you can mount and unmount flashdrives from the Places panel in Dolphin. This is something that is easier to navigate than KDE 3.5 and Konqueror.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]