Answer the question
In order to leave comments, you need to log in
How to attach a new window to a favorite icon on the panel when launching a program through ubuntu .desktop file?
Standard label:
[Desktop Entry]
Version=1.0
Name=name
Exec=python /file/to/path
Icon=file/to/path
Type=Application
Terminal=false
Categories=Utility;Development;
Name[ru_RU]=имя.desktop
Answer the question
In order to leave comments, you need to log in
Try like this. It is necessary to add the parameter to the *.desktop file StartupWMClass=
. You can get the value for this parameter using the utility xprop
. In the console, run the command:
xprop WM_CLASS
Then click on the desired window. The command should output a line like:
WM_CLASS(STRING) = "jetbrains-pycharm-ce", "jetbrains-pycharm-ce"
StartupWMClass=jetbrains-pycharm-ce
In general, what I did:
earlier the program was in the same folder in .local/dir and launched through a shortcut, where - Exec=python3 filepath
now it is "as it should be", in folders, etc, usr/bin , usr/share .. and it just starts - Exec=program_name
inside the script #!/usr/bin/python3
and installed via dpkg , I made a .deb (I don't know if this somehow affects my question) the
line ""StartupWMClass=" , I added, although now it works without it. xproc gives out - "program_name", "program_name"
Thank you, everyone who responded. I will not put the solution, because I do not understand why everything turned out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question