8

Where are these special URIs used in Nautilus defined in Ubuntu?

recent:///
trash:///
x-nautilus-desktop:///
computer:///
burn:///

These can instantly open special locations in Nautilus by typing them in the path bar.

And why doesn't these work when I open Nautilus as root (is first time when I see that root doesn't have privileges to do something)?

7
+100

EDIT After doing some more digging I found that you can launch nautilus as root and get access to the special URIs by using dbus. The command would be

sudo dbus-launch nautilus

And then the URIs are all available. To be honest I am not 100% why this works but some of the original information I found below may still be helpful.


The reason those URIs exist is because Nautilus uses a virtual file system called Gnome Virtual File System (gvfs) which is built on top of another virtual file system called FUSE. Specifically those URIs are configured in the /usr/lib/gvfs/ directory named gvfsd-*. These are binary files so don't try and edit them.

When you mount a Samba share using Nautilus it uses the gvfsd-mount command (stored in /usr/bin) to mount the share you specify. The share is then mounted in /run/user/<UID>/gvfs/ where is your user id (typically 1000 for single user systems).

As for root being able to use these URIs, Ubuntu, and I'm assuming other distributions, configures fuse so that root cannot use the virtual file system for security reasons. You'll notice in the /run/user folder there is no 0 directory for the root user. The /etc/fuse.conf file by default is not configured to allow the root user access. This means that if your user mounts a share even the root user cannot view the share without configuring Fuse to allow it.

I have not actually tested giving root access to the Fuse file system or special URIs but you may have luck configuring it as described in this link or reading through the Fuse man page.

Sorry for the RTFM answer, but I couldn't find a definitive solution and it depends on what version of Ubuntu you are on as some of the directories/commands changed in recent versions.

  • Thank you for the good information. Any idea why x-nautilus-desktop is not defined/configured in /usr/lib/gvfs/ and whre somewhere else could be? I use Ubuntu 13.10, there is no file called gvfsd-x-nautilus-desktop in /usr/lib/gvfs/, but still this URI (x-nautilus-desktop:///) is working. Starting from this, maybe I could find a way to define a new URI. This is my final target... – Radu Rădeanu Nov 14 '13 at 7:27
  • @RaduRădeanu I looked around but could not find a file or reference to the x-nautilus-desktop:/// URI. I couldn't find any files with that name which makes me suspect it's not a modular component like the other URIs and may be hard coded in gvfs or fuse. I'm not much of a developer but you may want to check out the gvfs source code. – Rothgar Nov 16 '13 at 8:18
  • Ok, thanks again. I will accept your answer, but please, if you find something new in this sense, just let me know... – Radu Rădeanu Nov 16 '13 at 8:25
1

Not much but here's something for everyone:

At terminal or by Alt + F2 :

gksudo dbus-launch nautilus computer:///

On a root system you don't need "gksudo" or "dbus-launch"

Some examples:

computer:/// - objects for each mounted device, plus the network
network:/// - available networks to browse
burn:/// - a virtual folder for burning data CDs/DVDs
smb:/// - available windows/samba network resources
x-nautilus-desktop:/// - desktop objects and icons
file:/// - local files
trash:/// - local trash directory
themes:/// - displays all the themes that are available in the GNOME Desktop
fonts:/// - shows fonts
recent:/// - shows recent files

On the other hand in this site shows how to create an URI for your script or program that works on firefox and gnome. There's a pretty cool example script that you can use as reference depending on your need.

Integrating a new URIs scheme handler to Gnome and Firefox

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.