! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Automatically mount folders that are configured mount points in thunar_vfs_os...
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Thunar-vfs
Component:
General

Comments

Description Olivier Ripoll 2006-09-13 08:43:47 CEST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: 

Rox-Filer has a very nice feature when coming to mountpoints: it can mount automatically the partition (or the removable device) when opening the folder. fstab contains a list of mountpoints which can be mounted by the user, but are not mounted automatically at boot (with the "user" and "noauto" options). Also removable device may not be mounted when inserted (it is actually desirable when using USB sticks with a laptop, in order to save battery).
Rox knows which directories are actually mountpoints (they are indicated in /etc/fstab, most of them are in /mnt, but you may have others where you want, e.g. in your home directory). Rox also knows if these mountpoints are mounted or not (for the /etc/mtab file is guess). When you open such a folder when it is not mounted, Rox will automatically try to mount it first.

For example, when I insert my USB stick, udev/Hal create a USB_stick directory in /mnt, but it is not mounted (and should not be). When I open this directory, Rox mounts it, then opens it. When I close the rox window, or go up to the /mnt diretory (in other words, when there are no more rox windows opened there), Rox unmounts the volume. Of course, it is possible to enter the folders without mounting them (with the right click menu) or to leave the device mounted when closing the window (Rox asks you), but who wants to open the folder without the device ?

Please note that this has nothing to do with Hal, and that the USB stick used in the example can be replaced by a partition of the hard drive (thus, there is no hotplug event), or a network mountpoint.

Maybe a less confusing description can be found in Rox documentation:
http://rox.sourceforge.net/Manual/Manual/Manual.html#media



Reproducible: Always

Steps to Reproduce:
Comment 1 Benedikt Meurer editbugs 2006-09-13 11:37:02 CEST
The problem with this feature, as with many "features" in ROX, is that it can easily be confusing. It would make sense with spatial mode, but Thunar is navigational in its design and as such you can leave the folder, keep the window open for hours, forget about the "mount thing", close the window and wonder why your gvim is unable to save the file on your USB stick.

What we could however implement, would be the ability to wait for a Thunar window to "terminate". The xfmount4 could be rewritten to do what you need. But even this feature is not as useful as it may seem.

