OpenBSD: Install Firefox Web Browser

by on July 17, 2011 · 3 comments· LAST UPDATED July 17, 2011


How do I install Mozilla Firefox which is a free and open source web browser under OpenBSD operating systems?

You can install Mozilla Firefox using the pkg_add command as follows. Open a command-line terminal. Switch to the root user by typing su - and entering the root password, when prompted. Type the following command:
# export PKG_PATH=`machine -a`/
# pkg_add -v mozilla-firefox

Sample outputs:

mozilla-firefox-3.6.13p3:nspr-4.8.7: ok
mozilla-firefox-3.6.13p3:libiconv-1.13p2: ok
mozilla-firefox-3.6.13p3:gettext-0.18.1p0: ok
mozilla-firefox-3.6.13p3:pcre-8.02p1: ok
mozilla-firefox-3.6.13p3:libgamin-0.1.10p3: ok
mozilla-firefox-3.6.13p3:glib2-2.26.1p0: ok
mozilla-firefox-3.6.13p3:desktop-file-utils-0.17: ok
mozilla-firefox-3.6.13p3:cairo-1.10.2: ok
mozilla-firefox-3.6.13p3:pango-1.28.3p2: ok
mozilla-firefox-3.6.13p3:libxml-2.7.8p1: ok
mozilla-firefox-3.6.13p3:shared-mime-info-0.80: ok
mozilla-firefox-3.6.13p3:atk-1.32.0: ok
mozilla-firefox-3.6.13p3:jasper-1.900.1p1: ok
mozilla-firefox-3.6.13p3:gdk-pixbuf-2.22.1: ok
mozilla-firefox-3.6.13p3:hicolor-icon-theme-0.12: ok
mozilla-firefox-3.6.13p3:gtk+2-2.22.1: ok
mozilla-firefox-3.6.13p3:sqlite3-3.7.4: ok
mozilla-firefox-3.6.13p3:nss-3.12.9: ok
mozilla-firefox-3.6.13p3: ok
Look in /usr/local/share/doc/pkg-readmes for extra documentation.

You can start Firefox using the following command or GUI menu options:
$ /usr/local/bin/firefox &

Fig.01: Firefox 3.x running under OpenBSD 4.9/AMD64

Fig.01: Firefox 3.x running under OpenBSD 4.9/AMD64

More links and information

  1. man pkg_add
  2. OpenBSD FTP mirror list
Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 3 comments… read them below or add one }

1 Richard Thornton November 11, 2011 at 8:01 pm

Can you run firefox with just the stock xdm environment or do you have to have gnome loaded?




2 Jim May 21, 2012 at 2:07 pm

I was able to get Firefox installed on OpenBSD 5.1 using these instructions, so thank you for that. However, I can’t seem to start it. So per another page on this site, I entered $export $DISPLAY=:0 and then tried to launch it again. Now it says 12 times that “No protocol specified” and then on the 13th line it says “Error: cannot open display: :0″


3 GTFO May 28, 2014 at 7:33 pm

Yes, login to your terminal and start GUI using startx command:


In X terminal type:

/usr/local/bin/firefox &


Leave a Comment

Tagged as: , , , , , , ,

Previous Faq:

Next Faq: