问题原文
原帖链接 · helcim · CC BY-SA 3.0
Strange as it seems, I can't find information how I can set a default nice value for a program (not for a user or a group!). I would like to start all chrome and firefox instances with a nice value of 10. What would be the most appropriate solution?
已采纳解答
原帖链接 · webb · CC BY-SA 3.0
Instead of messing up your /usr/bin and getting hosed every update, why not use a ~/.local/bin ?
## one-time setup
mkdir -p ~/.local/bin
# prepend new path to PATH to give it priority
echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
# then open new terminal or
source ~/.bashrc
## create a wrapper script
# $@ is there to passthrough args.
echo 'nice -10' `which firefox` '$@' > ~/.local/bin/firefox
# make it executable
chmod +x ~/.local/bin/firefox
# check sanity
which firefox
cat `which firefox`
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
