Unsolved How to run qt program tray display with root
-
I can run qt program in ordinary user to display the tray, but cannot run with root permission to display the tray
-
Hi and welcome to the forums
Why not?
What happens?
Does it say error?
What OS are you on?
What tray are you talking about? -
@leisureg said in How to run qt program tray display with root:
tray
Command line display:QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
tray errorI am using ubuntu18.04
I want it to appear like a power source in the upper right corner of the operating system
if (!QSystemTrayIcon::isSystemTrayAvailable()) { qDebug() << "tray error" << endl; }
sudo run it will into qDebug,but general authority don't
-
Hi and welcome to devnet,
From what I remember, by default access to the X server is disabled for root for security reasons. You have to explicitly allow it.