Systray not showing



  • 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?


  • Lifetime Qt Champion

    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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.