10
9
Fork
You've already forked linux-app
14

GTK app icon not set (only used in some edge cases) #370

Closed
opened 2021年05月07日 09:39:15 +02:00 by gijzelaerr · 12 comments
gijzelaerr commented 2021年05月07日 09:39:15 +02:00 (Migrated from github.com)
Copy link

the eduVPN gtk icon is not properly set, which is used in some edge cases like task switching in window manager.

the eduVPN gtk icon is not properly set, which is used in some edge cases like task switching in window manager.
alvra commented 2021年05月14日 10:08:57 +02:00 (Migrated from github.com)
Copy link

I'm seeing the icon correctly in the task switcher (alt-tab). Unfortunately I'm unable to create a screenshot of this as I need to keep pressing the alt key.

Please update the issue with details on where this problem occurs or how to reproduce it, so I can investigate.

I'm seeing the icon correctly in the task switcher (alt-tab). Unfortunately I'm unable to create a screenshot of this as I need to keep pressing the alt key. Please update the issue with details on where this problem occurs or how to reproduce it, so I can investigate.
gijzelaerr commented 2021年05月21日 09:49:13 +02:00 (Migrated from github.com)
Copy link

@fkooman did you experience this issue? if so, in what case?

@fkooman did you experience this issue? if so, in what case?
ghost commented 2021年05月21日 10:14:54 +02:00 (Migrated from github.com)
Copy link

Yes. On Fedora 34 with GNOME using the COPR repo

image

