Important: Please read the Qt Code of Conduct -

Refusing to initialize GTK+

  • I have one non qt native app, which launches my Qt app using QProcess:;startDetached()
    My Qt application uses QWebKit to open websites which has flash.
    When I am running it I am getting the error as

    Gtk-WARNING **: This process is currently running setuid or setgid.
    This is not supported use of GTK+. you must create a helper program instead.

    Refusing to initialize GTK+
    X11 EVENT : client_get_leds()

    My platform is Open Suse 11.2SP2 , Qt 4.6.3

  • Moderators

    So are you running a suid/sgid binary? Are you using the gtk styling (that is the only reason why Qt should use gtk)? Pass "-style cleanlooks" to your application and see whether that works.

    Independent of whether you can make this work: It is a bad idea to run graphical applications with setuid or setgid. It matters little whether those are written using Qt or GTK. Do what GTK suggests: Write a helper application instead and call that for the privileged actions.

  • Hi ,

    glad to see some suggestions. Actually what do you mean by running suid/sgid binary????
    I just created a simple QApplication which merely display a QWebView dialog to open some websites.
    I am very new to the Linux world. Would you please explain it little more about how should I run my app.

    Additionally I explicitly did not set any QGtkstyling, I just created a QWebView object and I am using it, That's all.

    Do I need to give command line argument to my Qt app as "-style cleanlooks"????????

Log in to reply