我指的是:https ://specations.freedesktop.org/basedir-spec/basedir-spec-latest.html
我的目录中有以下文件.config
:
~/.config/user-dirs.dirs
:
# ...
XDG_DOWNLOAD_DIR="$HOME/downloads"
# ... there are only comments in this file, except the line above ...
Run Code Online (Sandbox Code Playgroud)
(我猜这个文件需要从某个地方获取?但是在哪里以及如何获取?)
~/.config/user-dirs.conf
:
enabled=False
Run Code Online (Sandbox Code Playgroud)
(这个文件似乎是防止xdg-user-dirs-update
覆盖所必需的~/.config/user-dirs.dirs
。)
但是,$XDG_DOWNLOAD_DIR
当我运行 shell 时并未设置。
XDG * DIR 用户目录变量应该在哪里/如何设置?
我是否应该获取~/.config/user-dirs.dirs
由我的登录 shell 获取的文件之一(例如,在 中.bash_profile
)?
这样设置
xdg-user-dirs-update --set DOWNLOADS ${HOME}/Downloads;
Run Code Online (Sandbox Code Playgroud)
更新所有 xdg 目录
xdg-user-dirs-update;
source ${HOME}/.config/user-dirs.dirs;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2563 次 |
最近记录: |