Skip to content

Commit

Permalink
Allow ALSA and pulseaudio sound (#410). Fix tab crashes (#376, #360). (
Browse files Browse the repository at this point in the history
…#429)

Sets browser.tabs.remote.autostart = false to avoid tab crashes. #376, #360
Adds apulse to provide fake pulseaudio to allow ALSA sound again. #410
Adds libpulse0 to allow pulseaudio sound. #issuecomment-422969073
ENTRYPOINT wrapper script to run with or without apulse wrapper, depending on given or missing /dev/dri
  • Loading branch information
mviereck authored and jessfraz committed Oct 4, 2018
1 parent 90812d8 commit 868b5f1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion firefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,25 @@ RUN apt-get update && apt-get install -y \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0AB215679C571D1C8325275B9BDB3D89CE49EC21 \
&& echo "deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial main" >> /etc/apt/sources.list.d/firefox.list \
&& apt-get update && apt-get install -y \
apulse \
ca-certificates \
firefox \
hicolor-icon-theme \
libasound2 \
libgl1-mesa-dri \
libgl1-mesa-glx \
libpulse0 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

ENV LANG en-US

COPY local.conf /etc/fonts/local.conf

ENTRYPOINT [ "/usr/bin/firefox" ]
RUN echo 'pref("browser.tabs.remote.autostart", false);' >> /etc/firefox/syspref.js

RUN echo "#! /bin/bash \n\
[ -e /dev/snd ] && exec apulse firefox || exec firefox \n\
" >/usr/local/bin/startfirefox && chmod +x /usr/local/bin/startfirefox

ENTRYPOINT [ "/usr/local/bin/startfirefox" ]

0 comments on commit 868b5f1

Please sign in to comment.