Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Systray not showing
Forum Updated to NodeBB v4.3 + New Features

Systray not showing

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 999 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tnrgus
    wrote on last edited by
    #1

    I have an application called foo that runs as root.

    The foo calls system function to execute the other application which show tray icon using Qt.

    The "Systray Icon Example in Qt":http://qt-project.org/doc/qt-4.8/desktop-systray.html is working properly in user account but not in root.

    I run the following command to drop privileges:
    system("exec su -l user -c 'export DISPLAY=:0; /opt/systray &'");

    However, the systray icon doesn't appear in Ubuntu 13.10 & 14.04.

    Is there any way to display this systray in case the admin app has to run the other app, except for the solution that uses a PPA that comes with to re-enable the systray whitelist?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From very old memories (so it might not be relevant anymore) there was a time where you had to explicitly disable X security to allow root to execute GUI application. You might find something based on that.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andreyc
        wrote on last edited by
        #3

        If SGaist is right then as an alternative to disabling X security I would suggest to use a user application that will show tray icon and root application that will tell to the user app when to show and what to show.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved