User forums > Using Code::Blocks

Execute programs with sudo rights in ubuntu.

(1/2) > >>

lilezek:
Hi. I'm doing a program that needs super user rights to work. So I need to build it and then execute it as sudo user.

How could I execute a debugger within code::blocks with super user rights? Could this be done without execute code::blocks as super user?

Thank you.

oBFusCATed:
This http://forums.codeblocks.org/index.php/topic,9775.0.html like the only solution at the moment.

MortenMacFly:

--- Quote from: oBFusCATed on April 04, 2011, 04:50:52 pm ---This http://forums.codeblocks.org/index.php/topic,9775.0.html like the only solution at the moment.

--- End quote ---
Alternatively you can setup a script for gdb that actually calls sudo and queries for a PW in an intelligent way (not stopping C::B from work).

oBFusCATed:
A script probably won't work, because C::B needs the PID of GDB.

MortenMacFly:

--- Quote from: oBFusCATed on April 04, 2011, 08:57:01 pm ---A script probably won't work, because C::B needs the PID of GDB.

--- End quote ---
...true. :oops:

Navigation

[0] Message Index

[#] Next page

Go to full version