7zip 桌面图标丢失

7zip 桌面图标丢失

通过 snap 重新安装 Ubuntu 和 7zip-desktop 后,我丢失了这样的 7zip 图标。

像这样

所有功能都运行良好,唯一烦人的部分是图标丢失了,在重新安装 Ubuntu 之前图标是存在的。有人知道如何解决这个问题吗?谢谢。

答案1

看来 .desktop 文件没有该行Icon=/path/to/icon

因此手动添加该行将显示图标。

sudo -H gedit /var/lib/snapd/desktop/applications/p7zip-desktop_p7zip-desktop.desktop

添加行Icon=</path/to/icon>

[Desktop Entry]
X-SnapInstanceName=p7zip-desktop
Name=P7Zip Desktop
GenericName=P7Zip Desktop - File Manager
Type=Application
Categories=GTK;Utility;Archiving;Compression;
Terminal=false
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/p7zip-desktop_p7zip-desktop.desktop /snap/bin/p7zip-desktop %U
NoDisplay=false
Icon=/home/ubuntu/Downloads/1.png
MimeType=application/gzip;application/x-7z-compressed;application/x-7z-compressed-tar;application/x-arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/x-deb;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-lha;application/x-lhz;application/x-lzma;application/x-lzma-compressed-tar;application/x-ms-wim;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-tar;application/x-xz;application/x-xz-compressed-tar;application/x-zip;application/x-zip-compressed;application/zip;application/vnd.ms-cab-compressed;

在此处输入图片描述

相关内容