我在 Ubuntu 19.10 上。我的~/.config/user-dirs.dirs
外观如下:
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/OneDrive/Desktop"
XDG_DOWNLOAD_DIR="$HOME/OneDrive/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/OneDrive/Documents"
#XDG_MUSIC_DIR="$HOME/Music"
#XDG_PICTURES_DIR="$HOME/Pictures"
#XDG_VIDEOS_DIR="$HOME/Videos"
我的/etc/xdg/user-dirs.conf
样子是这样的:
# This controls the behaviour of xdg-user-dirs-update which is run on user login
# You can also have per-user config in ~/.config/user-dirs.conf, or specify
# the XDG_CONFIG_HOME and/or XDG_CONFIG_DIRS to override this
#
enabled=False
# This sets the filename encoding to use. You can specify an explicit
# encoding, or "locale" which means the encoding of the users locale
# will be used
filename_encoding=UTF-8
我的/etc/xdg/user-dirs.defaults
样子是这样的:
# Default settings for user directories
#
# The values are relative pathnames from the home directory and
# will be translated on a per-path-element basis into the users locale
DESKTOP=Desktop
DOWNLOAD=Downloads
TEMPLATES=Templates
PUBLICSHARE=Public
DOCUMENTS=Documents
MUSIC=Music
PICTURES=Pictures
VIDEOS=Videos
# Another alternative is:
#MUSIC=Documents/Music
#PICTURES=Documents/Pictures
#VIDEOS=Documents/Videos
然而,当我打开 Nautilus/“Files”时,它看起来像这样:
我不明白为什么侧边栏只有文档和下载。它没有音乐、图片或视频,而这正是我想要的。但如果我理解正确的话,它还应该显示桌面、模板和公共。FWIW 侧边栏到文档和下载的快捷方式确实正常工作,因为它可以导航到~/OneDrive/Documents
或下载。知道我遗漏了什么吗?