[Linux] Two icons are displayed in the Dock even though they are the same app!

An application that you wrote and registered your own desktop file may be like this ↓ Screenshot from 2020-03-25 00-53-29.png

approach

All you have to do is get the class name for this app and specify it in your desktop file.

Get class name

  1. Start the application you want to check.

  2. Hit this command

$ xprop WM_CLASS
  1. Then, the command will not be completed and it will enter the waiting state, so click the window of the corresponding application in this state.

If all goes well, the class name will be output as shown below.

WM_CLASS(STRING) = "gravitdesigner", "GravitDesigner"

Register in desktop file

Open the desktop file of the target application and open it.

$ sudo vi /usr/share/applications/gravit-designer.desktop

Add the ↓ line

StartupWMClass=GravitDesigner

GravitDesigner is the class name you just looked up.


That should improve!

By the way, this design software called Gravit Designer is used as a transfer destination from Adobe Illustrator. it's recommended.

Recommended Posts

[Linux] Two icons are displayed in the Dock even though they are the same app!
Using the LibreOffice app in Python (1) Where are the macros?
Make sure all the elements in the list are the same in Python
About the number (section number) in () displayed by the Linux man command