EvilZone

General Tech => Operating System => : v32itas May 10, 2015, 04:23:01 AM

: [OpenBSD 5.7] Solving chrashing browser (firefox, chromium) problem
: v32itas May 10, 2015, 04:23:01 AM
Another one guide for noobs like myself. This was the biggest problem
I ran into while playing with OpenBSD. My browser was laggy and
randomly crashing under higher loads with many tabs. So I googled
and have found an answer here:
http://undeadly.org/cgi?action=article&sid=20070508003748&mode=flat

But that answer is not very noob friendly. So I have decided to simplify it.

> Firefox often crashes because it tries to crunch more memory than your current user limits.
>
> Try to edit /etc/login.conf, bump up the values, logout, login, and Firefox should be rock solid.
> You can also put yourself in the staff class : usermod -L staff yourlogin

So you need to edit /etc/login.conf

#nano /etc/login.conf
# $OpenBSD: login.conf,v 1.4 2015/02/17 10:18:36 sthen Exp $

#
# Sample login.conf file.  See login.conf(5) for details.
#

#
# Standard authentication styles:
#
# passwd        Use only the local password file
# chpass        Do not authenticate, but change users password (change
#               the YP password if the user has one, else change the
#               local password)
# lchpass       Do not login; change user's local password instead
# radius        Use radius authentication
# reject        Use rejected authentication
# skey          Use S/Key authentication
# activ         ActivCard X9.9 token authentication
# crypto        CRYPTOCard X9.9 token authentication
# snk           Digital Pathways SecureNet Key authentication
# tis           TIS Firewall Toolkit authentication
# token         Generic X9.9 token authentication
# yubikey       YubiKey authentication
#

# Default allowed authentication styles
auth-defaults:auth=passwd,skey:

# Default allowed authentication styles for authentication type ftp
auth-ftp-defaults:auth-ftp=passwd:

#
# The default values
# To alter the default authentication types change the line:
#       :tc=auth-defaults:\
# to be read something like: (enables passwd, "myauth", and activ)
#       :auth=passwd,myauth,activ:\
# Any value changed in the daemon class should be reset in default
# class.
#
default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
        :umask=022:\
        :datasize-max=2048M:\
        :datasize-cur=1536M:\
        :maxproc-max=512:\
        :maxproc-cur=256:\
        :openfiles-cur=1536:\
        :stacksize-cur=4M:\
        :localcipher=blowfish,8:\
        :ypcipher=old:\
        :tc=auth-defaults:\
        :tc=auth-ftp-defaults:

#
# Settings used by /etc/rc and root
# This must be set properly for daemons started as root by inetd as well.
# Be sure reset these values back to system defaults in the default class!
#
daemon:\
        :ignorenologin:\
        :datasize=infinity:\
        :maxproc=infinity:\
        :openfiles-cur=128:\
        :stacksize-cur=8M:\
        :localcipher=blowfish,9:\
        :tc=default:

#
# Staff have fewer restrictions and can login even when nologins are set.
#
staff:\
        :datasize-cur=1536M:\
        :datasize-max=infinity:\
        :maxproc-max=512:\
        :maxproc-cur=256:\
        :ignorenologin:\
        :requirehome@:\
        :tc=default:

#
# Authpf accounts get a special motd and shell
#
authpf:\
        :welcome=/etc/motd.authpf:\
        :shell=/usr/sbin/authpf:\
        :tc=default:

#
# Override resource limits for certain daemons started by rc.d(8)
#
bgpd:\
        :openfiles-cur=512:\
        :tc=daemon:

unbound:\
        :openfiles-cur=512:\
        :tc=daemon:

Only interesting part for you is(NOTICE VALUES IN THIS EXAMPLE ARE ALREADY INCREASED):

default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
        :umask=022:\
        :datasize-max=2048M:\
        :datasize-cur=1536M:\
        :maxproc-max=512:\
        :maxproc-cur=256:\
        :openfiles-cur=1536:\
        :stacksize-cur=4M:\
        :localcipher=blowfish,8:\
        :ypcipher=old:\
        :tc=auth-defaults:\
        :tc=auth-ftp-defaults:

After this little tweak your browser gonna be rock solid. Of course you can make
values even higher. And my laptop produces less heat after this.

Inspirational puffy song www.openbsd.org/songs/song36.mp3
: Re: [OpenBSD 5.7] Solving chrashing browser (firefox, chromium) problem
: bones May 10, 2015, 06:20:14 AM
Another Slackware and OpenBSD user, nice! Yup, definitely gotta bump up the defaults for FF. Also consider some of the less bloated browsers:

:
pkg_add conkeror
pkg_add surf
pkg_add xombrero

With surf and xombrero, you'll end up dragging webkitgtk in along with it, but they're great browsers. Conkeror uses gecko, like FF.
: Re: [OpenBSD 5.7] Solving chrashing browser (firefox, chromium) problem
: v32itas May 10, 2015, 09:06:29 PM
Another Slackware and OpenBSD user, nice! Yup, definitely gotta bump up the defaults for FF. Also consider some of the less bloated browsers:

:
pkg_add conkeror
pkg_add surf
pkg_add xombrero

With surf and xombrero, you'll end up dragging webkitgtk in along with it, but they're great browsers. Conkeror uses gecko, like FF.

Thanks for updating. Looking for lighweight gui torrent client now. But I have one cli just havent learned how to use it yet. BTW OpenBSD forces me to learn some things that slackware doesnt so I love OpenBSD nearly as much as I love slackware. Fkn sexy.