"startup programs" in Linux

zimmie6576

Senior member
Apr 7, 2002
499
0
0
I'm relatively new to the finer points of Linux, so bear with me here. My Linux box runs pretty slow when using the GUI (can't remember which one, whatever the default is on Red Hat 9), and I'm trying to figure out what programs/services are running at boot, and which ones (if any) I can stop from running. I was told to got to /etc/rc.d/rc5.d and look in there. I see a whole bunch of symlinks, but I'm not sure if I'm in the right spot, or which services I can safely keep from running (I know I want ones like vsftpd and httpd to run, but most of the others I have no idea). Any help/direction to an online resource (something perhaps like this) would be appreciated.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Without knowing what each service does you can't really make a decision on what needs to run, but AFAIK there's no listing like the one you linked to. Basically it probably won't make much of a performance difference unless you're very slim on memory, most of those services just startup and then go idle unless something uses them. So if they're not being actively used they'll not use any CPU time and will eventually get pushed out into swap. Not all of the scripts in there are daemons either, some are just setup scripts that do some basic maintenance at bootup, so you have to be really sure of what you're disabling.

A lot of them should be discernable from either the daemon name or the man page or the docs in /usr/share/doc/<package name>
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Crash course on linux runlevels:

Lilo or Grub becomes active.

They select the kernel, load it into memory and the boot up proccess begins.

The kernel starts init. Which is the first program that runs. All other programs are forks off of this.

It mounts the root read only. Starts in at single usermode and reads the scripts located in the single user mode rc.* directory. This instructs it on what programs to run to get networking going, get some basic services going, check the drive partitions for proper shutdown and scan and correct any errors if need be, remounts root readable, looks for any new hardware etc etc etc.

Then it goes into the runlevel 5 in redhat, which is multi-user mode + X windows. It reads the scripts in there to get things like your http server going, any backend services like cupsd for printing and all that jazz. Then it starts the graphical login manager that either gives you a pretty little login prompt for X or kicks you directly into the default user's X windows GUI enviroment.

Basic behavior is controlled by the /etc/inittab file, which you can edit to change the default runlevel and stuff like that. Also with redhat it uses /etc/rc.* directories and you can manually (not so safely) delete and create your own symbolic links to various scripts in the /etc/init.d directory. (symbolic links are like shortcuts, but are deeper down in the system and deal with filing systems and such)

In redhat you can control runlevel behavior and start up programs with the serviceconf gui app. Remember that some services are dependent on others. Like http won't run well with out a proper networking setup for example.

If your using gnome you can go thru and there is a gnome-session-manager that can be setup to control what programs your starting when you login to X. (like a clipboard manager or nautilus file manager.)


Also if it is running kinda slow be sure to make sure that your running a accelerated drivers for your vid card. Nvidia has a installer script on their website, and ATI has drivers from the DRI project for 9200 and previous vid cards and have propriatary drivers aviable from it's website. If your using onboard stuff most of that has DRI drivers, but they should be enabled by default. You can use the glxgears program to test your 3d acceleration. On my desktop I have geforce 2 gts-v card and score ~1100 FPS with glx gears at the default window size and my laptop scores about 220 FPS at 800x600 fulscreen size with it's onboard "intel extreme" crap with the DRI drivers.