PDA

View Full Version : Startup Programs?



m0tf
27th February 2008, 01:30 PM
Hello all.

I would like to know how to add a StartUP program before the Login screen.

I want that program to run while the system is booting and before the Login Screen appears.

Iam using Fedora 8 2.6.23.15-137.fc8


thank you:)

stevea
27th February 2008, 01:41 PM
You can create a script (look for an example pattern) in /etc/init.d and control it as a service script.

If it's an X11 program you'll have to take a different approach and start looking at the X11 startup from /etc/X11/prefdm.

If it's just a command or two you can throw these in /etc/rc.d/rc.local

pobbz
27th February 2008, 01:43 PM
Hello.

See this (http://www.fedorafaq.org/basics/#startonboot).

EDIT: In the link I just posted they suggest that the file to edit is /etc/rc.local, while I think that it's actually /etc/rc.d/rc.local. I'm not at my Fedora box right now, so I can't check.

spoilt
27th February 2008, 02:31 PM
/etc/rc.local is linked to /etc/rc.d/rc.local so it's the same file

manoynmonic
22nd March 2008, 02:01 AM
Great link pobbz - but what if it is something that prompts for root password?

scottro
22nd March 2008, 04:29 AM
Most programs in /etc/rc.local (or /etc/int.d/) require root privilege to run but don't prompt for the password before starting. Would you be a little more specific about what your script or program does?

manoynmonic
22nd March 2008, 05:29 AM
Hello scottro,

sorry for being so vague - I had in mind that there might just be a way to go about doing this kind of thing that that would generally work along the lines of the original question (just in root), and therefore keep my question from qualifying as a threadjack.

What I was trying to get going is a little app called ipblock. It works pretty much like Peerguardian. Unfortunately, it is located out of my PATH in /usr/sbin/, and can only be accessed by executing "./ipblock -g" (in said directory) as root. A KDE shortcut can execute it from the menu instead (with a prompt for pw of course).

I was hoping I could get it to just run all the time from startup, since I'm not the only one using this machine for torrents (you know, for downloading *cough* Linux distros...), but I am the only one with root access, and I don't always use KDE. My attempts at editing /etc/rc.local didn't work, nor did making a script and putting it in the .kde StartupApplications directory. I tried both a script specifically for launching this, and to launch it via alltray, but that used up all of my ideas and google powers.

-Manoy

pobbz
22nd March 2008, 12:09 PM
Hello.

You downloaded the latest RPM for you Fedora version form sourceforge, right? Then installing the RPM should do the trick automagically for you. Go to System->Administration->Server Settings->Services and see if ipblock is listed there. Then, enable it for any runlevels you want (runlevel 5 is where the X server gets started).

However, I didn't verify this procedure myself by actually installing the iplist package. Instead I just downloaded the package and checked the post-install scripts embedded in the RPM and judging from those, it seems to install it self as a service.