Results 1 to 4 of 4

Thread: run executable file of qt creator as sudo

  1. #1
    Join Date
    Sep 2015
    Posts
    11
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question run executable file of qt creator as sudo

    Hello folks,

    I want to run the executable file made by qt creator as sudo(root) because my device attached with qt creator needs to run as sudo.
    Every time I need to open terminal and run my executable file as sudo ./executable..Now I want to run the project direct in qt creator by pressing run button.
    Can anyone help me on the same.
    Please reply asap

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: run executable file of qt creator as sudo

    You could create a script that runs sudo your application and change the project's run settings to run the script instead of the program.

    But of course it would be better to check if you really have to run the program with elevated priviledges.

    Cheers,
    _

  3. #3
    Join Date
    Sep 2015
    Posts
    11
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: run executable file of qt creator as sudo

    how to do that?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: run executable file of qt creator as sudo

    Quote Originally Posted by ftl_embedded View Post
    how to do that?
    Do what?

    Write a script?
    Change run settings?
    Find a way of not requiring sudo?

    Cheers,
    _

Similar Threads

  1. associating file with executable
    By avanindra in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2012, 08:27
  2. run a executable file
    By Ali Reza in forum Newbie
    Replies: 4
    Last Post: 17th June 2012, 21:09
  3. executable file not working
    By duma in forum Newbie
    Replies: 5
    Last Post: 31st August 2011, 08:48
  4. Replies: 5
    Last Post: 31st August 2011, 00:21
  5. Replies: 5
    Last Post: 15th June 2010, 08:42

Bookmarks

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.