Update (2023-07-07): Removing the -no-remote
CLI option avoids the Firefox is already running, but is not responding error.
For me (using Wayland and Gnome 43 on Fedora 37), the catch was to use --name Firefox-kiosk-youtube
instead of --class Firefox-kiosk-youtube
.
To have GNOME Shell show a nice icon and the contents of Name
rather than WM_CLASS
(or wmclass
) directly, you also need to set StartupWMClass
to the same value (e.g. Firefox-kiosk-youtube
).
Here is my complete firefox-personal.desktop
file:
[Desktop Entry]
Version=1.0
Name=Firefox (Personal)
GenericName=Web Browser
Comment=Browse the Web
Exec=firefox -P personal --name FirefoxPersonal %u
Icon=firefox
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
# NOTE: If this is not set to the same as the argument of the --name option,
# then GNOME Shell won't show the nice Firefox icon and the user facing
# "Firefox (Personal)" text along with it.
StartupWMClass=FirefoxPersonal
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;profile-manager-window;
X-Desktop-File-Install-Version=0.26
[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P personal --name FirefoxPersonal --new-window %u
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P personal --name FirefoxPersonal --private-window %u
To verify the WM_CLASS
value, one can use GNOME Shell's built-in tool Looking Glass.
Press Alt + F2, type lg
and press Enter. In the top-right panel, select "Windows".
The WM_CLASS
will be displayed under the wmclass
key.
For example: