You are not logged in.
Pages: 1
hey!
Since e17 has desktop icons support now, i wonderd how to make it automount with a icon showing up when a usb device is plugged in, for example. I have tried to start kde(mod) in background, which works just well, but then i have kdesktop(?) running, on which i cant use the e17-menu and can't change desktop with simple mouse scrooling (though it works with ALT+scrool). It isnt good for the resources of my old laptop, too (and takes about 20s to start ).
Has anyone tried a similiar thing already?
Or will i have to do some scripting, moving .desktop files or so, with autofs? ivman?
Would be very nice if someone could help me.
Thanks
MyR
Offline
Ok, this post is currently the first result if you search for "e17 automount" in google (damn).
What i tried is: make a simple udev rule for usb-storage devices.
It's an ugly and unclean solution, be warned, and post a good alternative, if you can.
udev rule is somthing like:
# automount usb-devices and link icons to ~/Desktop
KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usbhd-%k", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usbhd-%k", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/ln -s /media/usbhd-%k /mnt/usbhd-%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="swap", RUN+="/bin/swapon /dev/%k", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o users,rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o users,rw,noauto,noexec,nodev,noatime /dev/%k /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/ln -s /home/$user/.Desktop/disk.desktop /home/$user/Desktop/%k.desktop", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rm -f /home/$user/Desktop/%k.desktop"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
The Problem is: you'll have to unmount the device maually (pumount /dev/usbhd-...).
Any hints, suggestions etc. are welcome,
MyR
(Edit: looks like ...)
Last edited by Mhyrraner (2007-06-23 19:27:49)
Offline
Hi,
nice work, but you could just use the already in e integrated automount feature
You have to use a recent cvs version and compile e_dbus before e itself to get this magic feature enabled ^^
Screenshot: http://img503.imageshack.us/img503/1348/screentz0.png
-A big e-fan
Last edited by Matt (2007-06-23 18:51:41)
Offline
Ha!
I've been waiting for something like this
Thanks a lot!:)
MyR
Offline
np, support for that is in e since 16.06.
Offline
Pages: 1