Solved

How do I start a new developed application in root?

Posted on 2011-03-10
4
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
expert_tanmay earned 150 total points
ID: 35093225
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
ID: 35093469
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
ID: 35094040
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
ID: 35136027
THX
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

724 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