haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
469 stars 280 forks source link

Applet icon disappeared #797

Open slahtinen opened 8 years ago

slahtinen commented 8 years ago

After latest upgrades to the client (5.1.0) seafile-applet icon disappeared in my environment (Ubuntu 16.04 with i3wm desktop). It works with Unity. It seems, that this affects to some other desktops too (XFCE / Ubuntu 14.04.4) and may be related to latest QT5 upgrade.

If I remove appmenu-qt5 or pass "export QT_QPA_PLATFORMTHEME=" from terminal and then launch seafile-applet, then icon gets visible again.

shoeper commented 8 years ago

Most people being involved do already know it, but I link the forum topic as reference here: https://forum.seafile-server.org/t/client-5-1-0-tray-icon-missing/4708

ant9000 commented 8 years ago

The above solution does not work on Debian 8.4 with Gnome desktop. I've tried to strace seafile-applet, but the icon is not even looked for. I could debug the question further, if someone has hints to guide me.

its-thomas commented 8 years ago

Issue report from Xubuntu 14.04 (64-Bit): Installed Seafile 5.1.0 the day before yesterday. At first, icon was displayed correctly and functional, then (after some time) it moved to the very left end of the taskbar before it completely disappeared. Yesterday, it all of a sudden reappeared for a short time in the correct place when my WiFi connection dropped, but disappeared again after restart. Trying to reproduce this incident by intentionally dropping my WiFi were not successfull, just like any other tries to solve the issue.

its-thomas commented 8 years ago

Reporting from a brand new Lubuntu 16.04 (64-Bit) installation: Seafile 5.1.0 icon is working fine and 100% functional.

MarcoSteinacher commented 8 years ago

Reporting from Debian 8 with QT5 5.3.2+dfsg-4+deb8u1 and XFCE 4.10.1:

BillyZeeeMountain commented 8 years ago

The same with Debian 8 with QT5 5.3.2+dfsg-4+deb8u1 and Gnome 3.14.1-7:

urbie-mk2 commented 8 years ago

trayIcon.tar.gz

Run this program (compile from source if necessary: qmake && make). A firefox tray symbol should appear. Also, could you check dbus-monitor for messages concerning the new process, especially communication for a StatusNotifierItem-<PID> ?

ant9000 commented 8 years ago

On Tue, Jul 12, 2016 at 10:08 PM, dbruenig notifications@github.com wrote:

Run this program. A firefox tray symbol should appear.

No way to run it on a fully update Debian Stable:

$ ./trayIcon ./trayIcon: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: no version information available (required by ./trayIcon) ./trayIcon: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by ./trayIcon) ./trayIcon: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by ./trayIcon) ./trayIcon: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: no version information available (required by ./trayIcon) ./trayIcon: relocation error: ./trayIcon: symbol qt_version_tag, version Qt_5.7 not defined in file libQt5Core.so.5 with link time reference

No wonder, though, since the shipped Qt5 is version 5.3.2.

HTH,

Antonio

urbie-mk2 commented 8 years ago

@ant9000 As I expected but you can compile it yourself with qmake && make

ant9000 commented 8 years ago

On Wed, Jul 13, 2016 at 9:03 AM, dbruenig notifications@github.com wrote:

@ant9000 As I expected but you can compile it yourself with qmake && make

Today I'm on my development machine, I installed the relevant packages (qt5-qmake and qbase5-dev) and I compiled it. The result:

$ ./trayIcon QSystemTrayIcon::setVisible: No Icon set

An empty notifier does exist in the tray, but no icon appears. Changing "firefox" with "firefox-esr" mutes the "No Icon set" warning, but still the tray notifier shows no icon.

The output from dbus-monitor is the following:

signal sender=:1.3 -> dest=(null destination) serial=878 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=ClientAdded object path "/org/gnome/SessionManager/Client20" signal sender=org.freedesktop.DBus -> dest=(null destination) serial=11491 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged string ":1.203" string "" string ":1.203" method call sender=:1.203 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello method call sender=:1.203 -> dest=org.freedesktop.DBus serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.a11y.Bus',arg1=''" method call sender=:1.203 -> dest=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameHasOwner string "org.a11y.Bus" method call sender=:1.203 -> dest=org.freedesktop.DBus serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner string "org.a11y.Bus" method call sender=:1.203 -> dest=org.freedesktop.DBus serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.a11y.Bus'" method call sender=:1.203 -> dest=org.a11y.Bus serial=6 path=/org/a11y/bus; interface=org.freedesktop.DBus.Properties; member=Get string "org.a11y.Status" string "ScreenReaderEnabled" method return sender=:1.1 -> dest=:1.203 reply_serial=6 variant boolean false method call sender=:1.20 -> dest=org.freedesktop.DBus serial=15899 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writer/user',arg0path='/org/gnome/desktop/notifications/'"

Let me know if I can dig deeper or help you in some way.

Thanks a lot for debugging this problem,

Antonio

quesada commented 8 years ago

