LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-12-2007, 11:46 AM   #1
Xzi
LQ Newbie
 
Registered: Dec 2006
Location: England
Distribution: Debian
Posts: 24

Rep: Reputation: 15
Running programs on boot


I know when I want to run a program on boot I add it to the file /etc/rc.local but my problem is the two program that I wish to use once run hog the terminal so the second one is not run. I need some way of running them in the background without them using up the default terminal. This is on a headless Debian machine. Here is my rc.local file:
Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

cd /home/tom/pbmpcd
python pbmpcd.py
mpdscribble

exit 0
Thanks in advance.
 
Old 09-12-2007, 12:05 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Commands can be put into the background by ending them with "&".

So you want to do:

Code:
python pbmpcd.py &
To put that task into the background so the other one can run.
 
Old 09-12-2007, 12:29 PM   #3
Xzi
LQ Newbie
 
Registered: Dec 2006
Location: England
Distribution: Debian
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks that worked perfectly!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running programs Agita Linux - Newbie 19 11-23-2006 10:26 PM
running programs The Oate Debian 3 08-25-2005 01:17 PM
Running Programs Slayer097 Linux - Newbie 3 02-23-2005 04:43 PM
Running programs? BajaNick Linux - General 10 07-07-2003 09:56 PM
Help on Running Programs mooreted Linux - Software 3 05-16-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration