Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: michelinok on August 23, 2008, 10:28:24 am
-
Hi there!
I'm new to C and codeblocks, but i find codeblocks excellent!
I've s "simple" question.... my program needs to be run/debugged as root, but i'm developing as a normal user; is there a way to run/debug as root inside codeblocks? (something like "when run/debug" ask for root password and proceed).
Many thanks!
Great job!
-
Just change the terminal/shell to a root/admin one in the environment options of CB. Its in the general options section.
-
Just change the terminal/shell to a root/admin one in the environment options of CB. Its in the general options section.
Ok, found the 2 entryes:
Shell to run commands in: /bin/sh -c
Terminal to launch console programs: xterm -T %TITLE -e
How should i change those entryes?
(I'm a newbie,sorry for the stupid question!)
-
Hi there!
I'm new to C and codeblocks, but i find codeblocks excellent!
I've s "simple" question.... my program needs to be run/debugged as root, but i'm developing as a normal user; is there a way to run/debug as root inside codeblocks? (something like "when run/debug" ask for root password and proceed).
Many thanks!
Great job!
Afaik there is no option included in C::B.
You can try to start C::B from a console window with "sudo codeblocks" .
-
maybe you should use a chroot/fakeroot/scratchbox approach...
-
maybe you should use a chroot/fakeroot/scratchbox approach...
Please,can you explain what you mean?
-
ideally you should try to avoid testing/debugging code as the root user on your system, as bad things could happen to the system leaving you up the proverbial creek without a paddle. chroot/fakeroot allow you to create a "fake" file system that looks like the real thing to the application. scratchbox goes one step further and lets you fake entire platforms, which allows you to test code for embedded systems (mobile phones, settop boxes etc) without having the hardware. the tools can even support gui apps using utils such as Xephyr. google any of these for more info. can you gives us more info about the sort of app you are trying to test/debug?
-
ideally you should try to avoid testing/debugging code as the root user on your system, as bad things could happen to the system leaving you up the proverbial creek without a paddle. chroot/fakeroot allow you to create a "fake" file system that looks like the real thing to the application. scratchbox goes one step further and lets you fake entire platforms, which allows you to test code for embedded systems (mobile phones, settop boxes etc) without having the hardware. the tools can even support gui apps using utils such as Xephyr. google any of these for more info. can you gives us more info about the sort of app you are trying to test/debug?
yes, i need only to perform iwconfig,ifconfig and use the printk function.
That's all! (it's just an AP hopper, if someone is interested, i'm gonna publish my work on sourceforge very soon!).
-
yes. start codeblocks with sudo in terminal. it works