I'm trying to hack my way into not having multiple windows of the same application grouped in the Dock in Ubuntu 18 since it seems this is not an available feature natively or with dash-to-dock. I've tried creating copies of applications by making copies of the .desktop files, i.e. making /usr/share/applications/terminator3.desktop and /usr/share/applications/terminator4.desktop.

After starting these two apps however, they're still grouped together as two windows of Terminator in the Dock. I've changed the values of the fields I thought were relevant in the .desktop files between the copies and made sure that the copies use different executable copies for the Exec and TryExec fields. However, the windows are still grouped as the same application. I've even tried adding comments in the executables (they're Python scripts) to make sure the executables might be diffed by Gnome3 to see if they're the same program.

.desktop files

[Desktop Entry]
[NewWindow Shortcut Group]


[Desktop Entry]
[NewWindow Shortcut Group]
  • Are you asking about the Launcher Bar which defaults to the left side, or a Dock such as linuxconfig.org/… ? Please advise. – K7AAY Dec 4 '19 at 18:26
  • Tbh, I'm not sure what the difference is. In Settings it's controlled at Settings > Dock, so I guess the Dock and not the launcher? @K7AAY – lsimmons Dec 4 '19 at 18:30
  • Is there still a list of apps in a vertical bar on the left? Y/N – K7AAY Dec 4 '19 at 18:42
  • I switched it to the right in Settings > Dock – lsimmons Dec 4 '19 at 18:45
  • imgur.com/a/IDjHlaJ – lsimmons Dec 4 '19 at 18:47

You cannot do this. Changing the .desktop files and duplicating them in this manner doesn't actually change the application, so all the windows will still have the WMClass atom assigned the same.

You will instead need to use a different extension if you want ungrouped windows. If you want them on the launcher bar (dock as you call it), then you will most likely need to fork the extension and change the code in it to not group windows. There is also the Window list extension available, which when enabled will show a traditional task bar at the bottom of the screen. You might want to use it instead.

Alternatively, some applications may be able to take a --class argument to the executable, as a means to change the WMClass atom, which can be matched with StartupWMClass in the .desktop file, as suggested in this answer.

  • thanks for the resp, could you elaborate on what you mean by "Changing the .desktop files and duplicating them in this manner doesn't actually change the application"? The WMClass field is not overwriteable in some way? – lsimmons Dec 4 '19 at 18:21
  • do you know what Ubuntu/Gnome uses to determine what the application is that is started by the .desktop file? If each field and the executable itself is different between the .desktop files, then how does Ubuntu consider them to be the same application? – lsimmons Dec 4 '19 at 18:25
  • just adding the reference here - @dobey – lsimmons Dec 4 '19 at 18:31
  • Right. The WMClass related fields in the file are for matching windows. It doesn't overwrite them, IIRC, and some are not even valid .desktop entries for the specification. Also, are you certain the app is running multiple distinct instances? Most likely it's a single instance, and even when you rename the executables they're still just signalling the existing process to open a new window when started. – dobey Dec 4 '19 at 19:59
  • Here's what I don't understand - if I start up one of the duplicates right after boot with no other terminator windows running, the dock/launcher calls the new terminator window "Terminator" even though nowhere in the duplicate's .desktop file do I use the word "Terminator". So where does the dock/launcher get the name of the application?? @dobey – lsimmons Dec 5 '19 at 18:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.