Problem: I have some bookmarks in Nautilus (v3.8.2) that point to folders that are part of a Truecrypt volume that I mount after logging into the system. The problem is that as this happens after logging in, Nautilus during the session start cannot find them and thus ignores them so they don't appear in the left panel.

Workaround #1: I can open the Nautilus' bookmarks editor, rearrange the bookmarks back and forth and Nautilus reloads their list in the left panel. However, it's annoying to do it manually all the time.

Workaround #2: I can kill Nautilus as suggested in another question and when I start it again, it shows all the bookmarks. Unfortunately this requires opening Nautilus because after killing it, all the desktop icons disappear.

QUESTION: Is there some other way I can force this reload? Something I could incorporate into a bash script and make it happen automatically few minutes after the session start.

Note: Please, don't suggest use of another file manager. I know that for example Nemo doesn't have this problem but this question is about finding solution for Nautilus.

  • How about a startup script that watches the mount point of the encrypted volume and restarts Nautilus?
    – muru
    Jul 17, 2014 at 11:01
  • Yes, that would be good. It seems you added your comment at the same time as I edited my question adding workaround #2. It's the "restart Nautilus" that doesn't seem to be easy.
    – tmt
    Jul 17, 2014 at 12:01
  • xrefresh works great on 22.04. Thanks! May 21, 2022 at 18:41

1 Answer 1


Restarting nautilus is fairly easy:

nautilus -q
nautilus -n &

Unfortunately sometimes this sequence of commands doesn't work, probably due to some race condition. And so we might have to do a pkill or killall.

To watch the mount point directory of the encrypted volume, you can poll a file within it:

while sleep 10s; do
    if [[ -f $FILE ]]; then
        pkill nautilus # or nautilus -q
        nautilus -n &

I mistakenly assumed that inotify could be used, but it can't since mounting is involved.

  • Killing Nautilus works fine. :-) It's the starting again that doesn't seem to work. It hangs with the message "Could not register the application: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)"
    – tmt
    Jul 17, 2014 at 12:40
  • Wait a second... I have now been playing with it and it actually sometimes works and sometimes doesn't. It always produces some warning/error messages and it never exits for some reason but it does start nautilus half of the time.
    – tmt
    Jul 17, 2014 at 12:48
  • @cascaval Ah. In the system in which I tested, it always gave an error message similar to that. Does forcing a sequence between the kill and start change things? nautilus -q && nautilus -n?
    – muru
    Jul 17, 2014 at 13:13
  • No, that doesn't change anything. Sometimes it fails with the error message I already mentioned, sometimes it works while producing other messages.
    – tmt
    Jul 17, 2014 at 13:25
  • 1
    Oh, alright, that's good then. In my case I'm checking for a bookmarked directory inside the mounted volume, so the check would return true only if the volume is mounted. Anyway, let's leave this finally. Thanks again for your support!
    – tmt
    Jul 18, 2014 at 9:48

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.