Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud Tray Icon missing on Gnome Wayland sessions #21

Open
Iolaum opened this issue Sep 13, 2020 · 16 comments
Open

Nextcloud Tray Icon missing on Gnome Wayland sessions #21

Iolaum opened this issue Sep 13, 2020 · 16 comments

Comments

@Iolaum
Copy link

Iolaum commented Sep 13, 2020

I was testing the nextcloud-client flatpak in Fedora SilverBlue 32.

I noticed that on the Wayland session I was not seeing the nextcloud tray icon. My system has installed the gnome-shell-extension-appindicator as a layered package to help facilitate this. I also tested the element flatpak that had a working tray icon. Comparing the settings from element and that I was getting a system tray icon in a Gnome on Xorg session I was able to resolve this by adding the socket=fallback-x11 permission.

More over I noticed from element's settings that only org.kde.StatusNotifierItem-2-1=own was needed instead if org.kde.*=own for the indicator to show up.

Here are some information from my set up for reproducibility of the results.

$ flatpak info --show-permissions com.nextcloud.desktopclient.nextcloud
[Context]
shared=network;ipc;
sockets=x11;wayland;fallback-x11;
devices=dri;
filesystems=xdg-run/Nextcloud:create;xdg-config/kdeglobals:ro;host;

[Session Bus Policy]
org.kde.StatusNotifierWatcher=talk
com.canonical.AppMenu.Registrar=talk
org.freedesktop.Notifications=talk
org.freedesktop.secrets=talk
org.kde.StatusNotifierItem-2-1=own

[Environment]
TMPDIR=/var/tmp
$ flatpak info --show-permissions im.riot.Riot 
[Context]
shared=network;ipc;
sockets=x11;pulseaudio;
devices=all;
filesystems=xdg-download;xdg-run/keyring;

[Session Bus Policy]
org.kde.StatusNotifierWatcher=talk
org.freedesktop.portal.Fcitx=talk
org.freedesktop.Notifications=talk
org.kde.StatusNotifierItem-2-1=own
$ echo $XDG_SESSION_TYPE
wayland
$ cat /etc/os-release 
NAME=Fedora
VERSION="32.20200912.0 (Silverblue)"
ID=fedora
VERSION_ID=32
VERSION_CODENAME=""
PLATFORM_ID="platform:f32"
PRETTY_NAME="Fedora 32.20200912.0 (Silverblue)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:32"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-silverblue/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=32
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=32
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Silverblue"
VARIANT_ID=silverblue
OSTREE_VERSION='32.20200912.0'
$ rpm-ostree status
State: idle
Deployments:
● ostree://fedora:fedora/32/x86_64/silverblue
                   Version: 32.20200912.0 (2020-09-12T16:13:20Z)
                BaseCommit: 8dc4fb5bb5d63db1791aa1027af328c036fc7f1ed6bfb5c28cc0667d73ce9de7
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: fedora-workstation-repositories gnome-shell-extension-appindicator gnome-shell-extension-dash-to-dock pam-u2f pamu2fcfg

P.S.1: Flatseal was an awesome software to help me look into this.
P.S.2: Happy to make a PR for this if maintainer(s) are willing to implement those changes.

@Iolaum Iolaum changed the title Nextcloud Tray Icon missing on Wayland sessions And Suggested Fix Nextcloud Tray Icon missing on Wayland sessions Sep 20, 2020
@Iolaum
Copy link
Author

Iolaum commented Sep 20, 2020

After further testing this behavior appears to not be reliable. Maybe it wasn't the new socket access that made a difference. Even in the same session the nextcloud-client tray icon may appear the first time nc-client runs but not on any subsequent runs (after you exit the app on your own on the first time). Moreover they tray icon exhibited different patterns of appearing and not appearing between the two users on my installation ...

@Iolaum Iolaum changed the title Nextcloud Tray Icon missing on Wayland sessions Nextcloud Tray Icon missing on Gnome Wayland sessions Sep 20, 2020
@kollienne
Copy link

Disabling socket=wayland seems to do the trick as a workaround.

@thalesmaoa
Copy link

I'm not sure if this is related, but this is how the icon appears for me.

image

I really wanna quit AppImage and use Flatpak, but I'm not sure how to fix this icon.

@thalesmaoa
Copy link

thalesmaoa commented Feb 9, 2022

I've check the icon problem, and this is not related to Wayland, however it still is a icon problem.
It seems to be an export issue flatpak/flatpak#4495, which has been fixed inside remmina but persist in Nextcloud flathub/org.remmina.Remmina#84

Other related issues:
flathub/com.valvesoftware.Steam#322

@adminelix
Copy link

any updates here?

@Razer0123
Copy link

Still having this issue

@narFnarF
Copy link

I'm on X11 and I have this issue too.

@Zlopez
Copy link

Zlopez commented Jul 27, 2023

I see three dots instead of correct icon.
image

@thalesmaoa
Copy link

I think this is not an official repository since no developer replied to it. Does anyone realized how to fix it?

@Zlopez
Copy link

Zlopez commented Nov 13, 2023

No, I started using the one that is bundled in Fedora, which fixed most of the issues for me and has better integration with Nautilus.

@tootbrute
Copy link

I see three dots instead of correct icon. image

i have that also. it's a useless icon. you aren't notified if you're syncing or not. if you install the real app there is a green checkbox if it's all synced or a red x if there is a probem. this three dots doesn't tell us anything. can we get a better icon?

@cClaude
Copy link

cClaude commented Jan 3, 2024

Disabling socket=wayland seems to do the trick as a workaround.

@kollienne Could you provide more details to use this workaround ?

@picsel2
Copy link
Contributor

picsel2 commented Apr 6, 2024

Looking at lines 4900f. https://buildbot.flathub.org/#/builders/5/builds/13664/steps/7/logs/stdio it seems to me that the tray icons are not exported.

@picsel2
Copy link
Contributor

picsel2 commented Apr 6, 2024

I found another interesting difference: the flatpak build sends a concrete icon name (e.g. "state-offline") as property of the dbus object /StatusNotifierItem, whereas on Fedora 39 the dnf-provided binary sends an empty string as icon name forcing the tray to use the image data array instead of the name.

https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem/#org.freedesktop.statusnotifieritem.iconname

@jordan-bravo
Copy link

Disabling socket=wayland seems to do the trick as a workaround.

This didn't work for me on openSUSE Aeon (Gnome).

Currently I am unable to get the icon working properly with the Flatpak version of Nextcloud Desktop.

I was able to install the RPM package version of Nextcloud Desktop, but I would like to use the Flatpak version once the icon issue is fixed.

@tintou
Copy link
Contributor

tintou commented Jul 21, 2024

Here is some context with the issue for anyone wanting some:

Nextcloud is using QSystemTrayIcon, its documentation stands:

So it is likely using the D-Bus status notifier system which means that the rendering is happening outside of the sandbox. As such, it can't know where the icons are located as only the application icon is exported.

There is no real way out that I can think of. I would really recommend using the interface exposed in libcloudproviers in your system instead, it should already be included in GNOME Files (Nautilus).

picsel2 added a commit to picsel2/com.nextcloud.desktopclient.nextcloud that referenced this issue Aug 26, 2024
This is an ugly workaround for flathub#21. It prevents passing an icon name over
DBus to the host environment where the theme is not known.
Instead it enforces the use of the PixMap.
picsel2 added a commit to picsel2/com.nextcloud.desktopclient.nextcloud that referenced this issue Oct 4, 2024
This is an ugly workaround for flathub#21. It prevents passing an icon name over
DBus to the host environment where the theme is not known.
Instead it enforces the use of the PixMap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests