Nice value of the X server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2002-04-25 at 16:56, Michal Jaegermann wrote:
> On Thu, Apr 25, 2002 at 03:45:08PM -0700, Christopher Keller wrote:
> > Bill, 
> > 
> > Actually I went ahead and stuck the following line in rc.local
> > 
> > /usr/bin/renice -10 -p `/bin/ps -elf | /bin/grep /etc/X11/X | /bin/awk
> > '{print $4}' | /usr/bin/head -1`
> > 
> 
> Er.... actually something like "renice -10 -p $(pidof X)" will be
> simpler and even correct.  Not mentioning those details that with the
> above you can pick your 'grep' process and using grep in order to pipe
> to awk is not really the way to do things; head is also superfluous
> as awk can do that just by itself (and you still have no idea in
> which order processes will be listed).
> 

Actually, I do. The ps command lists the processes in numerical order by
PID. By definition, X will have always been started before the renice.
So that will work every time...guaranteed.

However, the pidof is a much better solution. Completely unaware it
existed. Thanks.



> The only thing is that you have to wait with this until your X server
> process is actually started.  If you are using 'gdm' then you can
> stick that into your "BackgroundProgram" (see /etc/X11/gdm/gdm.conf).
> With other startup methods some other device of that sort will need
> to be used.  'rc.local' can turn out to be tad too early.
> 
>    Michal

Hmm....okay, I'll double check this.  I'll do a little research on
gdm.conf.


--Chris



-- 
Homepage: http://interclypse.net
Registered Linux user #215241 (http://counter.li.org/)





[Red Hat General]     [Red Hat Watch]     [Red Hat Development]     [Kernel Development]     [Yosemite Camping]

  Powered by Linux