Thunar and xfdesktop provide an advanced media handling system that is not dependent on mount points in the file system. You can mount everything and do not need to care about the mount point (you don't even need to know what a mount point is), just double click the volume, and voila. If you are done with the volume, right-click the volume -> Eject/Umount. Thunar currently displays the full path to the mount point, but that will be fixed in the near future as well.
Comment 2 Olivier Ripoll 2006-09-13 12:12:59 CEST
The unmount feature is less intersting that the mount feature in Rox. What is nice is that if you open a folder which is a mount point but is not mounted, then Rox mount it for you. 1 click instead of right-click-> mount (which I do not have in my Thunar) and then 1 click to open the folder.
This part only does not break the navigational aspect of Thunar: Thunar can look in the fstab and retrieve all the "user" mountpoints. When opening one of such folders, if the mountpoint is not mounted, it could propose to mount it (or just mount it automatically).

At present, Thunar has no way to mount my USB stick or my unmouted partitions. I have to open Rox to mount the partition, an then navigate with Thunar. Not very practical.
Comment 3 Benedikt Meurer editbugs 2006-09-13 12:15:18 CEST
In Thunar, that's exactly one click on the USB drive in the shortcuts/tree pane, no need to navigate to the mount point. Much more convenient than ROX.

If you don't see your USB drive in the side pane, you've probably built Thunar w/o HAL support or hald is not running.
Comment 4 Olivier Ripoll 2006-09-14 08:29:56 CEST
I have hald running. I used the installer to compile Thunar 0.4, and there are no options to build with or without hald support. I will try with the XFCE RC1 installer.

I checked Nautilus and Konqueror on this issue. They provide a possiblity to mount partitions by a "computer:///" place (I do not remember what's the Konqueror name for it). This sounds like what you are describing. To me, this looks like replacing the nice unix feature called mount point by some kind of limited chaotic stuff. There is no possibility to have a clean tree where you decide or know where the partitions are mounted. I wonder how people can then access the files from a file/open window, or a terminal.
Comment 5 Benedikt Meurer editbugs 2006-09-14 12:22:40 CEST
(It's media:/// and system:/// in Konqueror)

But read what I said: Thunar displays removable devices (actually volumes on removable devices) in the side pane (shortcuts or the tree pane). You just click on the node and voila it's mounted and the mount point will be opened. No system:///, media:/// or computer:/// URIs, just one click and done (BTW: Nautilus has copied this behavior from Thunar, so it's available there as well in new versions, tho Nautilus also displays builtin SCSI disks here, which is less useful).

The GtkFileChooser will soon display the same items in the side pane, once the thunar-vfs plugin for GtkFileChooser is completed.

I don't know what you mean by "nice unix feature called mount point" (esp. since this is also available on Windows and other non-Unix derived operating systems), but imagine that most people don't care about "mount points". All they want to do is to access the data on their USB sticks, because they have work to be done. If there's a choice between (a) supporting people at work and (b) exposing nasty implementation details of the operating system, Thunar will also choose (a).

Concerning hal: Before running the installer, make sure that both the hal-storage and the dbus glib devel packages are installed. Otherwise the HAL support will be disabled automatically.
Comment 6 Olivier Ripoll 2006-09-14 13:38:45 CEST
Windows does not have mount points, I think you misunderstand the concept. With mount points, you can use a partition as a folder within another partition. It allows you to have the same /home (or /opt or /usr/local) shared between different installations (each having its own / partition). It allows different users (the members of the family) to share the same mp3 collection, being on one partition, but all can see it on its own desktop or home directory as the "music" folder.
My main use of partitions is to allow a persistent storage of files (e.g. some tar.gz, rpms, or ogg repositories), while creating a new home folder when I install a new version of the distribution.
My / is one partition. Then /usr/local is another partition. /home is yet another one, and /home/oliv/archive another one (oliv being my username). /home/oliv/music is yet another one, etc. I have a few more, but do not mount all of them (for instance, when in Mandriva, I do not mount the Ubuntu partition).

On windows, you can only mount something as a drive letter. It is useless. It is not a unix mount point. The difference is like between windows shortcuts and unix links.
Comment 7 Benedikt Meurer editbugs 2006-09-14 13:51:15 CEST
(In reply to comment #6)
> Windows does not have mount points, I think you misunderstand the concept. With
> mount points, you can use a partition as a folder within another partition.
> [...]
> On windows, you can only mount something as a drive letter. It is useless. It
> is not a unix mount point. The difference is like between windows shortcuts and
> unix links.

C'mon dude, RTFM. You should really get clue prior to posting stupid nonsense.

[x] You want to read about NTFS-Junction-Points.
[x] You want to read about DFS-Junction-Points.

Also, what the hell are 'unix links'? I suspect you wanted to talk about symbolic links. If you want to sound like a 'Unix guru', make your homeworks first.

But back to topic: What could be done is to check whether a directory that should be listed is a configured mount point, that is not currently mounted, and if so, try to mount it first.
Comment 8 Benedikt Meurer editbugs 2006-09-14 14:02:41 CEST
(In reply to comment #7)
> [x] You want to read about NTFS-Junction-Points.
> [x] You want to read about DFS-Junction-Points.

BTW: They are also sometimes called 'reparse points'.
Comment 9 Olivier Ripoll 2006-09-14 14:19:29 CEST
unix links = hard and symbolic links
Old MacOS had aliases and Windows has shortcuts. Unix has links. Shortcuts cannot be followed as "transparently" as links (I do not remember for old MacOS aliases).

I do not want to sound like a unix guru, just a unix user. Sorry if you misunderstood me. Junction points look nice indeed, but they are not covered in my Windows manual, so RTFM would not help. And according to microsoft web site (maybe they are wrong), this is available for Windows 2000 (server, datacenter and profesional edition).

I have found the dbus-glib devel packages (>0.34, LE 2006 is 0.23) on the web at seer of souls. I hope the libhal-devel is the one you mean by hal-storage, because Mandriva does not have such a package as hal-storage or libhal-storage.

But back to topic: Yes, this is indeed what I would like to see. Let's forget about the unmonting.
Comment 10 Benedikt Meurer editbugs 2006-09-14 14:27:45 CEST
(In reply to comment #9)
> unix links = hard and symbolic links
> Old MacOS had aliases and Windows has shortcuts. Unix has links. Shortcuts
> cannot be followed as "transparently" as links (I do not remember for old MacOS
> aliases).

NTFS supports up to 1024 (hard) links per inode. Symlinks are possible via junction points (in fact even MS-DOS had that via SUBST, tho that was limited to redirecting volume labels to folders). It's a redirection in the VFS layer, just like on Unix/Linux.

> I do not want to sound like a unix guru, just a unix user. Sorry if you
> misunderstood me. Junction points look nice indeed, but they are not covered in
> my Windows manual, so RTFM would not help. And according to microsoft web site
> (maybe they are wrong), this is available for Windows 2000 (server, datacenter
> and profesional edition).

IIRC, junction points work only with NTFS 5 and above. So, yes, that would be Windows 2000.

> I have found the dbus-glib devel packages (>0.34, LE 2006 is 0.23) on the web
> at seer of souls. I hope the libhal-devel is the one you mean by hal-storage,
> because Mandriva does not have such a package as hal-storage or libhal-storage.

You'll need HAL 0.5.x. Dunno if Mandriva has that, esp. since D-Bus 0.23 looks rather outdated. Be aware that updating D-Bus from 0.2x to 0.3x or above may break other applications, because 0.2x to 0.3x was a rather big jump. Somebody announced Xfce 4.4 Cooker packages on the xfce mailinglist some time ago, maybe that'd help.

> But back to topic: Yes, this is indeed what I would like to see. Let's forget
> about the unmonting.

Ok, adjusting title and component.
Comment 11 Benedikt Meurer editbugs 2006-11-04 00:46:50 CET
Moving to 1.0.0final.
Comment 12 Jarno Suni 2006-11-04 11:08:12 CET
(In reply to comment #10)

> Ok, adjusting title and component.

Excuse me, but how does thunar_vfs_os_scandir() relate to fstab?

Comment 13 Benedikt Meurer editbugs 2006-11-04 11:42:45 CET
It has nothing to do with fstab. The method is called when a folder is entered.
Comment 14 Benedikt Meurer editbugs 2006-11-05 21:02:02 CET
*** Bug 2499 has been marked as a duplicate of this bug. ***
Comment 15 Mathias Brodala 2006-11-05 22:31:47 CET
It seems Thunar already offers an option (which I never knew of before reading the comments here) to mount plugged media. Up until now I always mounted them via Nautilus, now I can drop that one.

But another issue: what could be done so that I can mount a remote directory in Thunar via SSHFS? I already have an entry in my /etc/fstab and I can mount the directory via terminal. But I’d like to have a graphical alternative so that I won’t have to launch a terminal everytime I want to mount that directory. And for this, Thunar would have to ask for my password.

Could that be implemented? (Somehow.)
Comment 16 Benedikt Meurer editbugs 2006-11-05 22:33:42 CET
That's on todo. But first there's Xfce 4.4.0.
Comment 17 Mathias Brodala 2006-11-05 22:36:28 CET
> That's on todo.

Great to hear that.

> But first there's Xfce 4.4.0.

No problem here.
Comment 18 Olivier Ripoll 2007-01-23 12:34:08 CET
Just to say that I have found a workaround the problem of mounting un-mounting existing partitions: I created to "actions" (like the "open terminal here") that work only on directory and try to mount/umount them. If they are in the fstab, they are mounted, if not, well, nothing happens.
Comment 19 Jarno Suni 2007-01-23 15:01:35 CET
(In reply to comment #18)
Thanks for the hint.
Comment 20 Nick Schermer editbugs 2014-12-03 09:19:17 CET
Close bug reports of archived products.

Bug #2312

Reported by:
Olivier Ripoll
Reported on: 2006-09-13
Last modified on: 2014-12-03
Duplicates (1):
  • 2499 Automagically offer option to mount mountpoint

People

Assignee:
Jannis Pohlmann
CC List:
3 users

Version

Version:
unspecified

Attachments

Additional information