Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-10-19 17:46:02

zcyph
Member
Registered: 2021-10-19
Posts: 6

Missing panel icon (specific application)

Hello,

Hoping somebody can point me in the right direction on where to look. I am using Manjaro 21.1.6 with xfce4-panel 4.16.3 and xfce4-whiskermenu-plugin 2.6.0.

Most icons are displayed properly. This particular application (Session Private Messenger) is not. I've tried a few different implementations (AppImage, Snap, Flatpak), and the result is the same in each case.

Inside the Whisker menu itself, the icon is displayed. In the system tray, the icon is displayed. But in the panel, it is not.

Here is what it looks like: https://imgur.com/a/aUg86yC

Users of other desktops (KDE for example) have confirmed Session's panel icon displays for them.

I'm not too sure where to even look. Any pointers? Thank you so much.

Offline

#2 2021-10-20 01:13:43

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

Re: Missing panel icon (specific application)

Hello and welcome.

I don't use flatpak, so this is somewhat new to me. I've been looking into this and something that I've noticed is that if you compare the "Session Private Messenger" flatpak with the bitwarden one, you'll notice that bitwarden contains icons in the lower sizes (16x16, 32x32, 48x48), The bitwarden icon works though. This leads me to believe that maybe its a flatpack package issue? The tasklist uses libwnck and I believe that libwnck supports only up to 32 (or 48) pixel icons. Might be worth creating a bug report with the product.

As a workaround, you could use xseticon to reset the icon after the program starts. Once it's running, execute this program to change the icon:

#!/bin/bash
ICON=/var/lib/flatpak/app/network.loki.Session/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

WINDOWS=(`wmctrl -l | grep "$hostname Session" | cut -f1 -d' ' | xargs`)
for window in ${WINDOWS[@]}; do
    # Use "xseticon", a compiled C binary, to change the icon of a running program
    /usr/bin/xseticon -id ${window} $ICON

    # Use "xprop" to set the window state, so that alt+tab works again
    xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_NORMAL -id ${window}
done

Ref: https://github.com/flathub/com.slack.Slack/issues/9


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

#3 2021-10-20 05:03:25

zcyph
Member
Registered: 2021-10-19
Posts: 6

Re: Missing panel icon (specific application)

ToZ wrote:

Hello and welcome.

I don't use flatpak, so this is somewhat new to me. I've been looking into this and something that I've noticed is that if you compare the "Session Private Messenger" flatpak with the bitwarden one, you'll notice that bitwarden contains icons in the lower sizes (16x16, 32x32, 48x48), The bitwarden icon works though. This leads me to believe that maybe its a flatpack package issue? The tasklist uses libwnck and I believe that libwnck supports only up to 32 (or 48) pixel icons. Might be worth creating a bug report with the product.

Thank you so much for the response. I'm not sure about it being a Flatpak issue, as I experience the same issue whether Session was installed via Flatpak, Snap, AUR or AppImage. I did try the steps you mentioned, but got "Aborted at function fopen()".

Offline

#4 2021-10-20 10:24:18

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

Re: Missing panel icon (specific application)

zcyph wrote:

Thank you so much for the response. I'm not sure about it being a Flatpak issue, as I experience the same issue whether Session was installed via Flatpak, Snap, AUR or AppImage.

You could create a bug report against xfce4-panel to see what the developer says.

I did try the steps you mentioned, but got "Aborted at function fopen()".

Thats odd as I tested this on the same version of Manjaro as you run. How did you install xseticon? I installed it from the AUR.


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 2021-10-20 16:55:55

zcyph
Member
Registered: 2021-10-19
Posts: 6

Re: Missing panel icon (specific application)

ToZ wrote:

Thats odd as I tested this on the same version of Manjaro as you run. How did you install xseticon? I installed it from the AUR.

I also installed it from the AUR, using yay. I went ahead and created the bug report: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/530. Thank you.

Last edited by zcyph (2021-10-20 16:56:23)

Offline

#6 2021-10-20 22:34:40

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

Re: Missing panel icon (specific application)

I'd be curious to know which command is causing the abort error. Can you run the script in bash debug mode? Either start it with "bash -x" or change the first line in the script to read:

#!/bin/bash -x

...and then post the output when you run the script.

