Results 1 to 2 of 2

Thread: Superuser Privileges

  1. #1
    Join Date
    Dec 2017
    Qt products
    Qt5 Qt/Embedded
    MacOS X Unix/X11 Windows Android

    Default Superuser Privileges

    Hi everyone,
    I'm using some interfaces that are associated with system resources which you need Superuser Privileges to interact with them.
    For instance, in Ubuntu, they don't execute right without "sudo" command in terminal.
    I can run the Qt project from terminal in Ubuntu with "sudo" command and interact with interface.
    Problem: Although it executes in Qt Creator but do not interact with the interface.

    How can I benefit from Superuser Privileges to execute a program in Qt Creator (Any Platforms, specially Windows and Linux) ?
    Or any alternative ...

  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 590 Times in 580 Posts
    Qt products
    Unix/X11 Windows Android

    Default Re: Superuser Privileges

    If you want to run a program that requires superuser / admin privileges, you generally need to start the shell that runs the program with those privileges. That means running Qt Creator itself via sudo (or "Run as Administrator" in Windows), or configuring the run command in Qt Creator to run the program via sudo. I'm not sure how you would do it in Windows; I usually just set up a shortcut so it runs Qt Creator with elevated permission.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    CodeFreak (30th July 2018)

Similar Threads

  1. Application with admin privileges
    By kibic1987 in forum Newbie
    Replies: 1
    Last Post: 12th March 2013, 02:30
  2. QT for MacX installs only for superuser (root)
    By timmu in forum Qt Programming
    Replies: 0
    Last Post: 1st October 2012, 22:29
  3. Escalating Privileges
    By manekineko in forum Qt Programming
    Replies: 7
    Last Post: 20th November 2009, 01:54
  4. Debugging as superuser on Mac OS
    By serget in forum Qt Tools
    Replies: 0
    Last Post: 11th September 2009, 05:46
  5. Dynamically getting root privileges for an app
    By fullmetalcoder in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2007, 11:26

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.