0
0

在Ubuntu里安装Flatpak软件应用无图标的问题

2024-01-28
2024-10-11
文章摘要
|

解决思路:手动将图标添加到系统默认的路径下面

以在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;

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或者给予支持!