Re: Temporaly disable program
Quoting Urban Gabor ([EMAIL PROTECTED]): I've installed a program (gpm to more precise) and I want to disable/enable it for the next booting. Remove/install every time I want to experiment would be weird. Any ideas are wellcome Changing the executable flag is the best way and it disturbs things the least. But I hope you're not rebooting *just* to get gpm stopped or started. If you are, then note that as root, you can type /etc/init.d/gpm stop /etc/init.d/gpm start to stop and start it at any time. That way, you can leave the default behaviour, which is to start on booting, alone. Cheers, -- Email: [EMAIL PROTECTED] Tel: +44 1908 653 739 Fax: +44 1908 655 151 Snail: David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA Disclaimer: These addresses are only for reaching me, and do not signify official stationery. Views expressed here are either my own or plagiarised.
RE: Temporaly disable program
On 16-May-99 Urban Gabor wrote: Hi, I've installed a program (gpm to more precise) and I want to disable/enable it for the next booting. Remove/install every time I want to experiment would be weird. Any ideas are wellcome Generically, the way to prevent a program from executing is to change its permissions so that it is not executable (i.e. does not have x permission). My gpm has (ls -l `which gpm`): -rwxr-xr-x 1 root root36515 Dec 1 1997 /usr/bin/gpm i.e. 755 permissions. If you do chmod 644 /usr/bin/gpm then the result would be -rw-r--r-- 1 root root36515 Dec 1 1997 /usr/bin/gpm i.e. the x permissions would have gone and the program would not execute. When you want it back, you restore them with chmod 755 /usr/bin/gpm I'm not running a Debian system at the moment, so I can't answer for precisely how Debian starts up gpm when it boots, but in my SuSE system the file /etc/rc.d/init.d/gpm has the lines test $START_GPM = yes || exit 0 case $1 in start) if test -x /usr/bin/gpm ; then echo Starting console mouse support. (gpm) /usr/bin/gpm $GPM_PARAM fi ;; The if test ... checks whether /usr/bin/gpm exists and is executable. If not (which would be the case if you changes the permissions) then nothing is done. For what you want to do, achieving it simply by changing permissions is going to be simpler than fiddling deep inside the boot-up initialisation scripts. Hope this helps, Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Date: 16-May-99 Time: 10:34:17 -- XFMail --
Re: Temporaly disable program
try as root : update-rc.d gpm remove see also : man update-rc.d
Re: Temporaly disable program
I like to remove the execute flags from the startup script in init.d. in this case. Then when the system boots and when it shuts down, I get a console message that the daemon is not starting or stopping, reminding me that I have disabled it. For example, you could as root 'chmod a-x /etc/init.d/gpm', disabling gpm at bootup. When you want to play with it just 'chmod a+x /etc/init.d/gpm; /etc/init.d/gpm start'. I got this tip from this list some time back and often use it for fooling with new daemons. Michael Laing Date: Sun, 16 May 1999 10:20:45 +0200 (MET DST) From: Urban Gabor [EMAIL PROTECTED] To: debian-user@lists.debian.org Hi, I've installed a program (gpm to more precise) and I want to disable/enable it for the next booting. Remove/install every time I want to experiment would be weird. Any ideas are wellcome Gabor Urban --- Lufthansa Systems Hungaria KfT mail:[EMAIL PROTECTED] Tel : (36)-1-431-2949 Fax :(36)-1-431-2977 I am not a cat to play with the mouse.