Solved

How do I start a new developed application in root?

Posted on 2011-03-10
4
263 Views
Last Modified: 2012-06-27
Dear,

I am using debian OS and I have an application saved in a specicific folder lets say ./myfolder/myapp.cpp

I make exe_myapp in the same folder.

I need this application (exe_myapp) to be started in the root. HOW?




0
Comment
Question by:nabilhammoud
4 Comments
 
LVL 9

Accepted Solution

by:
expert_tanmay earned 150 total points
Comment Utility
Start a terminal command prompt.
type the commands on the terminal as follows
> su
password : <put the root password>
#cd your_folder
#./exe_myapp

thats it
Cheers..
0
 
LVL 6

Assisted Solution

by:LeeeRussell
LeeeRussell earned 50 total points
Comment Utility
It can be safer in linux to not stay logged in as the superuser an only execute a single command as su.  This can be done using sudo.  In your example you would type in:

sudo ./exe_myapp

and then the system will ask for your password.

Sudo for debian is explained here:

http://www.debianhelp.co.uk/sudo.htm
0
 
LVL 6

Assisted Solution

by:Ferrosti
Ferrosti earned 50 total points
Comment Utility
Having the program in '/' is no good.
You should be able to place your program nearly anywhere. In your code change your working directory to '/' when needed.

C-Code:
int chdir (const char *filename)
0
 

Author Closing Comment

by:nabilhammoud
Comment Utility
THX
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now