App indicator does not show icon for Qt apps or with custom icons
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| appmenu-qt5 (Ubuntu) |
High
|
Marco Trevisan (Treviño) | ||
| Xenial |
High
|
Unassigned | ||
| libappindicator (Ubuntu) |
High
|
Marco Trevisan (Treviño) | ||
| Xenial |
High
|
Unassigned | ||
| qtbase-opensource-src (Ubuntu) |
High
|
Marco Trevisan (Treviño) | ||
| Xenial |
High
|
Unassigned | ||
| sni-qt (Ubuntu) |
High
|
Marco Trevisan (Treviño) | ||
| Xenial |
High
|
Unassigned |
Bug Description
Snaps that use the app indicator area via Qt can't display their icon there.
Steps to reproduce and screenshot:
https:/
Some research:
- Uses http://
- The indicator icon is created under /tmp under a randomly generated directory name
didrocks mentions also:
1. The application says "this is my menu, and here is my icon at that address", the address being /tmp/blablabla
2. appindicator receives the bus messages
3. and says "let's have a look at this icon at that address"
4. BUT! /tmp in the snap is different form system /tmp
=======
SRU bug for libappindicator:
[Impact]
Indicator icons pointing to a position inside the snap aren't properly found by unity, that shows a "missing icon" emblem
[Test case]
* Download this yaml file http://
in any folder you want
* Run:
- snapcraft prime
- sudo snap try prime
- snap run gtk3-appindicator
An indicator should open (with proper icon), then if you select "Set icon with Full Path" and/or "Enable Local Theme" from its menu, you should see a proper icon.
When snaps are generated in non updated systems, the icon will be still missing.
[Regression potential]
If $SNAP is defined for an app not running in snap confinement the icons couldn't be properly visible
=======
SRU bug for appmenu-qt5:
[Impact]
Indicator icons pointing to a position inside the snap aren't properly found by unity, that shows a "missing icon" emblem
[Test case]
* Download this yaml file http://
in any folder you want
* Run:
- snapcraft prime
- sudo snap try prime
- snap run qt5-systray
An indicator should open, with the proper icon showin. From the window you can change the icon type, and all the types should work.
When snaps are generated in non updated systems, the icons (except the Themed one) will be still missing.
[Regression potential]
If $SNAP env variable is defined for an app not running in snap confinement the icons couldn't be properly visible
=======
SRU bug for sni-qt:
[Impact]
Indicator icons pointing to a position inside the snap aren't properly found by unity, that shows a "missing icon" emblem
[Test case]
* Download this yaml file http://
in any folder you want
* Run:
- snapcraft prime
- sudo snap try prime
- snap run qt4-systray
An indicator should open, with the proper icon showin. From the window you can change the icon type, and all the types should work.
When snaps are generated in non updated systems, the icons (except the Themed one) will be still missing.
[Regression potential]
If $SNAP env variable is defined for an app not running in snap confinement the icons couldn't be properly visible
Related branches
- Lukáš Tinkl (community): Approve on 2016-11-22
-
Diff: 149 lines (+57/-10)5 files modifiedsrc/fsutils.cpp (+16/-4)
src/iconcache.cpp (+11/-2)
src/iconcache.h (+2/-2)
src/statusnotifieritem.cpp (+1/-1)
tests/auto/iconcachetest.cpp (+27/-1)
- Lukáš Tinkl (community): Approve on 2016-11-22
-
Diff: 138 lines (+50/-13)4 files modifiedsrc/appmenuplatformmenubar.cpp (+14/-3)
src/appmenuplatformsystemtrayicon.cpp (+1/-1)
src/iconcache.cpp (+34/-7)
src/iconcache.h (+1/-2)
- Andrea Azzarone (community): Approve on 2016-11-30
- unity-api-1-bot: Needs Fixing (continuous-integration) on 2016-11-29
-
Diff: 353 lines (+124/-14)5 files modifiedconfigure.ac (+1/-1)
debian/control (+1/-0)
debian/rules (+0/-2)
example/simple-client-vala.vala (+1/-1)
src/app-indicator.c (+121/-10)
- Andrea Azzarone (community): Approve on 2017-02-14
-
Diff: 339 lines (+139/-11)2 files modifiedexample/simple-client-vala.vala (+1/-1)
src/app-indicator.c (+138/-10)
- Andrea Azzarone (community): Approve on 2017-02-13
-
Diff: 156 lines (+67/-13)5 files modifieddebian/changelog (+11/-0)
src/appmenuplatformmenubar.cpp (+13/-3)
src/appmenuplatformsystemtrayicon.cpp (+1/-1)
src/iconcache.cpp (+41/-7)
src/iconcache.h (+1/-2)
- Indicator Applet Developers: Pending requested 2017-02-13
-
Diff: 37 lines (+23/-0) (has conflicts)1 file modifieddebian/changelog (+23/-0)
- Andrea Azzarone (community): Approve on 2017-02-17
-
Diff: 215 lines (+82/-11)7 files modifieddebian/changelog (+10/-0)
src/fsutils.cpp (+19/-4)
src/iconcache.cpp (+11/-2)
src/iconcache.h (+2/-2)
src/statusnotifieritem.cpp (+12/-2)
tests/auto/fsutilstest.cpp (+1/-0)
tests/auto/iconcachetest.cpp (+27/-1)
tags: |
added: snap-desktop-issue removed: desktop |
Didier Roche (didrocks) wrote : | #1 |
Jamie Strandboge (jdstrand) wrote : | #2 |
"- I don't think apparmor can do this on the fly translations, right?"
No, the kernel LSM hooks (which apparmor uses) look at the files themselves.
Based on your explanation, it sounds like it is only the client side (ie, the snap) that needs to change and that it simply must tell the system shell what the icon uri is. As such, one idea would be to put the icons in ~/snap/
Assuming that works it then becomes a matter of making this easy for developers. I'm not sure that 'no upstream changes' is the right attitude-- snappy is a new way of doing things and asking upstream to make reasonable changes shouldn't necessarily be avoided at all costs. That said, I think the preload idea of Gustavo's (see bug #1577514) could help with not needing client changes for the file write (but the uri the client reports to the shell needs to be corrected-- maybe the client libraries honor TMPDIR or some other env variable and you can set it to ~/snap/
Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in snapd (Ubuntu): | |
status: | New → Confirmed |
vodopad27 (family-gan) wrote : | #4 |
Please, fix it. I can not use Telegram snap: https:/
Changed in sni-qt (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
summary: |
- App indicator does not show icon for Qt apps + App indicator does not show icon for Qt apps or with custom icons |
Marco Trevisan (Treviño) (3v1n0) wrote : | #5 |
So...
The problem for generic apps should be fixed. You can see some examples here:
- https:/
Basically we export to unity the proper absolute icon path, unless that's readable (so basically it can be everywhere inside the SNAP but in /tmp).
They're using remote parts indicator-
As for some QT apps that don't use appmenu-qt, until we don't fix the Qt upstream implementation, the only workaround is to use a different TEMPDIR for them, see https:/
When bug #1620442 is fixed, it might be ok to set TEMPDIR to XDG_RUNTIME_DIR for a such snap.
Changed in libappindicator (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
Changed in snapd (Ubuntu): | |
status: | Confirmed → In Progress |
importance: | Undecided → High |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
Launchpad Janitor (janitor) wrote : | #6 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in appmenu-qt5 (Ubuntu): | |
status: | New → Confirmed |
Changed in appmenu-qt5 (Ubuntu): | |
status: | Confirmed → In Progress |
importance: | Undecided → High |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package appmenu-qt5 - 0.3.0+17.
---------------
appmenu-qt5 (0.3.0+
* AppMenuPlatform
ensure compiz will raise it (LP: #627195)
* AppMenuPlatform
other environments (LP: #1606246)
* IconCache: get the proper theme path based on the fact we're using a
themed icon or not (LP: #1600136)
-- Marco Trevisan (Treviño) <mail@3v1n0.net> Thu, 24 Nov 2016 18:39:00 +0000
Changed in appmenu-qt5 (Ubuntu): | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package sni-qt - 0.2.7+17.
---------------
sni-qt (0.2.7+
* statusnotifieritem: reset app usertime on activation to ensure
compiz will raise it (LP: #627195)
* IconCache: get the proper theme path based on the fact we're using a
themed icon or not (LP: #1600136)
-- Marco Trevisan (Treviño) <mail@3v1n0.net> Thu, 24 Nov 2016 18:38:52 +0000
Changed in sni-qt (Ubuntu): | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #9 |
This bug was fixed in the package libappindicator - 12.10.1+
---------------
libappindicator (12.10.
* AppIndicator: fix icon and theme paths when running in $SNAP
environment (LP: #1600136)
-- Marco Trevisan (Treviño) <mail@3v1n0.net> Tue, 29 Nov 2016 18:04:06 +0000
Changed in libappindicator (Ubuntu): | |
status: | In Progress → Fix Released |
information type: | Public → Public Security |
information type: | Public Security → Public |
Marco Trevisan (Treviño) (3v1n0) wrote : | #10 |
Upstream fix for pure Qt apps (when not including appmenu-qt5) is proposed at https:/
Here's the patch for the ubuntu package too.
Changed in qtbase-opensource-src (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
Changed in qt: | |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
status: | New → In Progress |
The attachment "qdbustrayicon-
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]
tags: | added: patch |
Dmitry Shachnev (mitya57) wrote : | #12 |
I think you meant https:/
Marco Trevisan (Treviño) (3v1n0) wrote : | #13 |
Yes sure... Wrong paste :-)
Marco Trevisan (Treviño) (3v1n0) wrote : | #14 |
Debdiff updated to backport the patches that have just merged upstream.
- https:/
- https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Mathew Hodson (mhodson) wrote : | #16 |
Accepted appmenu-qt5 into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in appmenu-qt5 (Ubuntu Xenial): | |
importance: | Undecided → High |
status: | New → Fix Committed |
Mathew Hodson (mhodson) wrote : | #17 |
Accepted libappindicator into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in libappindicator (Ubuntu Xenial): | |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in qtbase-opensource-src (Ubuntu Xenial): | |
importance: | Undecided → High |
tags: | added: verification-needed |
Mathew Hodson (mhodson) wrote : | #18 |
Accepted sni-qt into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in sni-qt (Ubuntu Xenial): | |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in snapd (Ubuntu Xenial): | |
importance: | Undecided → High |
tags: |
added: verification-done removed: verification-needed |
tags: | added: isv |
Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package libappindicator - 12.10.1+
---------------
libappindicator (12.10.
* AppIndicator: fix icon and theme paths when running in $SNAP
environment (LP: #1600136)
-- Marco Trevisan (Treviño) <mail@3v1n0.net> Wed, 15 Feb 2017 14:14:47 +0000
Changed in libappindicator (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for libappindicator has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package appmenu-qt5 - 0.3.0+16.
---------------
appmenu-qt5 (0.3.0+
* IconCache: get the proper theme path based on the fact we're using a
themed icon or not (LP: #1600136)
* IconCache: use $XDG_RUNTIME_DIR as preferred place where to save
icons
* AppMenuPlatform
other environments (LP: #1606246)
-- Marco Trevisan (Treviño) <mail@3v1n0.net> Thu, 16 Feb 2017 22:57:56 +0000
Changed in appmenu-qt5 (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #22 |
This bug was fixed in the package sni-qt - 0.2.7+16.
---------------
sni-qt (0.2.7+
* statusnotifieritem: reset app usertime on activation to ensure
compiz will raise it (LP: #627195)
* IconCache: get the proper theme path based on the fact we're using a
themed icon or not (LP: #1600136)
* fsutils: always use $XDG_RUNTIME_DIR if it's set for saving icons
-- Marco Trevisan (Treviño) <mail@3v1n0.net> Fri, 17 Feb 2017 01:14:24 +0000
Changed in sni-qt (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #23 |
This bug was fixed in the package qtbase-
---------------
qtbase-
[ Marco Trevisan (Treviño) ]
* debian/
- QDBusTrayIcon: try use runtime or cache for icons (LP: #1600136)
* debian/
- QDBusTrayIcon: always save the temp icon in Unity (LP: #1600136)
-- Timo Jyrinki <email address hidden> Thu, 09 Feb 2017 08:42:30 +0000
Changed in qtbase-opensource-src (Ubuntu): | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #24 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in qtbase-opensource-src (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in snapd (Ubuntu Xenial): | |
status: | New → Confirmed |
no longer affects: | snapd (Ubuntu) |
no longer affects: | snapd (Ubuntu Xenial) |
affects: | snappy → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | qt → ubuntu-translations |
no longer affects: | ubuntu-translations |
To expand a little bit on this. So indeed, what's happening is:
- the client side set some icons/assets in its /tmp (which is != from the system /tmp)
- the client then sends his menu + the icon uri to the system shell
- the system shell tries to open the icon at that address which doesn't exist.
There are multiple issues there:
- as we want snapd to be cross distros, I don't think we can patch Qt, GTK and other toolkits to export indicators with translated path (client side)
- if we go that road, it means we need to make the application aware it's running in a snapd environment, unsure this is wanted
- patching all shells (at least Unity, GNOME Shell and KDE plasma) has the same issue in term of cross distro compatibility (shell-system-side)
- ofc, we don't want /tmp to be the same than the system one
- I don't think apparmor can do this on the fly translations, right? Patching dbus is an option (with a running on snapd awareness), but brings the same issue in term of cross distro distributions.
Any other idea?