Making renice settings stick?

jeb1138

Carioca
I need QuicKeys to have a very low nice setting to work well for what I'm using it for. Right now I'm using Process Wizard which works great except that if I ever restart or logout I have to change the setting again. I've seen "renicer" but would rather not have another background app running and I don't like most of what it does anyway.

My question is: Is there a way to make "nice" settings stick? Some attribute you can change in an application package or some file property that I can change to make an application always run with a different nice setting?
 
You could automate the process as a LoginItem shell script or AppleScript that runs after the desired application launches.
 
QuicKeys can send terminal commands and be set up to fire on a timer. So X seconds after the machine starts up, QKX could send the renice command itself, should work...
 
I've been toying with the idea of renaming the application's binary (in the .app package) and replacing the original binary name with a shell utility that starts the real binary with a certain nice value.

So far this hasn't worked, but starting apps with certain nice values is important to me (like MSN and xICQ's priority, versus say DreamWeaverMX's priority) so when I figure it out I'll post a HOW-TO. It's neat to have the ability to renice applications, but I'd rather nice them from the start.

As a band-aid solution, you could always make an AppleScript (or shell script) that starts the specified application, gives it a few seconds to launch, and then re-nices it.

I wish it was a standard that every single application on Mac OS X wrote to /var/run/appname.pid, but it's not such a big issue--you can get the running app's PID by ps -auwx | grep appname and then awk-ing out the PID from the rest of the string. Keep ing mind, however, that some applications like MSN Messenger 3.5 start *2* instances of themselves, you'll want to renice both of them.
 
Back
Top