Skip to content

Instantly share code, notes, and snippets.

@zzag
Last active June 6, 2024 02:20
Show Gist options
  • Save zzag/e2f0a5e022b726466c29afa3d497a3fc to your computer and use it in GitHub Desktop.
Save zzag/e2f0a5e022b726466c29afa3d497a3fc to your computer and use it in GitHub Desktop.
Firefox Nightly desktop file
[Desktop Entry]
Version=1.0
Name=Firefox Nightly
GenericName=Web Browser
Comment=Browse the Web
Exec=/home/vlad/Applications/firefox-nightly/firefox --name firefox-nightly -P Nightly %u
Icon=/home/vlad/Applications/firefox-nightly/browser/chrome/icons/default/default128.png
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
StartupWMClass=Nightly
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;profile-manager;
[Desktop Action new-window]
Name=New Window
Exec=/home/vlad/Applications/firefox-nightly/firefox --name firefox-nightly --new-window -P Nightly %u
[Desktop Action new-private-window]
Name=New Private Window
Exec=/home/vlad/Applications/firefox-nightly/firefox --name firefox-nightly --private-window -P Nightly %u
[Desktop Action profile-manager]
Name=Profile Manager
Exec=/home/vlad/Applications/firefox-nightly/firefox --name firefox-nightly -P %u
@imi415
Copy link

imi415 commented Jan 25, 2023

Hi,
Thanks for the desktop file.
It seems the WM class for Nightly has changed to 'firefox-nightly' (not sure for X11, as I am currently on wayland).
The final line which works for me is:

StartupWMClass=firefox-nightly

@zzag
Copy link
Author

zzag commented Jan 25, 2023

Huh, not sure why it would work. StartupWMClass is an X11 thingy. If you run firefox nightly with native wayland support, only two things should matter - the app id specified using --name firefox-nightly and the file name of the desktop file firefox-nightly.desktop.

@imi415
Copy link

imi415 commented Jan 25, 2023

Thanks! I believe this is the problem. The .desktop file name does not match with my '--name' option. Seems GNOME also uses this StartWMClass in Xwayland session somehow.

@joachimBurket
Copy link

Hi,
I'm on X11 and I had to add --class firefox-nightly to the Exec:

Exec=/home/vlad/Applications/firefox-nightly/firefox --name firefox-nightly --class firefox-nightly -P Nightly %u

Otherwise, when lauching the nighly app, it was grouped with the standard firefox in the dock.

PS: Before that, I was using Wayland on Fedora (with Gnome), and the StartupWMClass did the trick. But on X11, I had to add the --class param

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment