在Ubuntu里安装Flatpak软件应用无图标的问题
解决思路:手动将图标添加到系统默认的路径下面
以在 Flatpak下安装 OBS为例,可手动将 /var/lib/flatpak/app/com.obsproject.Studio/current/active/export/share/applications/com.obsproject.Studio.desktop文件复制到 /usr/share/applications目录中。
sudo cp \
/var/lib/flatpak/app/com.obsproject.Studio/current/active/export/share/applications/com.obsproject.Studio.desktop \
/usr/share/applications
图标显示不正确则修改 /usr/share/applications/com.obsproject.Studio.desktop中的 Icon的路径,如:
[Desktop Entry]
Version=1.0
Name=OBS Studio
GenericName=Streaming/Recording Software
Comment=Free and Open Source Streaming/Recording Software
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=obs com.obsproject.Studio
Icon=com.obsproject.Studio
Terminal=false
Type=Application
Categories=AudioVideo;Recorder;
修改为:
[Desktop Entry]
Version=1.0
Name=OBS Studio
GenericName=Streaming/Recording Software
Comment=Free and Open Source Streaming/Recording Software
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=obs com.obsproject.Studio
Icon=/var/lib/flatpak/app/com.obsproject.Studio/current/active/export/share/icons/hicolor/512x512/apps/com.obsproject.Studio.png
Terminal=false
Type=Application
Categories=AudioVideo;Recorder;