Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I start a new developed application in root?

Posted on 2011-03-10
4
Medium Priority
?
277 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 600 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 200 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 200 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

596 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