Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-07-18 17:55:22

peterGraetz
Member
Registered: 2022-07-18
Posts: 5

[SOLVED] Icons for self compiled/installed app not showing in panel

I build st terminal and installed it to /usr/local/bin/st

Additionally I created a file st.desktop which I put into /usr/share/applications/st.desktop with this content

[Desktop Entry]
Name=ST
GenericName=st
Comment=Suckless terminal emulator for X
Exec=st -e "zsh"
Icon=org.xfce.terminal
Terminal=false
Type=Application
Categories=GTK;System;TerminalEmulator;
StartupNotify=true
Encoding=UTF-8
Keywords=shell;prompt;command;commandline;cmd;

The icon is showing correctly in whisker menu, but in the panel, workspace switcher and docklike taskbar it shows some other symbol, which seems to be a "cannot find the icon" typ of symbol.

what can I do to resolve this?

screenshot

Last edited by peterGraetz (2022-07-19 10:15:00)

Offline

#2 2022-07-18 18:01:04

peterGraetz
Member
Registered: 2022-07-18
Posts: 5

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Totally forgot

xfce 4.16
Ubuntu 22.04LTS

Offline

#3 2022-07-18 18:22:26

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Please refer to this topic.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#4 2022-07-18 19:22:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Since st is an X program and does provide a class name:

WM_CLASS(STRING) = "st-256color", "st-256color"

...you can create an icon by that name, drop it into /usr/share/pixmaps and it should work. For example:

sudo cp /usr/share/icons/hicolor/48x48/apps/org.xfce.terminal.png /usr/share/pixmaps/st-256color.png

Testing here on Arch this works.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2022-07-18 19:34:24

peterGraetz
Member
Registered: 2022-07-18
Posts: 5

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Thank you Kbar, thank you ToZ

I already updated my st.desktop before ToZ commented

[Desktop Entry]
Type=Application
Exec=st -e zsh
TryExec=st
Icon=utilities-terminal
Terminal=false
Categories=System;TerminalEmulator;

Name=st
GenericName=Terminal
Comment=st is a simple terminal implementation for X
StartupWMClass=st-256color

I even had figured out the WMClass, for any other new user

In Terminal.
1. xprop WM_CLASS
2. click on the application
3. the output - just like ToZ postet

But the Image was the last missing key ... I was getting annoyed already ... because all the other steps I did figure out ... but it did not work wink

Now what works:
Xfce panel icons in window buttons,  it works in alt-tab ... it does not work in workspace switcher
And interesstingly, in Docklike taskbar, it works, but when you hover over it ... it does not work in the window list...

Offline

#6 2022-07-18 19:49:25

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Maybe you have to update the icon cache.

gtk-update-icon-cache

Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#7 2022-07-18 20:00:40

peterGraetz
Member
Registered: 2022-07-18
Posts: 5

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Misko_2083 wrote:

Maybe you have to update the icon cache.

gtk-update-icon-cache

does not resolve this.

My assumption is, that workspace switcher uses a different method to determine the icon ... I guess

Anyways ... I mostly annoyed me in the alt tab and docklike taskbar
Personally I'm fine ... unless someone has some quick fix wouldn't mind

Thanks everyone

So now I only need to figure out how to close this issue smile

Offline

#8 2022-07-18 21:07:43

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Oh I see, only xseticon can change it.
http://www.leonerd.org.uk/code/xseticon/
It's a small app written in C.

Requires libglib2.0-dev libx11-dev libxmu-dev libgd-dev to compile on Debian 11.
For your distro theses development libraries may have different package names.

Had to change the makefile to compile
Line 21

	 gcc ${LIBS} $^ -o $@

Replaced it with:

	 gcc $^ -o $@ ${LIBS}

Run make in that folder and there it is xseticon binary.
After compiling follow ToZ's instructions here.
https://forum.xfce.org/viewtopic.php?pid=45963#p45963
I had my own version of the script but I think ToZ's is much better.


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#9 2022-07-18 22:19:54

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

peterGraetz wrote:

My assumption is, that workspace switcher uses a different method to determine the icon ... I guess

Anyways ... I mostly annoyed me in the alt tab and docklike taskbar
Personally I'm fine ... unless someone has some quick fix wouldn't mind

It doesn't look like the former is coded to use the class as icon and for the latter, its probably a bug. If you feel like following up, you can create bug reports for them.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2022-07-18 22:22:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Misko_2083 wrote:

I had my own version of the script but I think ToZ's is much better.

Yes, we can also use xseticon. It would be nice if all components used the same method and didn't require a separate script.
I wouldn't call it my script though, I'm pretty sure I lifted it from someone else.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2022-07-19 03:33:41

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

peterGraetz wrote:

So now I only need to figure out how to close this issue smile

If you feel like your issue has been resolved, please edit the subject manually and prepend [SOLVED] to it. Thanks.

Edit
I don't know if it's relevant but I found by chance that there is a control sequence that sets icon of an xterm window.

       ESC ] 0 ; txt ST        Set icon name and window title to txt.
       ESC ] 1 ; txt ST        Set icon name to txt.

Refer to console_codes(4) for details.

Last edited by KBar (2022-07-19 06:00:22)


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#12 2022-07-19 10:08:04

peterGraetz
Member
Registered: 2022-07-18
Posts: 5

Re: [SOLVED] Icons for self compiled/installed app not showing in panel

Misko_2083 wrote:

Oh I see, only xseticon can change it.
http://www.leonerd.org.uk/code/xseticon/
It's a small app written in C.

Requires libglib2.0-dev libx11-dev libxmu-dev libgd-dev to compile on Debian 11.
For your distro theses development libraries may have different package names.

Had to change the makefile to compile
Line 21

	 gcc ${LIBS} $^ -o $@

Replaced it with:

	 gcc $^ -o $@ ${LIBS}

Run make in that folder and there it is xseticon binary.
After compiling follow ToZ's instructions here.
https://forum.xfce.org/viewtopic.php?pid=45963#p45963
I had my own version of the script but I think ToZ's is much better.

I gave it a try, just for the kicks - And yes both in the docklike taskbar windowlist and in the desktop switcher now a Icon appears.
I probably will not use it though - it just seems to involved, given that my .desktop file allready covers the important parts.
One thing for other people who want to try it, the icon in the alt-tab for this instance of st is blury now



I will ask the people of docklike taskbar whats the expected way of making the application icon available


to KBar I will mark this as solved / I looked briefly at the console_codes just to realize, but I think I'm good for now

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 9 queries executed - Memory usage: 593.38 KiB (Peak: 610.66 KiB) ]