Edit: I think I know what the problem might be. Try this version of the script:

#!/bin/bash

ICON=/var/lib/flatpak/app/network.loki.Session/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

WINDOWS=(`wmctrl -l | grep "$(hostname) Session" | cut -f1 -d' ' | xargs`)
for window in ${WINDOWS[@]}; do
    # Use "xseticon", a compiled C binary, to change the icon of a running program
    /usr/bin/xseticon -id ${window} $ICON

    # Use "xprop" to set the window state, so that alt+tab works again
    xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_NORMAL -id ${window}
done

Last edited by ToZ (2021-10-20 22:37:32)


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

#7 2021-10-20 23:29:03

zcyph
Member
Registered: 2021-10-19
Posts: 6

Re: Missing panel icon (specific application)

ToZ wrote:

Edit: I think I know what the problem might be. Try this version of the script:

Thank you, this one completes without any error. However, I don't see any change in the icon.

Offline

#8 2021-10-20 23:39:09

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

Re: Missing panel icon (specific application)

Is the flatpak version of the program running?

Do you have this icon in your system: /var/lib/flatpak/app/network.loki.Session/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

What do the following return?

hostname
wmctrl -l | grep "$(hostname) Session"

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

#9 2021-10-20 23:57:48

zcyph
Member
Registered: 2021-10-19
Posts: 6

Re: Missing panel icon (specific application)

ToZ wrote:

Is the flatpak version of the program running?

Do you have this icon in your system: /var/lib/flatpak/app/network.loki.Session/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

What do the following return?

hostname
wmctrl -l | grep "$(hostname) Session"

It is, and I do.

I get:

zcyph
0x04000013  0 zcyph Session

Upon re-tracing my steps once more, I am now seeing the icon! I must have confused which version I had running at the time I ran the script last time.

And I just redid the same steps, but for the Snap version this time, and it worked there too after copying the icon over to /var/snap/session-desktop/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

The change does not seem to persist after closing and reopening the app though. I don't suppose there's some way to make it stick?

Thank you so much for all the help!

Offline

#10 2021-10-21 00:08:53

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

Re: Missing panel icon (specific application)

Save this script somewhere and make it executable:

#!/bin/bash

flatpak run network.loki.Session &

sleep 3s

ICON=/var/lib/flatpak/app/network.loki.Session/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

WINDOWS=(`wmctrl -l | grep "$(hostname) Session" | cut -f1 -d' ' | xargs`)
for window in ${WINDOWS[@]}; do
    # Use "xseticon", a compiled C binary, to change the icon of a running program
    /usr/bin/xseticon -id ${window} $ICON

    # Use "xprop" to set the window state, so that alt+tab works again
    xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_NORMAL -id ${window}
done

Then edit the application in the Whisker Menu and replace the existing "Command" to point to this script.

This script will launch the program, then change the icon. You may have to adjust the "sleep" time if you have a slower computer and it takes a longer time for the application to start. (or if you have a fast computer and it takes too long for the icon to change).


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 2021-10-21 00:20:07

zcyph
Member
Registered: 2021-10-19
Posts: 6

Re: Missing panel icon (specific application)

Wow thank you, really. I set it up for both the Flatpak and the Snap and the workaround is a success for both. Thanks again!!

ToZ wrote:

Save this script somewhere and make it executable:

#!/bin/bash

flatpak run network.loki.Session &

sleep 3s

ICON=/var/lib/flatpak/app/network.loki.Session/current/active/export/share/icons/hicolor/512x512/apps/network.loki.Session.png

WINDOWS=(`wmctrl -l | grep "$(hostname) Session" | cut -f1 -d' ' | xargs`)
for window in ${WINDOWS[@]}; do
    # Use "xseticon", a compiled C binary, to change the icon of a running program
    /usr/bin/xseticon -id ${window} $ICON

    # Use "xprop" to set the window state, so that alt+tab works again
    xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_NORMAL -id ${window}
done

Then edit the application in the Whisker Menu and replace the existing "Command" to point to this script.

This script will launch the program, then change the icon. You may have to adjust the "sleep" time if you have a slower computer and it takes a longer time for the application to start. (or if you have a fast computer and it takes too long for the icon to change).

Offline

Board footer

Powered by FluxBB