Hello!

I have problem to run a GUI application as root in Linux. I have created a standard Qt GUI application with qtcreator and running it as a normal user works fine.

If I try to run it with the command
Qt Code:
  1. kdesu ./myapp
To copy to clipboard, switch view to plain text mode 
no window appears and the application exits. However, I can run it with
Qt Code:
  1. su -c ./myapp
To copy to clipboard, switch view to plain text mode 
or if a log in as root and then launch the application. I have no problem to launch e.g. kwrite with kdesu so way does my application not start?

A cannot sudo either as it complains about not being able to connect to the X server. This seams to have something to do with QApplication. QCoreApplication does not have this problem with sudo.

I just want to run the application with kdesu, way can't I do that?


Fredrik