How to set a permanent process priority?

Michael Hirsch mdhirsch at gmail.com
Thu Sep 13 18:17:57 UTC 2007


On 9/13/07, Nils Kassube <kassube at gmx.net> wrote:

> That something would be more like this (but it has only limited value, see
> below):
>
> #!/bin/bash
> /usr/bin/audacity &
> pid=`jobs -p 1`
> sudo renice -5 $pid
>
> But there are (at least) 3 problems here:
>
> First, you can renice your own processes to get a lower priority (higher
> nice value), but only root may rise the priority to negative nice values.
> That's why we need sudo here.
>
> Second, only users in the admin group can use this trick to improve the
> priority.
>
> Third, you will only see the password prompt on the terminal if audacity
> doesn't hide the terminal. And you have to start the script from a
> terminal to get the password prompt at all.

For this last objection, you can either edit your /etc/sudoers file
(using visudo) to give you permission to run the command without a
password, or use kdesu instead of sudo.  That will give you a
graphical password box.

But I think a better solution is to check out one of the low latency
kernels and see if you can just fix the responsiveness on your new
machine.  It really should not be hiccupping.

Michael




More information about the kubuntu-users mailing list