BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] memory management
- Subject: [Discuss] memory management
- From: gaf at blu.org (Jerry Feldman)
- Date: Sun, 21 Jun 2015 07:10:30 -0400
- In-reply-to: <55863B7B.6020409@mattgillen.net>
- References: <558420D5.6090803@mattgillen.net> <55858DB0.4080709@mattgillen.net> <li6egl6t9pp.fsf@panix5.panix.com> <55863B7B.6020409@mattgillen.net>
You can override its behavior my modifying the desktop file (/usr/share/applications/firefox.desktop in Gnome 3) The statement 'Exec=firefox %u' is the line to modify. You could place your modified copy in ~/.local/share/applications I have not tried this, but it should work. Instead of su -, use 'sudo -u <user> firefox', and update /etc/sudoers not to require a password for this. For instance: you <user> = NOPASSWD: /usr/bin/firefox On 06/21/2015 12:20 AM, Matthew Gillen wrote: > On 6/20/2015 4:18 PM, Mike Small wrote: >> Matthew Gillen <me at mattgillen.net> writes: >>> going to start swapping if it can. What I want for desktop environments >>> is behavior like: if you run out of memory, kill the thing that's >>> hogging the most. My typical case is that if there is a process using a >>> ton of memory, it's probably doing something wrong (e.g. javascript, or >>> eclipse going into a death spiral because of the awful Android plugin), >>> and /that/ is what I want OOM-killer to murder. >>> >>> I suppose the right answer is to wrap the problem programs in a script >>> so that every time I start them I can >>> echo 999 > /proc/[firefox-pid]/oom_score_adj >> What about creating a second, less privileged user for running firefox >> and using ulimit to keep it down to size? There are good reasons to not >> run firefox as your main user anyway, at least not for general browsing. >> I do this (minus the ulimit part), with the non-privileged firefox also >> having restrictive plugins. For banking and a small number of other >> sites I run firefox as my main user with no plugins. That way I don't >> have to worry about librejs or requestpolicy messing up a financial >> transaction. And if a site takes advantage of a firefox exploit it's >> somewhat contained, assuming it's not my bank that hosts the exploit. > That's not a bad idea. I've found that if you use > su - <username> > then you can run X programs as another user without trouble. > > Matt > > _______________________________________________ > Discuss mailing list > Discuss at blu.org > http://lists.blu.org/mailman/listinfo/discuss > > -- Jerry Feldman <gaf at blu.org> Boston Linux and Unix PGP key id:B7F14F2F PGP Key fingerprint: D937 A424 4836 E052 2E1B 8DC6 24D7 000F B7F1 4F2F
- Follow-Ups:
- [Discuss] memory management
- From: bogstad at pobox.com (Bill Bogstad)
- [Discuss] memory management
- References:
- [Discuss] memory management
- From: me at mattgillen.net (Matthew Gillen)
- [Discuss] memory management
- From: me at mattgillen.net (Matthew Gillen)
- [Discuss] memory management
- From: smallm at panix.com (Mike Small)
- [Discuss] memory management
- From: me at mattgillen.net (Matthew Gillen)
- [Discuss] memory management
- Prev by Date: [Discuss] memory management
- Next by Date: [Discuss] memory management
- Previous by thread: [Discuss] memory management
- Next by thread: [Discuss] memory management
- Index(es):