[SOLVED] Xfce4.10 automount disk on desktop on login
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
Xfce4.10 automount disk on desktop on login
Hi hope some one can help.
I've got a small but annoying problem with xfce4.10, when I login the usb disks I have plugged in appear on the desktop but unmounted which means I have to open nautilus to make them available, not a major problem but I have a launcher in the task bar that goes to a number of places on the disk which I use frequently, if the disk is unmounted I get an error.
I have tried adding the disk to fstab but then it doesn't appear on the desktop!
I can live with this problem but a solution would be nice
Click here to see the post LQ members have rated as the most helpful post in this thread.
Yes, but not with any easy solutions. I haven't updated to xfce-4.10 so can't give you any advice on it as I simply don't know how it works yet, but one possible solution would be to look at setting up automount/autofs, but that might be slightly more involved than you may be looking for.
BTW, wasn't ignoring you, just didn't want to take you off the zero reply list as I didn't have a solid answer.
There's a GUI utility called palimpsest in the gnome-disk-utility package that can set this up. The only problem is that it requires GTK3, which you might not have installed. Give me an hour and I'll build it and see what you can add to your /etc/fstab to do what you want.
If you do want the SlackBuild for it, I'll post it.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Original Poster
Rep:
Quote:
Originally Posted by cwizardone
A right click on the icon doesn't show you a mount option?
Mounting via clicking on the icon is not the problem - As I said in my 1st post the icon is there on the desktop but greyed out ( ie not mounted ) if I try to goto to a folder via the launcher in the panel I get an error message saying the disk is not mounted (obviously) , what I want is the disk mounted at login so I can either double click on the icon OR select the launcher.
Quote:
Originally Posted by apeitheo
... /dev/sdb1 /mnt/sdb1 auto nosuid,nodev,comment=x-gvfs-show 0 0 ...
Mounting in fstab as I stated works , the disk gets mounted in the right place and can be accessed via the launcher but does NOT appear on the desktop so is not an option.
I'm trying to get AWAY from gnome not add more gnome dependencies so please no suggestions that include gtk3/gnome.
This has to be a xfce native solution
apeitheo thanks for the offer but I am quite capable of compiling/installing my own software , please don't take that the wrong way
P.S.
I'm NOT anti gnome ( I use nautilus and gedit ) I just don't want to add loads of gnome dependencies.
Last edited by Keith Hedger; 05-29-2012 at 07:00 AM.
Go back a few directories to find the i486 version.
Also, if you haven't already done so, be sure to properly setup "removeable drives and media" in the settings menu.
Please don't take this the wrong way as I am asking for help but do you not read the posts? or the info about the poster? it quite clearly states that I am using slackware64 so why would I want to use a i486 version? and I have clearly stated that I wish to get away from gnome.
I have also stated that mounting the drives is NOT the problem so yes I do have "removeable drives and media" set up properly.
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,085
Rep:
Yes. I read your post and you said,
Quote:
Originally Posted by Keith Hedger
...appear on the desktop but unmounted which means I have to open nautilus to make them available...
I'm not a fan of gnome either and thought it odd that you would use nautilus. Isn't nautilus the Gnome default file manager? That has to require more gnome dependencies than the their simple disk utility?
Whatever. Good luck.
Mounting in fstab as I stated works , the disk gets mounted in the right place and can be accessed via the launcher but does NOT appear on the desktop so is not an option
The fstab option comment=x-gvfs-show is supposed to show it on the desktop regardless if it's already mounted or not. However, it doesn't seem to work for whatever reason.
That's all the gnome-disk-utility does--modify the fstab.
I've been working on this on and off all day, and it seems that it's not going to work no matter what I do. I've tried various fstab configurations, udev rules, and so on--all without success. The closest I've gotten is that it shows up on the desktop, mounted, at boot, but when you try to access it, you get "permission denied."
There is a --mount-options flag for the udisks command, but selecting the option of 'user' isn't allowed apparently. udisksctl works but then the icon doesn't appear on the desktop.
I don't know what else to try. Sorry I couldn't help any further. I don't know if it's possible without patching the code.
I think I finally figured it out. Make sure your /etc/fstab doesn't have an entry for the USB device and add this command to start when XFCE loads (in settings->session and startup->application autostart):
Code:
udisks --mount /dev/sdb1
Replace /dev/sdb1 with whatever your USB device is, and it should work on restart (hopefully).
While not necessary, if you want to change the names/icons of the USB devices that show up on your desktop, you can create a udev rule for each device. For example, in /etc/udev/rules.d/90-random-rules.rules:
Code:
SUBSYSTEM=="block", ENV{ID_VENDOR}=="Memorex", ENV{UDISKS_NAME}="USB Hard drive"
Good luck. If the above works, please mark this as solved.
I also just found out why x-gvfs-show wasn't working. You need to recompile util-linux (>= 2.21.1) with the --enable-new-mount flag. Otherwise 'mount' doesn't like the x-* fstab options. Once you do this, it's as simple as adding this to your fstab:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.