|
|
|
|
![]() ![]() |
Oct 31 2006, 02:27 PM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 26 Joined: 26-October 06 Member No.: 16,802 |
Well as I;ve said before I'm new to linux, but am learning fast, I'm trying to figure out how to add a program to start at fedora bootup, I need '/opt/lampp/lampp start' to start at bootup, I beleive I need to do something in the init.d folder but I am unsure of what should be done
|
|
|
|
Nov 1 2006, 03:33 PM
Post
#2
|
|
|
Way Out Of Control - You need a life :) Group: [MODERATOR] Posts: 1,980 Joined: 16-August 05 Member No.: 7,896 |
You could also add a line in /etc/inittab.
it's an old way of doing that kind of things. The line I would add is : Yordansays:2:once:/opt/lampp/lampp start >/tmp/lmapp_start_listing.txt 2>&1 Just edit /etc/inittab and add this line at the end. This line has a title ("Yordansays") and asks at initlevel 2 (which is the multi-user level) to start only once (the "Once" field) the command /opt/lampp/lampp start and record the standard output of this command, as well as the standard error of this command, in the file named /tmp/lmapp_start_listing.txt for future debugging if necessary. You could alternatively use /dev/console instead of the txt file, so the result would go to the console at boot time instead of going in a file. |
|
|
|
Nov 2 2006, 01:19 PM
Post
#3
|
|
|
Way Out Of Control - You need a life :) Group: Members Posts: 1,366 Joined: 14-September 04 From: Nottingham England Member No.: 570 |
The Preffered way of doing somthing like that is with the 'local' boot script.
The Local Boot Script is an empty script that always runs last dureing bootup. its there specifically for users to enter any commands they want to run dureing bootup. In my opinion, its better to put applications like this in local, mainly because any resources that the program may need ( for example networking, or the Graphical User Interface ) will be definalty be up and running. ALSO.... if you make a mistake in the local script, it does not matter.. however a mistake in innitab could prevent the system from booting. (easy to fix, but annoying) the local script is in differant places in differant distro's have a look in /etc/ and its sub-directories. maybe /etc/initd.d/local Good Luck. |
|
|
|
Nov 16 2006, 03:46 AM
Post
#4
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 16-November 06 Member No.: 17,296 |
Just add /opt/lampp/lampp start line to /etc/rc.local file. As simple as that. I'm talking about Fedora core
|
|
|
|
Nov 17 2006, 09:26 AM
Post
#5
|
|
|
Member [ Level 1 ] Group: Members Posts: 34 Joined: 17-November 06 Member No.: 17,334 |
Well as I;ve said before I'm new to linux, but am learning fast, I'm trying to figure out how to add a program to start at fedora bootup, I need '/opt/lampp/lampp start' to start at bootup, I beleive I need to do something in the init.d folder but I am unsure of what should be done The preffered way, used by distro, is to create start script and locate it in /etc/init.d/ Simpest method is to copy one of existing one and edit to suit your needs. Then run chkconfig --add name You now can activate\deactivate your sirvice at any time by setup utility or any other standart method. |
|
|
|
Dec 21 2006, 09:20 PM
Post
#6
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 21-December 06 Member No.: 18,616 |
i dont really know if it really works for fedora but it sure works for slackware.
edit your /etc/rc.d/rc.local and add the program and the options you want to run on startup. |
|
|
|
Jan 12 2007, 12:08 PM
Post
#7
|
|
|
Member [ Level 1 ] Group: Members Posts: 34 Joined: 17-November 06 Member No.: 17,334 |
i dont really know if it really works for fedora but it sure works for slackware. edit your /etc/rc.d/rc.local and add the program and the options you want to run on startup. It works for sure. But this method have disadvanteges: you can't manually stop this program at any time just typing /etc/init.d/program stop, or by special Red Hat script - service: service program stop. You can't activate/deactivate such a program by system tools like chkconfig or setup Red Hat utility. This program will not run correctly according to system 'run level'. This method of running program at startup have exactly one advantage - it's simple. |
|
|
|
Jan 12 2007, 01:54 PM
Post
#8
|
|
|
Way Out Of Control - You need a life :) Group: [MODERATOR] Posts: 1,980 Joined: 16-August 05 Member No.: 7,896 |
It works for sure. But this method have disadvanteges: you can't manually stop this program at any time just typing /etc/init.d/program stop, or by special Red Hat script - service: service program stop. You can't activate/deactivate such a program by system tools like chkconfig or setup Red Hat utility. This program will not run correctly according to system 'run level'. This method of running program at startup have exactly one advantage - it's simple. Correct. Don't remember for Fedora, but rc.local is in RedHat, and RedHat is usually similar to fedora. I usually prefer /etc/inittab, but rc.local has to work. Here is what is said in the rc.local file in RedHat : QUOTE #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. So, this script is exactly here for that purpose. You put in this script what you want to be started at the end of the system boot, and it should be perfect. |
|
|
|
Jan 28 2007, 12:13 AM
Post
#9
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 21-December 06 Member No.: 18,616 |
QUOTE It works for sure. But this method have disadvanteges: you can't manually stop this program at any time just typing /etc/init.d/program stop, or by special Red Hat script - service: service program stop. You can't activate/deactivate such a program by system tools like chkconfig or setup Red Hat utility. This program will not run correctly according to system 'run level'. This method of running program at startup have exactly one advantage - it's simple. wink.gif I generally use this method to modprobe the modules so i don't really have to terminate the program. But let me make it clear, if i start a program editing rc.local i can't stop it with "kill pid" ??? hmm that sounds pretty awful in some cases but great for some other cases |
|
|
|
Jan 28 2007, 12:29 AM
Post
#10
|
|
|
Member [ Level 2 ] Group: Members Posts: 51 Joined: 5-January 07 Member No.: 19,160 |
i might install linux, the thing is though from what i heard you code everything in command prompt to do stuff like to get an icon shortcut on your desktop to open a program you would have to do a command.
To me this sounds like boring, hard and a bad operating system. I like the way it's free though and i might use debian on linux so i can host my own site -Lewis |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 30th August 2008 - 01:51 PM |