[Interest] Debugging as root.

Bo Thorsen bo at fioniasoftware.dk
Thu Feb 14 22:51:06 CET 2013

Den 14-02-2013 20:18, André Pönitz skrev:
> On Thu, Feb 14, 2013 at 08:26:07AM +0100, Bo Thorsen wrote:
>> Den 14-02-2013 03:54, Thiago Macieira skrev:
>>> On quarta-feira, 13 de fevereiro de 2013 19.22.07, Jason Cipriani
>>> wrote:
>>>> I'm developing an application in Qt Creator that needs to be run as
>>>> root.  I'd rather not run Qt Creator itself as root. Can I
>>>> configure Qt Creator to run the application as root when I press
>>>> the run button?
>>> You may be able to tell Creator that your debugger isn't "gdb", but
>>> a wrapper program that is setuid root and execs gdb.
>>> Or to use Creator's remote debugging ability to connect to a running
>>> gdbserver that you started as root. This is probably the most likely
>>> to succeed (Debug > Start Debugging > Attach to Remote Debug
>>> Server).
>> setuid gdb? "sudo gdb" as the debugger?
>> If you do try setuid gdb, remember to remove this again as soon as you
>> are done debugging.
>> Haven't tried any of them. If you solve the puzzle, please let us know
>> the way you did it. You are not the only one who have hit this
>> problem.  When I did on Windows, I ran QtC as administrator.
> If that's a feature you use regularly and/or of general
> interest you could consider filing a feature request on
> bugreports.qt-project.org.

I have only hit this once and that was for a project where I wrote all 
the code, so to me it would make more sense to have a documented 
procedure on how to do it. I don't know how much of a problem it is for 


Bo Thorsen.

Fionia Software - Qt experts for hire.

More information about the Interest mailing list