Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is my first script, and really need some help

Here is what I have done so far.

tunctl
ifconfig tap0 192.168.255.1 netmask 255.255.255.0 up
sleep 10
/home/marius/./start.lab.sh
/home/marius/Dynamips/IE/./start_lab.sh

It works great when I run it from a terminal, but.......

I need a terminal to open upon startup and then run the above commands.

When "/home/marius/Dynamips/IE/./start_lab.sh" run it actually launches the app.

Now, can one send commands to the app in the terminal?

I ask allot, it would be awesome if someone can help

Regards,

share|improve this question
    
Do you want to run the script in the background when the computer starts, or in a terminal when you login? –  theotherreceive Aug 25 '09 at 15:06
    
Hi Thanks for the help In a terminal when I login –  Marius_vt Aug 25 '09 at 15:10

3 Answers 3

In order to run your script when you log in, add a call to it at the end of your ~/.bash_profile file.

For more information see the Invocation section of the Bash man page.

share|improve this answer

The startup applications settings are in the system > preferences menu. You can add a new entry here for your script.

To run the script from a terminal enter the command as:

gnome-terminal --command /home/marius/Dynamips/IE/start_lab.sh
share|improve this answer

You really don't need to run a script that opens a terminal -- You can just run your script in the background using the System -> Preferences menu.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.