|-转 debain12 用户桌面的图标那些文件和配置都是存在哪?
cat ~/.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/Downloads/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Documents/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
~ ❯❯❯
Kimi:
在 Debian 12(默认 GNOME)里,**“用户桌面上的图标”**其实只有两类实体:
1. 真正躺在 `~/Desktop` 里的 `.desktop` 文件
这些文件就是你在桌面上看到的“快捷方式”,双击后由文件管理器(nautilus-desktop)负责启动。
例子:
```
~/Desktop/firefox.desktop
~/Desktop/我的项目.desktop
```
2. 图标**图片**本身
- 系统级:
`/usr/share/icons/` ← 主题图标(按分辨率分子目录)
`/usr/share/pixmaps/` ← 杂项单图标
- 用户级:
`~/.local/share/icons/` ← 只对当前用户生效
`~/.icons/` ← 旧兼容路径,部分桌面仍识别
在 `.desktop` 里可以用
```
Icon=application-name ← 去上面目录里按主题查找
Icon=/home/alex/Pictures/xx.png ← 直接写绝对路径也行
```
3. “桌面目录”到底在哪
由 XDG 规范决定,记录在
`~/.config/user-dirs.dirs`
默认内容:
```
XDG_DESKTOP_DIR="$HOME/Desktop"
```
所以 99% 用户就是 `~/Desktop`;如果曾经手动改过路径,以这个文件为准。
4. 图标**是否显示**、**排列坐标**等元数据
GNOME 默认用 `gnome-shell-extension-desktop-icons-ng`(包名 `gnome-shell-extension-desktop-icons-ng`)来画桌面图标,配置全部写在 dconf 数据库:
```
~/.config/dconf/user
```
可用 `dconf-editor` 或 `gsettings` 查看/修改,例如
```
org.gnome.shell.extensions.ding show-home ...