With my relative meager memory (computer ;) ) I regularly run into problems when I receive a Skype call from abroad. In case of an incoming call I kill in a hurry all the running programs one by one. I wonder if I could make a button which would kill all regularly running programs in one sweep. Is there any negative effect if I would kill KMail, Firefox and Motv with a bash file? How would such a bash file look? I am not an expert in bash, only a happy user. -- Linux User 183145 using LXDE on a Pentium IV , powered by openSUSE 11.3 (i586) Kernel: 2.6.37-desktop LXDE WM & KDE Development Platform: 4.5.95 (4.6 RC2) 14:35pm up 14:26, 1 user, load average: 1.88, 2.14, 1.49 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday, January 20, 2011 08:44:16 am C. Brouerius van Nidek wrote:
With my relative meager memory (computer ;) ) I regularly run into problems when I receive a Skype call from abroad. In case of an incoming call I kill in a hurry all the running programs one by one. I wonder if I could make a button which would kill all regularly running programs in one sweep. Is there any negative effect if I would kill KMail, Firefox and Motv with a bash file? How would such a bash file look? I am not an expert in bash, only a happy user.
I do not see any incovenience in doing that. Your script should be like this: ps -e | grep kmail #get the process ID kill -s SIGKILL pid -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bogdan Cristea wrote:
On Thursday, January 20, 2011 08:44:16 am C. Brouerius van Nidek wrote:
With my relative meager memory (computer ;) ) I regularly run into problems when I receive a Skype call from abroad. In case of an incoming call I kill in a hurry all the running programs one by one. I wonder if I could make a button which would kill all regularly running programs in one sweep. Is there any negative effect if I would kill KMail, Firefox and Motv with a bash file? How would such a bash file look? I am not an expert in bash, only a happy user.
I do not see any incovenience in doing that. Your script should be like this:
ps -e | grep kmail #get the process ID kill -s SIGKILL pid
kill $(pidof kmail) $(pidof firefox) etc etc. -- Per Jessen, Zürich (-0.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, Jan 20, 2011 at 08:56:22AM +0100, Per Jessen wrote:
On Thursday, January 20, 2011 08:44:16 am C. Brouerius van Nidek wrote:
With my relative meager memory (computer ;) ) I regularly run into problems when I receive a Skype call from abroad. In case of an incoming call I kill in a hurry all the running programs one by one. I wonder if I could make a button which would kill all regularly running programs in one sweep. Is there any negative effect if I would kill KMail, Firefox and Motv with a bash file? How would such a bash file look? I am not an expert in bash, only a happy user. [ 8< ] kill $(pidof kmail) $(pidof firefox) etc etc.
man -k killall ... killall (1) - kill processes by name killproc might be more accurate as it expects the /full/path/to/executable and by this ensures you don't hit the wrong program by accident. It also has a man page and is available as /sbin/killproc Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
Bogdan Cristea said the following on 01/20/2011 02:51 AM:
On Thursday, January 20, 2011 08:44:16 am C. Brouerius van Nidek wrote:
With my relative meager memory (computer ;) ) I regularly run into problems when I receive a Skype call from abroad. In case of an incoming call I kill in a hurry all the running programs one by one. I wonder if I could make a button which would kill all regularly running programs in one sweep. Is there any negative effect if I would kill KMail, Firefox and Motv with a bash file? How would such a bash file look? I am not an expert in bash, only a happy user.
I do not see any incovenience in doing that. Your script should be like this:
ps -e | grep kmail #get the process ID kill -s SIGKILL pid
Some things like firefox have a script that starts them as well as the binary. For that reason I'd suggest using "pkill' instead. ARGS="kmail fireox motv" for i in $ARGS do pkill $i done You may need to specify the kill signal. See the manual page for pkill -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Jos van Kan <vankan@kabelfoon.nl> [01-20-11 17:34]:
Op 20-01-11 14:19, Anton Aylward schreef:
ARGS="kmail fireox motv"
Would that be the heavy duty version of firefox?
Heavy Duty ???? That would be all instances of "firefox" ps aux |grep firefox -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, Jan 20, 2011 at 5:35 PM, Patrick Shanahan <paka@opensuse.org> wrote:
* Jos van Kan <vankan@kabelfoon.nl> [01-20-11 17:34]:
Op 20-01-11 14:19, Anton Aylward schreef:
ARGS="kmail fireox motv"
Would that be the heavy duty version of firefox?
Maybe fireox is somehow related to "When the Ox is in the ditch, you have to get out and push!" Trouble is, I don't what you do when the Ox is in the ditch and its on fire. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 01/20/2011 05:45 PM, Greg Freemyer pecked at the keyboard and wrote:
On Thu, Jan 20, 2011 at 5:35 PM, Patrick Shanahan <paka@opensuse.org> wrote:
* Jos van Kan <vankan@kabelfoon.nl> [01-20-11 17:34]:
Op 20-01-11 14:19, Anton Aylward schreef:
ARGS="kmail fireox motv"
Would that be the heavy duty version of firefox?
Maybe fireox is somehow related to "When the Ox is in the ditch, you have to get out and push!"
Trouble is, I don't what you do when the Ox is in the ditch and its on fire.
Call all of your friends over for an Ox roast. :-)) -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (9)
-
Anton Aylward
-
Bogdan Cristea
-
C. Brouerius van Nidek
-
Greg Freemyer
-
Jos van Kan
-
Ken Schneider - openSUSE
-
Lars Müller
-
Patrick Shanahan
-
Per Jessen