I see no tray icon on tumbleweed either.

nidico commented 8 years ago

We also have this issue, but only with the one machine with the nvidia graphics card, the other machines all have intel chips. This is all on kubuntu 14.04.

src386 commented 7 years ago

Same problem on Debian 8 + MATE, Seafile 5.1.4, no systray icon.

urbie-mk2 commented 7 years ago

@quesada Which version of seafile ? In which way do you install it in opensuse tumbleweed ?

urbie-mk2 commented 7 years ago

@src386 Debian 8.6 ? Which version of Mate ?

urbie-mk2 commented 7 years ago

@nidico If I read your description correctly: Icon is visible with intel gfx and it is not visible with nvidia gfx ? Could you get the log messages from the nvidia gfx machine when you start seafile-applet ?

src386 commented 7 years ago

@dbruenig : debian 8.6, mate 1.8.1.

urbie-mk2 commented 7 years ago

@src386 I installed Debian 8.6 with mate in a virtual machine and could reproduce the missing tray icon. It happens that Debian 8.6 has outdated qt libraries installed which causes this problem. Since Debian is not a distribution of my choice I

  1. changed the version in sources.list to testing,
  2. ran apt-get dist-upgrade
  3. recompiled Seafile to quickly check if the latest system works with Seafile without losing myself in details. I can confirm that the tray applet icon then worked again.

Since this might be a bit of a problem for just making one program work again like it should you could update the qt libraries on your system and then recompile the Seafile applet only to make it work. The true nature of this problem lies in the slow update rate of Debian etc which is troublesome in a case like this when some components move faster in their development than others and bugs get unfixed for a longer while. There have been tremendous changes in Qt and KDE in the last months and Debian apparently did not update its repositories fast enough to catch up.

Of course you could also wait until it works after some future distribution upgrade. Or change to a operating system like arch linux which applies a rolling release style of updating where software bugs get fixed much faster although it requires to know the internals of a Linux operating system much more than the others (Debian, Fedora, Ubuntu, etc).

I will check the other distributions, too, once I get a reply.

src386 commented 7 years ago

@dbruenig : Thank you. Today, for an unknown reason, I have the systray icon...

ant9000 commented 7 years ago

Debian 8.6, with provided Gnome version, does not work - Intel and Radeon GPU, if that matters. I understand that the Qt5 libs in Jessie are not the latest version, but this is by design - it's called Stable for a reason.

Upgrading Qt or switching to a different distro only to make SeaFile work is not an option: the missing tray icon is still there if I use SeaFile 5.0.6 - so it is obviously possible to make it behave as it should.

I'm more than willing to help in this matter, just let me know if I can do something.

Antonio

urbie-mk2 commented 7 years ago

@ant9000 I installed a new debian 8.6 (jessie) gnome vm and compiled seafile 5.0.6. The seafile-applet tray icon was not visible. Are you sure it does work with 5.0.6 ?

nidico commented 7 years ago

@nidico If I read your description correctly: Icon is visible with intel gfx and it is not visible with nvidia gfx ?

Yes (there are other differences as well - the Nvidia laptop is a Thinkpad T420 whereas the Intel laptops are X220/X230 machines), everything's running on Kubuntu Trusty 14.04 with kubuntu-ppa backports (to have the newest 4.xx KDE).

Could you get the log messages from the nvidia gfx machine when you start seafile-applet ?

Unfortunately I don't have the machine at hand. I could try it on Friday (if I don't forget about it).

ant9000 commented 7 years ago

@dbruenig Yes, I'm positive. I did not recompile, though - I'm using the old official .deb package.

urbie-mk2 commented 7 years ago

@ant9000 Could you make the Debian packages available from which you deployed the Seafile client ?

ant9000 commented 7 years ago

It is the official package I have downloaded at the time:

seafile_5.0.6_amd64.deb.zip

Each of the newer ones has the missing tray icon bug - this one works.

urbie-mk2 commented 7 years ago

@ant9000 I was not aware of gnome 3.14.1 not showing any application tray icons at all by default. Apparently Mod+M opens a notification area at the bottom of the screen which only then makes the 'tray' icon visible again. All the time I was focused on the top right area, in the panel, where other icons where already visible expecting other tray icons to appear there as well.

I could confirm that 5.0.6 did show the 'tray' icon whereas 5.1.4 did not. I also found a gnome extensions in the process which put the application tray icons back where they belong: https://extensions.gnome.org/extension/495/topicons/

I am having a look at the version differences right now.

urbie-mk2 commented 7 years ago

@ant9000

The reason why the Seafile icon of version 5.0.7 - 5.1.0 is visible in Debian 8.6 is because these versions still link against qt4 which has a different tray mechanic and implementaiton than qt5.

Starting from 5.1.1 and later seafile-applet is linked against qt5.3 on Debian 8.6. That version has the mentioned tray bug. See https://bugreports.qt.io/browse/QTBUG/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel

This could be avoided if later versions of Seafile-applet were linked against qt4 libraries which will most likely not happen. In this case it is not really the responsibility of Seafile since the bug lies within the Qt toolkit. Whatever the reasons are why the Qt libraries are not patched or updated in Debian it is a problem after all for its users who rely on software built on Qt for the time the patched version is released.

If you want to use an updated version of Seafile-Applet you could create or download a debian package of a newer Qt version.

I compiled and installed Qt5.7 and linked seafile-applet against it which results in the tray being there but the icon is not visible. I can right click the area where the icon would appear and access the context menu though. This is yet another problem.

ant9000 commented 7 years ago

@dbruenig

The reason why the Seafile icon of version 5.0.7 - 5.1.0 is visible in Debian 8.6 is because these versions still link against qt4 which has a different tray mechanic and implementaiton than qt5.

Mh, for me the last version of SeaFile sporting the tray icon is 5.0.6.

I compiled and installed Qt5.7 and linked seafile-applet against it which results in the tray being there but the icon is not visible. I can right click the area where the icon would appear and access the context menu though. This is yet another problem.

This is exactly the problem I have with anything more recent than 5.0.6: the button space is allocated in the tray area, but the icon is missing.

Tested again your trayIcon.tar.gz program on Debian 8.6. When compiling against Qt4 it works fine (after changing "firefox" to "firefox-esr" or "seafile"). Compiling with Qt5, the icon is missing.

In my case, Qt4 and Qt5 are Debian 8.6 default versions, namely 4.8.6 and 5.3.2: but from your test, even using Qt5.7 does not resolve the problem.

urbie-mk2 commented 7 years ago

@ant9000

There are no changes between 5.0.6 and 5.0.7 regarding the tray icon. Neither are there any from 5.1.0 to 5.1.1.

.6, .7 and .10 are linked against qt4.:

readelf -d seafile-applet ver5.0.6, ver5.0.67 and ver5.0.10:
...
 0x0000000000000001 (NEEDED)             Shared library: [libQtGui.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libQtDBus.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libQtXml.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libQtNetwork.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libQtCore.so.4]
...

So these versions should at least show a tray icon.

readelf -d seafile-applet ver5.1.1+
...
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Core.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Gui.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Widgets.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Network.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Test.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5DBus.so.5]
...

If the old Qt5.3 version is installed there should not be a tray symbol.

This time I removed the old Qt5.3 version completely prior installing Qt5.7 after getting compilation errors for the trayIcon test program.

And indeed the problem was having both Qt5.3 and Qt5.7 versions installed at the same time on the system. Now with Qt5.3 removed and seafile-applet recompiled again the tray icon is visible with Seafile version 5.1.1 onwards.

Eventually this should conclude that Seafile in its current version has no bugs regarding the tray icon and that the known bug in Qt5.3 is fixed in later versions. Debian just has not fixed this problem yet.

ant9000 commented 7 years ago

@dbruenig

Never noticed it before, since the only application I use that misses a tray icon is Seafile: but you are completely right, the bug is in Qt5 implementation of QSystemTrayIcon that does not support correctly all of the tray protocols in use on Linux.

https://bugreports.qt.io/browse/QTBUG-32811

I've been digging a bit but could not find any workaround except patching or upgrading Qt5.

Antonio

urbie-mk2 commented 7 years ago

@ant9000 There might be a workaround. Try this extension and see if you can get a visible tray icon then. It does use the kde way and ignores the gnome way:

https://extensions.gnome.org/extension/615/appindicator-support/

ant9000 commented 7 years ago

@dbruenig Thank you for your support. I've tried the extension, but with no luck: Seafile does not get back its icon - it is not even listed among the current systray applications in the extension preferences.

camlafit commented 7 years ago

Hi

I've same problem, on jessie/gnome3 , trayicon appear after a login session but disappear after "r" action to reload gnome-shell I've use topicon and looks required to display trayicon without (nothing also on new session)

appindicator-support doesn't care about seafile, in my case only ring is detected by this extension.

ant9000 commented 7 years ago

Now running client 6.0.0 on Debian 8.7: the tray icon is back - and the trayIcon test also works correctly.

Don't know if it may be related, I have updated a few graphics packages from backports:

ii  i965-va-driver:amd64                     1.7.3-1~bpo8+1
ii  libdrm-intel1:amd64                      2.4.74-1~bpo8+1
ii  libdrm2:amd64                            2.4.74-1~bpo8+1
ii  libegl1-mesa-drivers:amd64               12.0.4-2~bpo8+1
ii  libgl1-mesa-dri:amd64                    12.0.4-2~bpo8+1
ii  libllvm3.8:amd64                         1:3.8.1-12~bpo8+1
ii  libva-drm1:amd64                         1.7.3-2~bpo8+1
ii  libva1:amd64                             1.7.3-2~bpo8+1
ii  vdpau-va-driver:amd64                    0.7.4-6~bpo8+1
ii  xserver-xorg-video-intel                 2:2.99.917+git20161206-1~bpo8+1

(my laptop has an Intel i965 GPU).

Antonio