You are not logged in.

#1 2004-03-18 13:22:27

eric
Member
From: under heaven
Registered: 2004-02-11
Posts: 118

Is it possible to renice an app automatically?

Now I have to renice xmms with -10 (after su'ing to root) every time after i've started xmms. I wonder if it is possible to renice xmms automatically even if the user != root.

I know it is possible to write a script using 'nice' to start xmms, but in the situation described above, nice needs root access :-(

Offline

#2 2004-03-18 14:09:24

andy
Member
From: Germany
Registered: 2002-10-11
Posts: 374

Re: Is it possible to renice an app automatically?

So, do I understand you correctly that you want xmms to dominate your machine ? Because setting the nice value to negative numbers will give xmms highest priority.

The easiest would indeed be an alias or shortcut.

If, OTOH you want xmms to run at lower priorities, you can use renice as ordinary user to add postivie values (and decreasing the priority) to xmms's nice value.

And finally, there is
http://and.sourceforge.net/
I haven't found an Arch package in current, extra or staging, though.

Offline

#3 2004-03-18 14:51:22

eric
Member
From: under heaven
Registered: 2004-02-11
Posts: 118

Re: Is it possible to renice an app automatically?

Yes, I want to run xmms at a nice of -10. I found out that xmms will stop playing the mp3 track for a moment when I browse a website with konqueror when xmms is niced with >= -5. This disappears when it is niced with -10 (I've never tried nice values -6 to  -9).

There is an example of a wrapper (*.c) for executing tasks with a higher priority on the link you gave me... I'll give it a try.

Thanks.

Offline

#4 2004-03-18 15:17:24

andy
Member
From: Germany
Registered: 2002-10-11
Posts: 374

Re: Is it possible to renice an app automatically?

I see.

However, I think there is no mechanism that allows ordinary users run anything with negative nice values (see renice(1) ). You could try to run knqueror at a nice value of 5 or 6 or so, though ....

Offline

#5 2004-03-18 17:24:56

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Is it possible to renice an app automatically?

Look at the program 'sudo'.  It will probably save you some time in renicing.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#6 2004-03-19 18:33:36

yak8998
Member
Registered: 2004-03-01
Posts: 143

Re: Is it possible to renice an app automatically?

I have the same problem (sort of). When I'm playing any full screen games, XMMS won't advance to the next track. I never thought of changing the nice though. Let us know if you find a solution for this.


"Ignorance is bliss, for stupid people."
"open-source is [...] programming Darwinism."
Vaughan-Nichols

Offline

#7 2004-03-20 16:07:57

eric
Member
From: under heaven
Registered: 2004-02-11
Posts: 118

Re: Is it possible to renice an app automatically?

yak8998 wrote:

I have the same problem (sort of). When I'm playing any full screen games, XMMS won't advance to the next track. I never thought of changing the nice though. Let us know if you find a solution for this.

Maybe this game is hijacking the arts channels just after xmms has finished playing a track? Try to press the play button on xmms when this happens.

I have had the same problem with sounds in KDE. When I open or close a window KDE plays a short sound file, but the sound file won't be played because xmms is using the arts channel. When xmms has finished playing, the sound file of KDE will be played and xmms is unable to play the next track.
My "solution" for this was to disable all sounds in KDE to make it not use the arts channel that is used by xmms.

Offline

Board footer

Powered by FluxBB