会话之间无法记住桌面图标位置

会话之间无法记住桌面图标位置

自从我刚刚安装 Ubuntu 18.04(大约一个月前)以来,桌面图标(垃圾图标除外)的位置从未在会话之间被记住过。它们总是以相同的顺序(而不是我放置它们的顺序)垂直对齐地重新出现在屏幕左侧。我尝试过打开和关闭“保持对齐”。

提出的解决方案这里看起来相当激进,而且答案没有被标记为已接受。它们指的是较旧的版本。我也不希望完全重置桌面,因为我已经进行了其他希望保留的配置更改。

有没有办法让 Ubuntu 记住桌面图标的位置,而不做任何影响桌面其他部分的事情?

输出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

输出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'

附加信息:

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

答案1

记录桌面图标位置的文件可能由于权限错误而无法修改。

要识别此类文件,请运行find . '!' -user $USER

在您的情况下,输出包括~/.local/share/gvfs-metadata/home。将此文件的所有权更改为您应该可以解决您的问题。

~/.local/share/gvfs-metadata 的内容

一般情况下,您的文件夹应归

答案2

Ubuntu 18.04

当您以 root 身份使用 nautilus 浏览时,可能会(毫无理由地)由于所有权错误而无法修改记录桌面图标位置的文件。例如,当您想复制主文件夹中的隐藏文件以供新用户保留配置时,或者当您想通过复制其中的一些主文件夹来构建 /etc/skel 文件夹时,就会发生这种情况。导致此行为的相关文件是主文件夹中隐藏的 .local 目录中的“home”,该文件的所有权为错误(root)。

您可以使用以下命令通过将所有权改回您的用户名并最终将文件权限改回来解决此问题:

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

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

不要更改 .local 文件夹中所有文件的所有权,因为其中一些文件(非常少)必须保持 root 所有权。不建议以 root 身份使用 nautilus 或其他文件管理器,而应使用 bash 终端,尽管有时它确实很实用。

当我回答时,我发现这个相关主题是否有用: 询问 Ubuntu

相关内容