Need help configuring the file .desktop

Hi all
Using telegram with two accounts, I created two. desktop files with different names telegram 1 and telegram 2. At startup, both sessions are grouped to the telegram 1 icon.

Which should be added to the file configuration so that telegram 1 is on the telegram 1 icon, and telegram 2 is on the telegram 2 icon.

Hi.
No matter how many desktop files you create, it is possible that Telegram allows only one instance of it running. So when you launch the Telegram 2 when Telegram 1 is already there, it is automatically closed because “Telegram” is already available.

You may use multiple accounts feature of Telegram if you wish.

The program itself works correctly, the first and second account, the problem is in the grouping, two icons, but it is grouped to one.

foto2945

Launch Telegram1 - active Telegram1 icon
Launch Telegram2 - active Telegram1 icon

How do I force an icon to be linked to a session?

Configuration .desktop of the first
[Desktop Entry]
Version=1.0
Name=Telegram1
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -many -workdir /home/user/.local/share/TelegramDesktop %u
Icon=telegram
Terminal=false
StartupWMClass=Telegram1
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
X-GNOME-UsesNotifications=true

Configuration .desktop of the second
[Desktop Entry]
Version=1.0
Name=Telegram2
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -many -workdir /home/user/.local/share/TelegramDesktop2 %u
Icon=telegram
Terminal=false
StartupWMClass=Telegram2
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
X-GNOME-UsesNotifications=true

You can’t.

Applications are grouped depending on things like the application id set on the Wayland surface, or by the WM_CLASS set on the X11 window. That identifier is then mapped to the desktop file. Changing the desktop file is not enough: you also need to change the identifier on the application’s window, and that’s usually hard coded by the application itself.

Moved to Gnome 3.36 before on Gnome 3 first versions, everything worked.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.