ダッシュボードの2つの異なるアイコンの下で実行されているFirefoxの2つの異なるプロファイルを表示するにはどうすればよいですか?

Feb 10 2020

2つのFirefoxプロファイル用に2つの異なる.desktopファイルがあります。どちらもアイコンが異なり、ダッシュに個別に固定されていますが、実行すると、両方ともデフォルトのアイコンで実行されます。別々に実行するようにこれを変更するにはどうすればよいですか?

デフォルトのプロファイルファイル:

[Desktop Entry]all this seems to do is make them both launch Firefox with a default icon
Version=1.0
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox %u
Terminal=false
Type=Application
Actions=new-window;new-private-window;
Icon=firefox

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -new-window

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -private-window

学校のプロフィールファイル:

[Desktop Entry]
Version=1.0
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote
Terminal=false
Type=Application
Actions=new-window;new-private-window;
Icon=/home/callum/Pictures/firefox-school.png

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P school -no-remote -new-window

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P school -no-remote -private-window

これはFirefoxの2つのランチャーの画像です。現在、学校のプロファイルを実行していますが、デフォルトのインスタンスが開いていることが示されています。

KDE Plasma5.16.5でKubuntu19.10を実行しています

ありがとう!

編集:クラスの使用@vanadiumの提案に従ってクラスを使用するようにデスクトップファイルを更新しましたが、2番目のプロファイルはデフォルトのアイコンで別のFirefoxインスタンスを起動するだけです。

デフォルトのプロファイルファイル:

[Desktop Entry]
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox -P personal -no-remote --class personalProfile
Terminal=false
StartupNotify=true
Type=Application
Icon=firefox
StartupWMClass=personalProfile

学校のプロフィールファイル:

[Desktop Entry]
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote --class schoolProfile
Terminal=false
Type=Application
StartupNotify=true
Icon=/home/callum/Pictures/firefox-school.png
StartupWMClass=schoolProfile

編集2:私はそれを修正しました!のデスクトップファイルで~/.local/share/applicationsはなく、のデスクトップファイルを更新しましたusr/share/applications

回答

3 Callum25252 Feb 10 2020 at 11:49

デスクトップファイルにクラスを追加することでこれを解決しました。

[Desktop Entry]
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote --class schoolProfile
Terminal=false
Type=Application
StartupNotify=true
Icon=/home/callum/Pictures/firefox-school.png
StartupWMClass=schoolProfile
[Desktop Entry]
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox -P personal -no-remote --class personalProfile
Terminal=false
StartupNotify=true
Type=Application
Icon=firefox
StartupWMClass=personalProfile

次に、新しいデスクトップファイルを次のファイル~/.local/share/applicationsだけでなくに移動しますusr/share/applications