Yes. On Fedora 34 with GNOME using the COPR repo ![image](https://user-images.githubusercontent.com/616885/119105221-610d1f80-ba1d-11eb-869e-6f60ba90a853.png)
gijzelaerr commented 2021年05月21日 10:20:35 +02:00 (Migrated from github.com)
Copy link

maybe the icon path is different for Fedora.

maybe the icon path is different for Fedora.
ghost commented 2021年05月21日 10:30:53 +02:00 (Migrated from github.com)
Copy link
Perhaps this offers some clue: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_desktop_file_install_usage
gijzelaerr commented 2021年07月10日 10:32:30 +02:00 (Migrated from github.com)
Copy link

i hope this change:

github.com/eduvpn/python-eduvpn-client@5dd81ce223 (diff-6aa174e4f7)

fixes the problem. I don't have a RPM system/vm available at the moment, @fkooman can you verify if the 2.1.0 package in the new edupvn copr account solve this issue:

https://copr.fedorainfracloud.org/coprs/g/eduvpn/eduvpn-client/

i hope this change: https://github.com/eduvpn/python-eduvpn-client/commit/5dd81ce22347c61ffd38c9198d178bcda2a71324#diff-6aa174e4f7c532173efb3c5faf580c820089a2b304a3996857532e2682a04262 fixes the problem. I don't have a RPM system/vm available at the moment, @fkooman can you verify if the 2.1.0 package in the new edupvn copr account solve this issue: https://copr.fedorainfracloud.org/coprs/g/eduvpn/eduvpn-client/
ghost commented 2021年07月16日 16:15:43 +02:00 (Migrated from github.com)
Copy link

I tested it again on a freshly installed Fedora 34 VM with the latest 2.1 packages. Issue persists. I was looking in to it, but I really can't find any solution. It is very weird.

See also https://blogs.gnome.org/mclasen/2016/11/15/help-my-app-icon-is-missing/

I tested it again on a freshly installed Fedora 34 VM with the latest 2.1 packages. Issue persists. I was looking in to it, but I really can't find any solution. It is very weird. See also https://blogs.gnome.org/mclasen/2016/11/15/help-my-app-icon-is-missing/
alvra commented 2021年09月08日 14:42:09 +02:00 (Migrated from github.com)
Copy link

@fkooman I'm also seeing this issue in Fedora 34 and tried the steps in your link, but "r(...).app_info" is undefined. In the comments it says "Click on the application, not on the window" but eduvpn does not have a Gtk Application, only a Window.
Btw, this is the same as on Ubuntu except that the icon does show there, so something seems to be different on Fedora.

@fkooman I'm also seeing this issue in Fedora 34 and tried the steps in your link, but "r(...).app_info" is undefined. In the comments it says "Click on the application, not on the window" but eduvpn does not have a Gtk Application, only a Window. Btw, this is the same as on Ubuntu except that the icon does show there, so something seems to be different on Fedora.
gijzelaerr commented 2021年09月08日 14:46:29 +02:00 (Migrated from github.com)
Copy link

my guess is that the icons are not installed in the right location for Fedora. it might help to examine the anatomy of another rpm package that also contains an icon used by an GTK application. A good example is terminator, since it is a popular UI app that is written in Python:

https://terminator-gtk3.readthedocs.io/en/latest/

it could also be related to how GTK figures out the (relative) path to the icon from the UI (XML) file.

my guess is that the icons are not installed in the right location for Fedora. it might help to examine the anatomy of another rpm package that also contains an icon used by an GTK application. A good example is terminator, since it is a popular UI app that is written in Python: https://terminator-gtk3.readthedocs.io/en/latest/ it could also be related to how GTK figures out the (relative) path to the icon from the UI (XML) file.
alvra commented 2021年09月15日 09:36:58 +02:00 (Migrated from github.com)
Copy link

On Ubuntu it does work running it directly without installation (python -m eduvpn.ui), so apparently it is not caused by anything related to the install.

In this case, the only other place we define an icon is in 'mainwindow.ui' window property so there is probably something wrong there.

On Ubuntu it does work running it directly without installation (`python -m eduvpn.ui`), so apparently it is not caused by anything related to the install. In this case, the only other place we define an icon is in 'mainwindow.ui' window property so there is probably something wrong there.
gijzelaerr commented 2021年12月15日 10:14:22 +01:00 (Migrated from github.com)
Copy link

Ok looks like the issue is probably related to Wayland, it is explained in more detail here:

https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased

The application ID supplied to Gtk.Application needs to match the application ID (in our gnome domain case we decided eduvpn-client). This is currently incorrectly set to the app ID in the context of eduVPN:

https://github.com/eduvpn/python-eduvpn-client/blob/master/eduvpn/ui/app.py#L38

Problem is, we can't set this to eduvpn-client, because then we get a gtk error:

(eduvpn-gui:27031): GLib-GIO-CRITICAL **: 11:03:38.495: g_application_set_application_id: assertion 'application_id == NULL || g_application_id_is_valid (application_id)' failed

If we look up what means we get:

https://www.freedesktop.org/software/gstreamer-sdk/data/docs/2012.5/gio/GApplication.html#g-application-id-is-valid

so we violate:

Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.
Application identifiers must contain at least one '.' (period) character (and thus at least three elements).

Which is silly (most fedora apps contain a - but not a .) but it is what it is. So after trying to rename all desktop and icon files to something like org.surf.EduvpnClient and regenerating the icon cache it seems to work

Schermafbeelding 2021年12月15日 om 11 18 09
Ok looks like the issue is probably related to Wayland, it is explained in more detail here: https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased The application ID supplied to `Gtk.Application` needs to match the application ID (in our gnome domain case we decided `eduvpn-client`). This is currently incorrectly set to the app ID in the context of eduVPN: https://github.com/eduvpn/python-eduvpn-client/blob/master/eduvpn/ui/app.py#L38 Problem is, we can't set this to `eduvpn-client`, because then we get a gtk error: ``` (eduvpn-gui:27031): GLib-GIO-CRITICAL **: 11:03:38.495: g_application_set_application_id: assertion 'application_id == NULL || g_application_id_is_valid (application_id)' failed ``` If we look up what means we get: https://www.freedesktop.org/software/gstreamer-sdk/data/docs/2012.5/gio/GApplication.html#g-application-id-is-valid so we violate: ``` Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit. Application identifiers must contain at least one '.' (period) character (and thus at least three elements). ``` Which is silly (most fedora apps contain a `-` but not a `.`) but it is what it is. So after trying to rename all desktop and icon files to something like `org.surf.EduvpnClient` and regenerating the icon cache it seems to work <img width="1325" alt="Schermafbeelding 2021年12月15日 om 11 18 09" src="https://user-images.githubusercontent.com/326308/146158473-9c2b3002-b246-455d-ae67-ced3ca0175f5.png">
ghost commented 2021年12月17日 10:32:53 +01:00 (Migrated from github.com)
Copy link

Can confirm it works properly in 1dfc5bed28 👍

Can confirm it works properly in 1dfc5bed28b27dee3e158d174e621a9eaa3d4fb3 :+1:
Sign in to join this conversation.
No Branch/Tag specified
master
upstream-deb
openvpn-persistent
1.x
4.7.2
4.7.1
4.7.0
4.6.0
4.5.1
4.5.0
4.4.99.0
4.4.0
4.3.1
4.3.0
4.2.99.1
4.2.99.0
4.2.1
4.2.0
4.1.99.0
4.1.3
4.1.2
4.1.1
4.1.0
3.1.1
4.0.1
4.0.0
pr-3.3.1
pr-3.3.0
pr-3.2.0
3.1.0
3.0.0
2.2.1
2.2.0
2.1.0
2.0.0
1.1
1.0.3
1.0.2
1.0.1
1.0rc17
1.0rc16
1.0rc15
1.0rc14
1.0rc13
1.0rc12
1.0rc11
1.0rc10
1.0rc9
1.0rc8
1.0rc7
1.0rc6
1.0rc5
1.0rc4
1.0rc3
1.0rc2
1.0rc1
0.8
0.7.2
0.7.1
0.7
0.6.1
0.6
0.5.1
0.5
0.3
0.2.1
0.2
0.1.1
0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eduVPN/linux-app#370
Reference in a new issue
eduVPN/linux-app
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?