Xref: utzoo comp.windows.x:24050 comp.unix.questions:23569 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!lll-winken!sun-barr!newstop!sun!amdcad!dgcad!gary From: gary@dgcad.SV.DG.COM (Gary Bridgewater) Newsgroups: comp.windows.x,comp.unix.questions Subject: Re: Process priorities and X Message-ID: <1879@proa.SV.DG.COM> Date: 6 Jul 90 08:51:56 GMT References: <9007031747.AA05025@stc06.CTD.ORNL.GOV> <1990Jul4.061431.12129@servalan.uucp> <1990Jul4.160042.562@smsc.sony.com> Reply-To: gary@proa.SV.DG.COM () Followup-To: comp.windows.x Organization: Data General SDD, Sunnyvale, CA Lines: 27 In article <1990Jul4.160042.562@smsc.sony.com> dce@Sony.COM (David Elliott) writes: }In article <1990Jul4.061431.12129@servalan.uucp> rmtodd@servalan.uucp (Richard Todd) writes: }}... and I've noticed that clients that are started from twm (by some }}twm menu action) are niced down by 4, and clients that are started by hand }}run at normal niceness. }This makes sense. All twm does is to system() the command to be }executed, so it is subject to the same rules as any command executed }by /bin/sh. }In System V.2 and better versions of sh, the default is to automatically }nice down (by 4) all processes started in the background. (X11R3 uwm has the same property) I just invoke the following set-root script from my initializer script. If the window manager is a nice -4 then sons exec'd with a nice 4 will have a net niceness of 0. Friendly system managers can set this up for users. Substitute the windowmanager of your choice or make it an argument. Probably everyone can make a better one than this but it works for me on my AViiON. (Note: having a nice -4 window manager makes it quite snappy.) // #!/bin/sh # raise window manager priority exec renice -4 `ps -e | grep uwm | cut -c1-6` >> /dev/null 2>&1 -- Gary Bridgewater, Data General Corporation, Sunnyvale California gary@sv.dg.com or {amdahl,aeras,amdcad}!dgcad!gary C++ - it's the right thing to do.