Skip to content

[Linux] [Ubuntu 16.04] No tray icon in Xenial #4693

Closed

Description

@stephen-d-hill

Expected behaviour

To see icon

Actual behaviour

No icon

Steps to reproduce

Install owncloud client

Client configuration

Client version: 2.1.1+dfsg-1ubuntu1

Operating system: Xubuntu 16.04

OS language: English UK

Activity

  1. changed the title [-]No notification icon in Xubuntu Xenial[/-] [+]No tray icon in Xubuntu Xenial[/+] on Apr 18, 2016
  2. guruz commented on Apr 18, 2016

    @guruz
    Contributor

    What do you see instead?
    Can you run the client as owncloud --logfile - and paste the output?
    Which Qt version?

  3. stephen-d-hill commented on Apr 18, 2016

    @stephen-d-hill
    Author

    The owncloud main window works fine, just no notification icon.
    I am unsure how to find out my QT version.

    logfile -
    owncloud_logfile.txt

  4. guruz commented on Apr 18, 2016

    @guruz
    Contributor

    Thanks, the logfile mentioned it.. Using Qt 5.5.1

    Is there nothing before that in the log?

    @ckamm @danimo maybe you know more about those tray issues..

  5. stephen-d-hill commented on Apr 18, 2016

    @stephen-d-hill
    Author

    Used --logfile instead of --logwindow this time -
    owncloud_logfile1.txt

  6. guruz commented on Apr 18, 2016

    @guruz
    Contributor

    Maybe this in Qt 5.6 helps..

    commit f156c33c2739d84b97cdedf6ae9568b9cea728d5
    Author: Dmitry Shachnev <[email protected]>
    Date:   Fri Apr 1 21:28:00 2016 +0200
    
        dbustray: Implement better detection of indicator-application
    
        We need to do the icon cache trick all desktops using indicator-application,
        these are not limited to Unity. For example, the default Xubuntu and Lubuntu
        desktops use indicator-application too.
    
        Without this, tray icons will be improperly shown on these desktops.
    
        Change-Id: Id397bbe9b594152d7c3a29c36c853e928af7dde4
        Reviewed-by: Shawn Rutledge <[email protected]>
    
  7. guruz commented on Apr 18, 2016

    @guruz
    Contributor

    Some more changes from that Qt branch.. FYI @ckamm

    commit a4fac65938fdee74c07d34727920fb74087f82c6
    Author: Dmitry Shachnev <[email protected]>
    Date:   Sat Feb 6 14:42:39 2016 +0300
    
        dbustray: Support late registering of tray icon menu
    
        If a menu is added to the tray icon after the icon itself has been registered,
        we need to register the menu properly.
    
        Change-Id: I19a6d78848142d66c2cd882746d8d55c0b9a2818
        Reviewed-by: Błażej Szczygieł <[email protected]>
        Reviewed-by: Shawn Rutledge <[email protected]>
    
    commit 7ad930987da7bb1d9aed17f25a1d99eeb5574a42
    Author: Dmitry Shachnev <[email protected]>
    Date:   Sat Feb 6 19:12:52 2016 +0300
    
        dbustray: Do not change m_menu in QDBusTrayIcon::createMenu()
    
        This method can be called for a submenu after it's called for the top-level
        menu, and we should not replace it with a submenu.
    
        Change-Id: I8e180ee074287cfcdc76dfe77c6c7aa7d5891741
        Reviewed-by: Błażej Szczygieł <[email protected]>
        Reviewed-by: Shawn Rutledge <[email protected]>
    
  8. scroom commented on Apr 22, 2016

    @scroom

    Can I provide more info? I'm as well experiencing this bug.

  9. danimo commented on Apr 22, 2016

    @danimo
    Contributor

    I now upgraded to 16.04 and the packages and I can confirm above findings. The workaround for now is to use the Ubuntu 15.10 packages provided by us. Those still are Qt4 based but solve the problem.

  10. danimo commented on Apr 22, 2016

    @danimo
    Contributor

    This must be a special bug related to the way we rebuild the System tray. A trivial example works just fine.

    #include <QApplication>
    #include <QSystemTrayIcon>
    #include <QImage>
    #include <QPixmap>
    #include <QMenu>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QImage img(64,64, QImage::Format_ARGB32);
        img.fill(Qt::red);
        QSystemTrayIcon sti(QIcon(QPixmap::fromImage(img)));
        QMenu *menu = new QMenu();
        menu->addAction("Foo");
        menu->addAction("Bar");
        menu->addSeparator();
        QMenu *submenu = new QMenu("Sub Menu");
        submenu->addAction("Bleh");
        menu->addMenu(submenu);
        menu->addSeparator();
        QObject::connect(menu->addAction("Quit"), SIGNAL(triggered(bool)), &a, SLOT(quit()));
        sti.setContextMenu(menu);
        sti.show();
    
        return a.exec();
    }
    
  11. Mustangman1966 commented on Apr 24, 2016

    @Mustangman1966

    Expected behaviour

    To see icon

    Actual behaviour

    No icon

    Steps to reproduce

    Install owncloud client

    Client configuration

    Client version: 2.1.1+dfsg-1ubuntu1

    Operating system: ubuntu 16.04

    OS language: Dutch

  12. danimo commented on Apr 24, 2016

    @danimo
    Contributor

    We know, please do not post any +1's. We are working on a solution to the problem.

  13. ogoffart commented on Apr 25, 2016

    @ogoffart
    Contributor

    I was able to locate the problem. The problem is in ubuntu's "appmenu-qt5" and is a bug that cause our call to QSystemTrayIcon::isSystemTrayAvailable() to remove the icon.

    That's because appmenu-qt5 seems to assume there is only one QPlatformSystemTrayIcon while there can be one per QSystemTrayIcon. in particular, QSystemTrayIcon::isSystemTrayAvailable creates a temporary one, and when it gets distroyed, it unregister the dbus object for the existing systray.

  14. 53 remaining items

  15. nickvergessen commented on May 18, 2016

    @nickvergessen
    Contributor

    The workaround from #4693 (comment) also helped on Linux Mint 17.3 (based on Ubuntu 14.04) using Qt 5.2.1

  16. detly commented on Nov 26, 2016

    @detly

    Still have this bug on Ubuntu 16.04.1 LTS. @tony5's PPA didn't change it.

    appmenu-qt5: 0.3.0+16.04.20151130-0ubuntu1
    owncloud-client: 2.2.4-1.3 (from OwnCloud PPA)

    The workaround of changing Exec=owncloud to Exec=env QT_QPA_PLATFORMTHEME=generic owncloud (in /usr/share/applications/owncloud.desktop) does not make the tray icon appear, even after reboot.

  17. detly commented on Nov 26, 2016

    @detly

    Turns out I had to change the entry in Gnome's startup applications (from /usr/bin/owncloud to /usr/bin/env QT_QPA_PLATFORMTHEME=generic owncloud).

  18. mitya57 commented on Dec 19, 2016

    @mitya57

    @christiandreher You have not specified which version of owncloud are you using, and whether or not you have appmenu-qt5 installed.

    Anyway, today I have uploaded a new version of owncloud-client package to Ubuntu 16.10, with #5072 backported, which should make it a bit better. It should be ready for testing in proposed pocket in a couple of days weeks. This is tracked in LP: #1635577.

  19. mitya57 commented on Jan 4, 2017

    @mitya57

    @christiandreher The new version was accepted into Ubuntu 16.10 Proposed repository today, please try it.

  20. guruz commented on Jan 5, 2017

    @guruz
    Contributor

    @mitya57 There seems to me a version mixup, I see 2.2.2 on your link instead of 2.2.4

  21. mitya57 commented on Jan 5, 2017

    @mitya57

    @guruz All right, Ubuntu 16.10 shipped with 2.2.2, I backported some fixes to that version. Ubuntu 17.04 has 2.2.4.

  22. yendar28 commented on Jan 12, 2017

    @yendar28

    Hi, since some days I have the same problem with a vanished "notification icon" and found an easy workaround for me. There were some qt5 files in the last update using Xubuntu.

    Workaround: Right-Click on "start icon" of Owncloud Client (in Systray) -> Properties -> Edit the currently selected Item -> Then activate "Use startup notification"

    After some tries the systray "notification icon" vanished again. So I deactivated "Use startup notification" this time and the icon appeared again after owncloud start. Do not ask me why. ;-)
    Starting owncloud from terminal also works.

    My System:
    Xubuntu 14.04 (xfce)
    owncloud client 2.2.4
    using Qt 5.2.1

    Edit: But I am not sure if just happens by chance. Perhaps it vanishes and occures completly independent from my given hint..

  23. modified the milestones: 2.3.0, 2.2.0 on Jan 20, 2017
  24. FlorianFranzen commented on Jul 10, 2017

    @FlorianFranzen

    @stephen-d-hill solutions works well, which is uninstalling appmenu-qt5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions