zunzuncito

The file manager I’m using on my Plasma 6 system, Dolphin, has built-in support for remote folders via the KIO framework. Where before I was relying on sshfs mount points in /etc/fstab, I decided to try out the Dolphin way and set up my remote devices using its sftp backend.

After a couple of days now I can say that this works beautifully… until you want to access the remote device on something that does not interface with KIO. This is especially important for me (and others) since I want to be able to browse networked filesystems via my terminal and have the ability to directly open a terminal in that location through Dolphin, something which is not possible with the KIO backend.

So in the end I went back to mount points in /etc/fstab. One small problem remained, however, and that was the way those mount points were displayed within Dolphin. There seemed to be no way to customize a mount point’s name or icon, leading to an annoyingly long /home/wolf/net/hosts/coleridge entry in the Devices section of Dolphin’s places panel.

I couldn’t find any help in fstab(5), and indeed I had never heard of a way to give a mount point a “pretty name”. However, after a bit of searching, I found people offhandedly mentioning the x-gvfs-name option. Some more searching revealed that nobody seems to care about documenting these features, but I was finally able to find an authoritative source within gvfs itself.

Happily there’s not only x-gvfs-name but also support for custom icons through x-gvfs-icon. So, if you want your file manager to display a pretty name and icon for one of your mount points, simply add the following to the relevant entry in /etc/fstab:

x-gvfs-name=My%20Device,x-gvfs-icon=network-server

This should be possible at least on GNOME and KDE desktops. I imagine a bunch of other environments and programs silently support this behaviour as well.

A screenshot of Dolphin, KDE's
file manager, showing the user's home directory with the places panel on the
left side containing various categorized entries. The entries below the Devices
category read flood, demeter, coleridge, and OnePlus 12, each with its own
pretty name and relevant icon.
Dolphin displaying pretty names and icons in the Devices category