2

I have two gnome-terminal windows each one running ssh connected to a different remote server: SERVER A, and SERVER B.

Although using different .desktop settings for each one, dock groups them all together in only one icon, the gnome-terminal icon.

I would like to have them separated in two different applications with custom icons in dock, since I deal with them as if they were different applications, because they are connected to different servers accessing different end-user applications.

My current launching configuration file for the called "server a":

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/gnome-terminal -e "ssh server-a"
Name=SERVER A
Icon=/home/me/custom/server-a.png

EDIT: Ubuntu version: 22.04

1 Answer 1

3

In the .desktop launcher, start your terminal with the --class option to change the WM_CLASS of its window to a unique name. In addition, link the launcher to that class by adding a StartupWMClass= line:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/gnome-terminal --class=server-a -e "ssh server-a"
Name=SERVER A
Icon=/home/me/custom/server-a.png
StartupWMClass=server-a
2
  • Wow! Thank you! It got so close, unfortunately the dock icon wasn't customized it still shows the gnome-terminal icon, and it doesn't show the small point indicating the amount of windows open (Ubuntu 22.04), there is no indicator of any open window, actually. Is there ways to fix or trick that?
    – Luciano
    Commented May 30, 2022 at 17:57
  • The dock icon stays what it was. Remove it and replace it by your custom launcher.
    – vanadium
    Commented May 30, 2022 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .