步驟
同樣的過程適用于其他在收藏夾又找不到命令的程序
將通過flatapk安裝的qBittorrent的快捷方式添加到收藏
查看收藏夾的文件名字
gsettings get org.gnome.shell favorite-apps
得到如下內(nèi)容
['firefox_firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'transmission-gtk.desktop', 'pycharm-community_pycharm-community.desktop', 'org.gnome.gedit.desktop', 'blender.desktop', 'gnome-control-center.desktop', 'mediainfo-gui.desktop', 'org.qbittorrent.qBittorrent.desktop']
通過文件名查找org.qbittorrent.qBittorrent.desktop
find / -name org.qbittorrent.qBittorrent.desktop
發(fā)現(xiàn)他在這里
/var/lib/flatpak/app/org.qbittorrent.qBittorrent/x86_64/stable/c0885806d1d5628bf27bbf5c31f24f670fd046ce9a4e4290ed6c5030ba30a971/export/share/applications/org.qbittorrent.qBittorrent.desktop
/var/lib/flatpak/app/org.qbittorrent.qBittorrent/x86_64/stable/c0885806d1d5628bf27bbf5c31f24f670fd046ce9a4e4290ed6c5030ba30a971/files/share/applications/org.qbittorrent.qBittorrent.desktop
/var/lib/flatpak/exports/share/applications/org.qbittorrent.qBittorrent.desktop
任意打開一個(gè)文件,查看其啟動(dòng)命令
cat /var/lib/flatpak/exports/share/applications/org.qbittorrent.qBittorrent.desktop
顯示如下內(nèi)容
[Desktop Entry]
Categories=Network;FileTransfer;P2P;Qt;
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=qbittorrent --file-forwarding org.qbittorrent.qBittorrent @@u %U @@
GenericName=BitTorrent client
Comment=Download and share files over BitTorrent
Icon=org.qbittorrent.qBittorrent
MimeType=application/x-bittorrent;x-scheme-handler/magnet;
Name=qBittorrent
Terminal=false
Type=Application
StartupNotify=false
StartupWMClass=qbittorrent
Keywords=bittorrent;torrent;magnet;download;p2p;
SingleMainWindow=true
...
將命令添加到“啟動(dòng)應(yīng)用程序”
屏幕截圖 2024-10-20 183618.png
參考鏈接
https://unix.stackexchange.com/questions/405264/what-is-the-file-location-of-gnome-favorites