7

Consistently, from the time that I freshly installed Ubuntu 18.04 (about a month ago) the position of my desktop icons - with the exception of the Trash icon - have never been remembered between sessions. They always re-appear aligned vertically to the left of the screen in the same order (not the order in which I place them). I have tried with "Keep aligned" on and off.

The solutions presented here seem quite drastic and the answers are not marked accepted. They refer to older releases. I also do not wish to totally reset the desktop as I have made other configuration changes I wish to keep.

Is there a way of getting Ubuntu to remember desktop icon positions without doing anything that affects the other parts of the desktop?

Output of gsettings list-recursively | grep nautilus

org.gnome.nautilus.window-state sidebar-width 196
org.gnome.nautilus.window-state start-with-sidebar true
org.gnome.nautilus.window-state geometry '650x475+142+27'
org.gnome.nautilus.window-state maximized true
org.gnome.nautilus.window-state start-with-location-bar true
org.gnome.nautilus.compression default-compression-format 'zip'
org.gnome.brasero nautilus-extension-debug false
org.gnome.desktop.notifications application-children ['update-manager', 'org-gnome-software', 'firefox', 'org-gnome-nautilus', 'netbeans-netbeans', 'org-gnome-fileroller', 'org-gnome-terminal', 'megasync', 'gnome-terminal', 'keepassx', 'org-gnome-tweaks', 'gnome-control-center', 'libreoffice-libreoffice', 'libreoffice-calc', 'libreoffice-writer', 'alarm-clock-applet', 'vlc', 'gnucash', 'thunderbird', 'brasero', 'skypeforlinux', 'software-properties-gtk', 'steamforwindows-steamforwindows', 'discord-discord', 'filezilla', 'org-gnome-totem', 'q4wine', 'apport-gtk', 'wine-programs-quicktime-quicktime-player', 'eog', 'wine', 'org-gnome-gedit', 'gnome-shell-extension-prefs', 'gnome-calculator-gnome-calculator', 'gnome-network-panel', 'ubuntu-social-kit-ubuntu-social-kit', 'brave-browser', 'gnome-system-monitor-gnome-system-monitor', 'steam', 'jetbrains-studio', 'clamtk', 'org-gnome-dejadup']
org.gnome.gedit.plugins.filebrowser.nautilus confirm-trash true
org.gnome.gedit.plugins.filebrowser.nautilus click-policy 'double'
org.gnome.nautilus.list-view default-visible-columns ['name', 'size', 'date_modified']
org.gnome.nautilus.list-view default-zoom-level 'standard'
org.gnome.nautilus.list-view use-tree-view false
org.gnome.nautilus.list-view default-column-order ['name', 'size', 'type', 'owner', 'group', 'permissions', 'mime_type', 'where', 'date_modified', 'date_modified_with_time', 'date_accessed', 'recency']
org.gnome.nautilus.icon-view captions ['none', 'none', 'none']
org.gnome.nautilus.icon-view thumbnail-size 64
org.gnome.nautilus.icon-view default-zoom-level 'small'
org.gnome.nautilus.icon-view text-ellipsis-limit ['3']
org.gnome.nautilus.preferences confirm-trash true
org.gnome.nautilus.preferences install-mime-activation true
org.gnome.nautilus.preferences use-experimental-views true
org.gnome.nautilus.preferences always-use-location-entry false
org.gnome.nautilus.preferences default-sort-in-reverse-order false
org.gnome.nautilus.preferences open-folder-on-dnd-hover false
org.gnome.nautilus.preferences show-move-to-trash-shortcut-changed-dialog true
org.gnome.nautilus.preferences executable-text-activation 'ask'
org.gnome.nautilus.preferences mouse-forward-button 9
org.gnome.nautilus.preferences tabs-open-position 'after-current-tab'
org.gnome.nautilus.preferences recursive-search 'local-only'
org.gnome.nautilus.preferences click-policy 'double'
org.gnome.nautilus.preferences show-delete-permanently false
org.gnome.nautilus.preferences default-sort-order 'name'
org.gnome.nautilus.preferences default-folder-viewer 'icon-view'
org.gnome.nautilus.preferences search-view 'list-view'
org.gnome.nautilus.preferences fts-default true
org.gnome.nautilus.preferences show-directory-item-counts 'local-only'
org.gnome.nautilus.preferences show-create-link true
org.gnome.nautilus.preferences show-hidden-files false
org.gnome.nautilus.preferences show-image-thumbnails 'never'
org.gnome.nautilus.preferences thumbnail-limit uint64 10485760
org.gnome.nautilus.preferences mouse-back-button 8
org.gnome.nautilus.preferences bulk-rename-tool @ay []
org.gnome.nautilus.preferences mouse-use-extra-buttons true
org.gnome.nautilus.preferences search-filter-time-type 'last_modified'
org.gnome.nautilus.desktop trash-icon-name 'Rubbish Bin'
org.gnome.nautilus.desktop text-ellipsis-limit 3
org.gnome.nautilus.desktop background-fade true
org.gnome.nautilus.desktop home-icon-visible false
org.gnome.nautilus.desktop trash-icon-visible true
org.gnome.nautilus.desktop network-icon-visible false
org.gnome.nautilus.desktop font ''
org.gnome.nautilus.desktop network-icon-name 'Network Servers'
org.gnome.nautilus.desktop home-icon-name 'Home'
org.gnome.nautilus.desktop volumes-visible true

