1

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]
Name=terminator3
TryExec=terminator3
Exec=terminator3
Type=Application
WMClass=terminator3
X-WMClass=terminator3
StartupWMClass=terminator3
X-StartupWMClass=terminator3
[NewWindow Shortcut Group]
Exec=terminator3
TargetEnvironment=Unity

-

[Desktop Entry]
Name=terminator4
TryExec=terminator4
Exec=terminator4
Type=Application
WMClass=terminator4
X-WMClass=terminator4
StartupWMClass=terminator4
X-StartupWMClass=terminator4
[NewWindow Shortcut Group]
Exec=terminator4
TargetEnvironment=Unity
pomsky
  • 70,557
lsimmons
  • 205

1 Answers1

1

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.

dobey
  • 41,650