Gnome file places

Hi there, I’ve a minor but annoying issue. My “daily” user, has a home directory, where some standard folder are symlinks to folder on an external disk, with a bigger partition.

For example /home/daily/Videos is link to /run/media/daily/Media/Videos, where /run/media/daliy/Media is a extern disk .The only exception is /home/daily/Pictures that remained a normal folder.

For whatever reason when I login and open gnome file manager, in “Places” I only see “Pictures”. On looking around, I found somewhere that “Places” are set up in .config/user-dirs.dirs.

I easily edit/update it, then “sudo xdg-user-dirs-update” and I can then see under “Places” all my standard home folders. The annoying part is that on every logout/login cycle, that file is overwritten. Even if I try to “protect” it with a chown root:root and chmod 444.

How to avoid that file being overwritten, or is there a “template” that at login time, gnome picks up and put in the user .config???

Suggestions welcome! :slight_smile:

Thx

It’s because /run is a tmpfs, so the target of the symlink does not always exist. Either choose a more suitable mountpoint — if they are files owned by your user, then the mountpoint should be under your home directory itself — or better still, instead of symlinks, mount the external disk to ~/Videos directly.

Please read through the following tutorial. :point_down:

Hi Aragorn,
man thanks for your kind reply. I’m trying to follow you hints, and I read (as much I can understand) the mount manpage. I’m facing some difficulties. In order:

  1. the filesystem I’m trying to mount is NTFS. Is where my documents are, so that I can mount on windows/osx/linux whatever I pick to use
  2. I created the mount point on my home dir
  3. Attempt a: with fstab option like defaults,user,noauto,nofail. If I launch mount command as normal user I get:
    Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated FUSE support and make it setuid root. Please see more information at https://github.com/tuxera/ntfs-3g/wiki/NTFS-3G-FAQ
  4. attempt b: I removed the option “user” in the fstab line, and launch the mount as root. It is mounted, but ownership is root (all files and dir are owned by root)

I’m OK having root to mount it (I put the entry in fstab), but I need my normal user to have ownership of the mounted filesystem (files and dirs): How can I do that? Also considering NTFS is not a posix fs???

Many thanks!

In the mount options for the filesystem in /etc/fstab, include “uid=1000,gid=1000”. This will give ownership to your user. :wink:

You should be able to implement the changes without rebooting if you issue the command… :point_down:

sudo mount -o remount -a

Thanks! It worked out.
Linux=one never stops learning new tricks :laughing:

1 Like

Just note: Since fstab is used now, there will be a dependency error when you start the system, thus you will be greeted with an emergency console when the disk is not there. Just saying…

Using udisks2 as you mentioned is a safer way to handle removable disks. You just have to click the button on the left on the file manager and the symbolic link will work then… :man_shrugging:

If the line in /etc/fstab has the mount option nofail, there should be no issues. :wink:

Hi Megavolt,

  1. I used the options noauto nofails. I understood that would be enough to progress with normal boot, if disk is not available. Am I wrong?
  2. with udisks2 I assume you mean the normal “mount” using the file manager UI (small eject button). I had that set up, but it kicked off the first post of this 3d … Next reboot I’ll check if Aragorn solution works. If not (e.g file manager still with fewer “Places” entries), I’ll rollback to out-of-the-box set up :face_with_raised_eyebrow:
1 Like

nofailsnofail

Hi All,
so I just reboot and opened files. See image below: no luck. After “Home”, I should see Documents, Downloads, Music, Videos. Also my .config/user-dirs.dirs has been overwritten. Seems like gnome notice that are symlinks, and remove those entries, overwriting user-dirs.dirs.
Very strange. @Nachlese : it was a typo, but fstab is correct :slight_smile:

Hi
I close the topic. Aragorn solution works, but with some limitations as said by Megavolt. In short in fstab if I use “auto”, extern partition are mounted at boot and then Places are set right.
Problem is if I detach the disk, boot hangs. If I use noauto, extern partition are not mounted at boot and I’d go back to first message here.

:woozy_face:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.