disable ps

General discussion about PLUC and Linux in Pakistan.
Post Reply
farhanksa
Subedar
Posts: 359
Joined: Sun Nov 03, 2002 6:40 am
Location: Lahore
Contact:

disable ps

Post by farhanksa »

there is a process "/usr/bin/autorun -l --interval=1 000 --cdplayer=/usr/bin/kscd" is always running. how do I disable it from starting up automatically?
i think its for automount ...
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

If you have a utilility like linuxconf or chkconfig, you can use them to disable any service.

Also, the services that start automatically are located at /etc/init.d .SoEven if you dont have those tools, you can stop/disable any service from there.

For example to stop pcmcia service:

Issue this:

/etc/init.d/pcmcia stop

so to disable a service from auto starting, just remove it from /etc/init.d
Last edited by Faraz.Fazil on Thu Jul 24, 2003 11:26 pm, edited 1 time in total.
farhanksa
Subedar
Posts: 359
Joined: Sun Nov 03, 2002 6:40 am
Location: Lahore
Contact:

my services r all off except the one i need

Post by farhanksa »

aoa
my services r all off except the one i need..
i want not to start this process....automatically..???how
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

I think i already told you that to disable a service from loading automatically, just remove it from /etc/init.d using the rm command In fact, dont remove it..Just move it to another directory.

Just goto /etc/init.d in terminal

do a ls -l

It will show u all services that loads at startup.Remove any service that u dont want to start automatically.

The /etc/init.d directory contains the automatic startup scripts of all the services that start automatically.

For instance, i have a service called webmin that loads automatically.
It is listed under /etc/init.d

to disable it from starting automatically, all i have to do is:

cd /etc/init.d
copy webmin /root/webminstartbackup (this creates a back of webmin startup config , in case i need to reenable it to load automatically)

rm webmin (removes webmin autostart script, thus disablingit from autostarting.It can still be started manually.)

reboot, and webmin wont be started.

To re enable webmin to load on startup just copy the backupfile back to /etc/init.d with name webmin

NOte: Removing any service from /etc/int.d just disables it from starting automatically.It doesnt delete any program file.You will still be able to tun the service manually and u can also reenable it to load automatically if you have a backup of its /etc/init.d startup script in some folder other than the /etc/init.d

Also another easy way to disable a service in redhat linux(im using version 9) is to goto system settings=>server settings=> services

It shows all services.Allows u to start stop or restart a service.And also allows u to change service run levels to set it to auto, manual or disabled.
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

Some services are configure dto startup automatically thru the init.d based scripts.These scripts are invoked on linux system startup, even before the login and gui comes up.

Some services are also configured to startup automatically, thru the xinitrc file.These services are started automatically as soon as the X gui gets invoked.

xinitrc Description: This package contains the basic X windows startup script used by the "startx" command. (from rpm description)
The xinit program is used to start the X Window System server and a first client program on systems.
xinit will look for a file in the user's home directory called .xinitrc to run as a shell script to start up client programs.

Filter list: *|*|*|xinitrc*

Section maint.: SecRobot


So i f u wanna disable some service from starting automatically, disable its startup script in init.d, using the method i explained before.If it still starts
automatically, then check for its entry in xinitrc and remove it from there as well.
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

Hey guyz, i forgot to tell you guyz one more method:

In terminal, just type:

/usr/bin/redhat-config-services

and press enter

It will invoke the redhat service configurator.It will show u the list of all the services.You can start,stop , restart, enable or disable any service from there.Be careful not to stop or disable any critical process.

Another method to invoke the redhat-config-services is to go to the start menu, server settings and then services.
Post Reply