home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix,chevron.unix
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!sal.wisc.edu!alan
- From: alan@sal.wisc.edu (Alan Watson)
- Subject: Re: Kill Session Manager on a Ultrix workstation
- Message-ID: <1992Dec18.171522.13250@sal.wisc.edu>
- Keywords: kill session manager
- Organization: Space Astronomy Lab, Madison WI
- References: <1992Dec18.142356@abds9.aberdeen.chevron.com>
- Date: Fri, 18 Dec 1992 17:15:22 GMT
- Lines: 19
-
- In article <1992Dec18.142356@abds9.aberdeen.chevron.com> emjga@aberdeen.chevron.com writes:
- >I would like to be able to kill the Session Manager and all its
- >sup-process without having to click on the Session manager window
- >and select the quit option.
- >
- >Currently I have a small script called xsmkill to do this.
- >#!/bin/csh
- >set x = `ps -aux | grep $USER | grep dxsession | awk '{print $2}'`
- >kill -9 $x
-
- You need to filter out the grep (or awk) command from the output of ps,
- and it is more gentle to send SIGTERM rather than SIGKILL.
-
- #! /bin/sh
- PID=`ps -ax | awk '/dxsession/ && !/awk/ {print $1}'`
- kill -TERM $PID
- # end-of-file
-
- You only need to grep on $USER if you are running a twin-headed 5000/25.
-