一不小心把当前用户的桌面文件夹“/home/wenjianbao/桌面”删了,导致系统把“/home/wenjianbao”当成桌面文件夹。结果,桌面上全是乱七八糟的文件/文件夹。
查看了下网络资料,可以通过修改 ~/.config/user-dirs.dirs 中的 XDG_DESKTOP_DIR 来重新指定“桌面文件夹”:
# 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/桌面" XDG_DOWNLOAD_DIR="$HOME/下载" XDG_TEMPLATES_DIR="$HOME/模板" XDG_PUBLICSHARE_DIR="$HOME/公共的" XDG_DOCUMENTS_DIR="$HOME/文档" XDG_MUSIC_DIR="$HOME/音乐" XDG_PICTURES_DIR="$HOME/图片" XDG_VIDEOS_DIR="$HOME/视频"