Output of gsettings list-recursively | grep icon:

org.gnome.shell.window-switcher app-icon-mode 'both'
org.gnome.desktop.interface menus-have-icons false
org.gnome.desktop.interface toolbar-icons-size 'large'
org.gnome.desktop.interface icon-theme 'ubuntu-mono-dark'
org.gnome.desktop.interface buttons-have-icons false
org.gnome.desktop.background show-desktop-icons true
org.gnome.DejaDup.Drive icon ''
org.gnome.nautilus.icon-view captions ['none', 'none', 'none']
org.gnome.nautilus.icon-view thumbnail-size 64
org.gnome.nautilus.icon-view default-zoom-level 'small'
org.gnome.nautilus.icon-view text-ellipsis-limit ['3']
org.gnome.DejaDup.File icon ''
org.gnome.Vino icon-visibility 'client'
org.freedesktop.ibus.panel property-icon-delay-time 500
org.freedesktop.ibus.panel xkb-icon-rgba '#415099'
org.freedesktop.ibus.panel show-icon-on-systray true
org.gnome.nautilus.preferences default-folder-viewer 'icon-view'
org.gnome.shell.extensions.dash-to-dock icon-size-fixed true
org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 36
org.gnome.nautilus.desktop trash-icon-name 'Rubbish Bin'
org.gnome.nautilus.desktop home-icon-visible false
org.gnome.nautilus.desktop trash-icon-visible true
org.gnome.nautilus.desktop network-icon-visible false
org.gnome.nautilus.desktop network-icon-name 'Network Servers'
org.gnome.nautilus.desktop home-icon-name 'Home'

Additional information:

find . '!' -user $USER
./.local/share/gvfs-metadata/home-79a18d9c.log 
./.local/share/gvfs-metadata/home 
./.cache/dconf find: ‘./.cache/dconf’: Permission denied 
./.dbus find: ‘./.dbus’: Permission denied 
./.gvfs find: ‘./.gvfs’: Permission denied
7
  • @DKBose I have added the outputs as requested. Thanks. Feb 23, 2019 at 11:23
  • @DKBose It shows this: ./.local/share/gvfs-metadata/home-79a18d9c.log ./.local/share/gvfs-metadata/home ./.cache/dconf find: ‘./.cache/dconf’: Permission denied ./.dbus find: ‘./.dbus’: Permission denied ./.gvfs find: ‘./.gvfs’: Permission denied Feb 23, 2019 at 12:11
  • 1
    When I run ls -l in my ~/.local/share/gvfs-metadata folder, all the files there are owned by me. What do you see on your system? According to askubuntu.com/a/42989/248158 files in that folder may be written to. I don't know why .local/share/gvfs-metadata/home seems not to be owned by you. Could that be the reason your changes are not saved? If I drag an icon on my desktop to a new location, I can see that .local/share/gvfs-metadata/home is modified.
    – DK Bose
    Feb 23, 2019 at 12:58
  • @DKBose The files are all owned by me except for home and home-79a18d9c.log which are owned by root. Feb 23, 2019 at 13:03
  • 1
    Even home should be owned by you, in my opinion.
    – DK Bose
    Feb 23, 2019 at 13:05

2 Answers 2

6

It's possible that a file recording the position of icons on your desktop cannot be modified due to wrong permissions.

To identify such files, run find . '!' -user $USER.

In your case, the output included ~/.local/share/gvfs-metadata/home. Changing the ownership of this file to you should fix your problem.

Content of ~/.local/share/gvfs-metadata

In general, very few, if any, files and folders in your home folder should be owned by root.

4
  • 1
    This also fixed the problem of desktop icons remaining untrusted and not displaying their proper icon image and app name. Feb 23, 2019 at 13:41
  • I'm very curious how the permissions ended up that way. The only thing I can think of that is only slightly connected is I once opened up nautilus as root. Feb 23, 2019 at 21:50
  • 1
    How you opened nautilus as root and what you did then probably have something to do with it. I can't be more specific than that because after having been bitten once during Ubuntu 11.04, I've avoided using file managers as root.
    – DK Bose
    Feb 24, 2019 at 1:18
  • More reading: askubuntu.com/questions/423040/…
    – DK Bose
    Feb 24, 2019 at 2:50
1

Ubuntu 18.04

When you browse with nautilus as root it is possible (for no reasons) that the file recording the position of icons on your desktop cannot be modified due to wrong ownership. It can happen when you, for example, want to copy the hidden files of your home for new users to keep the configurations or if you want to construct the /etc/skel folder by copying some home folders in it. The concerning file causing this behavior is the 'home' in the hidden .local directory of your home folder which got the wrong ownership (root).

You can solve this problem changing the ownnership back to your username and eventually the file permissions with these commands:

sudo chmod $USER ~/.local/share/gvfs-metadata/home

sudo chmod 755 ~/.local/share/gvfs-metadata/homea

Do not change the ownership of all files in the .local folder because some of them (really few) has to maintain the root ownership. The use of nautilus or others file managers as root is discouraged in favor of the bash terminal although sometimes it is really practical.

When I was answering I have found this related topic if it can be of any use: Ask Ubuntu

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .