Skip to content

Commit

Permalink
MATE desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Mar 20, 2024
1 parent cbb55cc commit ed26996
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
31 changes: 19 additions & 12 deletions Dockerfile
Expand Up @@ -4,20 +4,19 @@ USER root

RUN apt-get -y -qq update \
&& apt-get -y -qq install \
dbus-x11 \
xfce4 \
xfce4-panel \
xfce4-session \
xfce4-settings \
xorg \
xubuntu-icon-theme \
fonts-dejavu \
# Disable the automatic screenlock since the account password is unknown
&& apt-get -y -qq remove xfce4-screensaver \
ubuntu-mate-desktop \
vim \
&& add-apt-repository -y ppa:mozillateam/ppa \
&& printf 'Package: firefox*\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001\n' > /etc/apt/preferences.d/firefox \
&& apt-get install -y -q firefox \
&& apt-get purge -y -q \
blueman \
mate-screensaver \
&& apt-get autoremove -y -q \
# chown $HOME to workaround that the xorg installation creates a
# /home/jovyan/.cache directory owned by root
# Create /opt/install to ensure it's writable by pip
&& mkdir -p /opt/install \
&& mkdir -p /opt/install $HOME/.vnc \
&& chown -R $NB_UID:$NB_GID $HOME /opt/install \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -28,7 +27,6 @@ RUN if [ "${vncserver}" = "tigervnc" ]; then \
apt-get -y -qq update; \
apt-get -y -qq install \
tigervnc-standalone-server \
tigervnc-xorg-extension \
; \
rm -rf /var/lib/apt/lists/*; \
fi
Expand Down Expand Up @@ -57,3 +55,12 @@ COPY --chown=$NB_UID:$NB_GID . /opt/install
RUN . /opt/conda/bin/activate && \
pip install -e /opt/install && \
jupyter server extension enable jupyter_remote_desktop_proxy

COPY --chown=$NB_UID:$NB_GID start-mate.sh $HOME/.vnc/xstartup

# Add some shortcuts to the desktop
RUN mkdir -p $HOME/Desktop && \
ln -s \
/usr/share/applications/mate-terminal.desktop \
/usr/share/applications/firefox.desktop \
$HOME/Desktop
10 changes: 10 additions & 0 deletions start-mate.sh
@@ -0,0 +1,10 @@
#!/bin/sh

# Firefox sandboxing may not work in a container
# https://wiki.mozilla.org/Security/Sandbox#Environment_variables
export MOZ_DISABLE_CONTENT_SANDBOX=1
export MOZ_DISABLE_GMP_SANDBOX=1
export MOZ_DISABLE_RDD_SANDBOX=1
export MOZ_DISABLE_SOCKET_PROCESS_SANDBOX=1

exec dbus-launch mate-session "$@"

0 comments on commit ed26996

Please sign in to comment.