flathub / com.nextcloud.desktopclient.nextcloud

https://flathub.org/apps/details/com.nextcloud.desktopclient.nextcloud
7 stars 18 forks source link

Nextcloud Tray Icon missing on Gnome Wayland sessions #21

Open Iolaum opened 3 years ago

Iolaum commented 3 years ago

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 commented 3 years ago

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 ...

kollienne commented 3 years ago

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

thalesmaoa commented 2 years ago

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 commented 2 years ago

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 https://github.com/flatpak/flatpak/issues/4495, which has been fixed inside remmina but persist in Nextcloud https://github.com/flathub/org.remmina.Remmina/issues/84

Other related issues: https://github.com/flathub/com.valvesoftware.Steam/issues/322

adminelix commented 2 years ago

any updates here?

Razer0123 commented 1 year ago

Still having this issue

narFnarF commented 1 year ago

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

Zlopez commented 11 months ago

I see three dots instead of correct icon. image

thalesmaoa commented 8 months ago

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

Zlopez commented 8 months ago

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 commented 7 months ago

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 commented 6 months ago

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

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

picsel2 commented 3 months ago

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 commented 3 months ago

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