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 06-29-2004, 07:02 PM   #1
linuxtesting2
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Rep: Reputation: 30
howto start a program automatic


hi

i have debian, and i want to start a program automatic when i boot
i tried to make a file in /etc/init.d/test (chmod a+x test)

and a link to that file in /etc/rc2.d/ (ln -s /etc/init.d/test /etc/rc2.d/test)

but when i boot, it will not start the program, and yes i use init 2. Where else can i put it ?



-ole
 
Old 06-29-2004, 08:22 PM   #2
mykrob
Member
 
Registered: Jun 2004
Location: Jackson, TN
Distribution: Kubuntu Feisty
Posts: 606

Rep: Reputation: 31
if you are running KDE, open up Konqueror, click on Go-->Autostart.. This will open up a window, possibly with some icons in it. Now, open your K-menu, find whatever program you want to start on startup, and drag its icon from the K-menu to the autostart window, then close it..

Done, and no file or script editing involved

-myk
 
Old 06-29-2004, 08:32 PM   #3
linuxtesting2
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Original Poster
Rep: Reputation: 30
im not running X
 
Old 06-29-2004, 08:41 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
The link name needs to start with a S followed by a two-digit number. Something like:
Code:
lrwxrwxrwx    1 root     root           14 Dec  4  2002 S90test -> ../init.d/test
The 'S' tells the init program that it's supposed to call the script to start some service/program. In fact, it calls the script and adds "start" argument on the command line. The two-digit number specifies the sequence to start the script (01 comes before 02... 02 comes before 03, etc.)
 
Old 06-30-2004, 08:44 AM   #5
linuxtesting2
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Original Poster
Rep: Reputation: 30
thanks, worked great
 
  


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
Automatic Start mohtasham1983 Linux - Newbie 2 05-14-2005 05:02 PM
HOWTO autorun a program on start up? kodaku Linux - Software 6 08-12-2004 09:40 PM
Automatic start of programs? ElPuello Linux - Software 3 04-15-2004 07:15 PM
Automatic start of program VincentB Linux - Newbie 1 07-03-2003 03:21 PM
Automatic Program loading at boot-up Sharmila Inamdar Programming 2 04-20-2001 12:14 AM

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

All times are GMT -5. The time now is 06:42 AM.

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