Linux application looks ugly when launched with sudo
-
wrote on 19 Apr 2011, 15:27 last edited by
Good day, colleagues!
I'm writing Linux application that needs root privelleges. The problem is when I launch it from normal user, it looks nice, but when I launch it with sudo it looks ugly (wrong style, fonts, etc).
Could you explain such behaviour?
-
wrote on 19 Apr 2011, 15:54 last edited by
Strange,
But mayby thats because root has different windowmanager settings.
Do you work with stylesheets? -
wrote on 19 Apr 2011, 15:59 last edited by
No, I've just create simple window in Qt Designer.
normal execution:
!http://img13.imageshack.us/img13/47/screenshotnormal.png!
sudo execution:
-
wrote on 19 Apr 2011, 16:09 last edited by
Thats what i tought,
your 'sudo' window is in motif style.
try "this":http://doc.qt.nokia.com/4.7/qplastiquestyle.html -
wrote on 19 Apr 2011, 16:12 last edited by
Maybe this "link":http://helpforlinux.blogspot.com/2009/01/make-sudo-applications-beautiful.html could help.
-
wrote on 19 Apr 2011, 16:12 last edited by
Try running qtconfig via sudo and changing the default widget style to plastique or oxygen or whatever takes your fancy.
-
wrote on 19 Apr 2011, 16:41 last edited by
Executing an application with "sudo", takes the default theme, so not style configuration is applied.
You can customize the root theme, but is a solution per machine, or maybe you can set the style of the application through code with Qt. -
wrote on 21 Apr 2011, 06:49 last edited by
Thank you all, sudo qtconfig did the trick!
6/8