Hello,
is there a way, in KDE (4.8.5) to add a command ‘switch’ to the execution command for an application that will set the process priority or ‘nice’ each time it’s started. This does Not need to be ‘firefox’ specific. General app launch will help.
exp. I run mozilla Firefox, Aurora nightly and some nightly builds suck up the memory / cpu and I have to Ctrl+Esc and set (process) priority (renice) firefox.
I would like to add something to the KDE ‘launch’ command (kicker icon for firefox Aurora) like: ~/bin/mozilla/Aurora/firefox %u -P] -n -2 nice , but when I try this, firefox loads ‘nice’ as a url…
I could use this for other applications like Gimp, but I can’t figure out the right switch syntax …
I can answer my last question:
(if that -P is in the correct place???)
No it isn’t either. Look here:
firefox -h
Usage: /usr/lib64/firefox/firefox options ... ]
where options include:
X11 options
--display=DISPLAY X display to use
--sync Make X calls synchronous
--g-fatal-warnings Make all warnings fatal
Firefox options
-h or -help Print this message.
-v or -version Print Firefox version.
-P <profile> Start with <profile>.
-migration Start with migration wizard.
-ProfileManager Start with ProfileManager.
-no-remote Do not accept or send remote commands; implies -new-instance.
-new-instance Open new instance, not a new window in running instance.
-UILocale <locale> Start with <locale> resources as UI Locale.
-safe-mode Disables extensions and themes for this session.
-jsconsole Open the Error console.
-browser Open a browser window.
-new-window <url> Open <url> in a new window.
-new-tab <url> Open <url> in a new tab.
-preferences Open Preferences dialog.
-search <term> Search <term> with your default search engine.
-private Enable private browsing mode.
-private-toggle Toggle private browsing mode.
-setDefaultBrowser Set this app as the default browser.
henk@boven:~>
Which shows that options come before the URL and also that the -P option must be followed by a (whatever that is).
Thus
firefox -P <profile> %u
is the correct way to call Firefox if you want to offer it a profile.
Just another thought…
If this is something you run regularly and want to automate it, you might try creating a systemd Unit service that invokes your Firefox (or maybe GUI-less web transfer?). In the Unit configuration file, it’s trivial to set the priority to whatever you wish.