I would like to run a special instance of application foo on the GNOME desktop. Normally all foo windows are grouped together, but I'd like one instance to be treated as a separate application bar:

  • separate launch icon
  • foo and bar appear as separate items in the taskbar
  • bar windows grouped separately from foo windows (for example, when alt-tabbing)
  • when alt-tabbing, bar windows have the bar icon not the foo icon

I tried to achieve this by creating a bar.desktop file and setting the StartupWMClass as follows:


[Desktop Entry]
Exec=foo --profile=bar
Comment=Bar instance

I get a separate launch icon for bar, but after launch the bar instance is treated as just another foo window.

It just so happens that foo is a GTK application, so I also tried:

Exec=foo --name=bar --class=bar --profile=bar

...but this didn't achieve anything. I'd also prefer a solution for all applications, not just GTK applications.

  • With firefox, this works adding --class and StartupWMClass. You can verify whether the class stuck by using xprop, clicking on the window and then checking the WM_CLASS(STRING) property. – user13666 Nov 13 '17 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.