Hi

My QT aplication (Qt4) needs root permisions. I'm not sure if I do it right, since I'm new to Linux... and I'm getting an error

Assume my executable is called MyApp I did the following:

chown root:root MyApp
chmod ug+s MyApp

When i tried to run MyApp from my user without root permissions, Instead of being asked to enter password, i got the following:

In one machine i got this waring but the application run..:

This process is currently running setuid or setgid.
GTK+ does not allow this therefore Qt cannot use the GTK+ integration.
Try launching your app using 'gksudo', 'kdesudo' or a similar tool.

in a second machine i got this error and MyApp does not run

GLib-GIO: ERROR:/build/buildd/glib2.0-2.26.0/gio/gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL)


What am i doing wrong? how should i solve this? Please be noted that my trial MyApp application looks like that:

QApplication a(argc, argv);
Widget w; // inherit from QWidget -this is the basic template that QtCreator creates...with nothing additional
w.show();
return a.exec();