Skip to content

Commit 60b60e2

Browse files
authored
fix nomachine (#47)
* fix nomachine * create /run/user/1000 * remove dbus * update docker config
1 parent f64ba50 commit 60b60e2

File tree

8 files changed

+18
-30
lines changed

8 files changed

+18
-30
lines changed

ubuntu-desktop/18.04/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN apt-get update && \
6363
Pin: release o=LP-PPA-mozillateam\n\
6464
Pin-Priority: 1001" > /etc/apt/preferences.d/mozilla-firefox &&\
6565
# install xfce4 and firefox
66-
apt-get install -y xfce4 terminator fonts-wqy-zenhei ffmpeg firefox &&\
66+
apt-get install -y xfce4 terminator fonts-wqy-zenhei pulseaudio ffmpeg firefox &&\
6767
# disable terminator dbus
6868
sed -i "s/python/python2/" /usr/share/terminator/terminator &&\
6969
sed -i "s/if OPTIONS.nodbus:/if True:/" /usr/share/terminator/terminator &&\
@@ -73,10 +73,6 @@ Pin-Priority: 1001" > /etc/apt/preferences.d/mozilla-firefox &&\
7373
update-locale LC_CTYPE=C.UTF-8 &&\
7474
rm -rf /var/lib/apt/lists/*
7575

76-
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
77-
RUN apt-get update && apt-get install -y pulseaudio && mkdir -p /var/run/dbus &&\
78-
rm -rf /var/lib/apt/lists/*
79-
8076
## Install remote desktop and other apps
8177
RUN bash /docker_config/post_install.sh &&\
8278
rm -rf /var/lib/apt/lists/*

ubuntu-desktop/20.04/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN apt-get update && \
6363
Pin: release o=LP-PPA-mozillateam\n\
6464
Pin-Priority: 1001" > /etc/apt/preferences.d/mozilla-firefox &&\
6565
# install xfce4 and firefox
66-
apt-get install -y xfce4 terminator fonts-wqy-zenhei ffmpeg firefox &&\
66+
apt-get install -y xfce4 terminator fonts-wqy-zenhei pulseaudio ffmpeg firefox &&\
6767
# set firefox as default web browser
6868
update-alternatives --set x-www-browser /usr/bin/firefox &&\
6969
rm -rf /var/lib/apt/lists/*

ubuntu-desktop/22.04/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,13 @@ RUN apt-get update && \
6363
Pin: release o=LP-PPA-mozillateam\n\
6464
Pin-Priority: 1001" > /etc/apt/preferences.d/mozilla-firefox &&\
6565
# install xfce4 and firefox
66-
apt-get install -y xfce4 terminator fonts-wqy-zenhei ffmpeg firefox &&\
66+
apt-get install -y xfce4 terminator fonts-wqy-zenhei pulseaudio ffmpeg firefox &&\
6767
# remove and disable screensaver
6868
apt-get remove -y xfce4-screensaver --purge &&\
6969
# set firefox as default web browser
7070
update-alternatives --set x-www-browser /usr/bin/firefox &&\
7171
rm -rf /var/lib/apt/lists/*
7272

73-
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
74-
RUN apt-get update && apt-get install -y pulseaudio && mkdir -p /var/run/dbus &&\
75-
rm -rf /var/lib/apt/lists/*
76-
7773
## Install remote desktop and other apps
7874
RUN bash /docker_config/post_install.sh &&\
7975
rm -rf /var/lib/apt/lists/*

ubuntu-desktop/24.04/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,13 @@ RUN apt-get update && \
6666
Pin: release o=LP-PPA-mozillateam\n\
6767
Pin-Priority: 1001" > /etc/apt/preferences.d/mozilla-firefox &&\
6868
# install xfce4 and firefox
69-
apt-get install -y xfce4 terminator fonts-wqy-zenhei ffmpeg firefox dbus-x11 &&\
69+
apt-get install -y xfce4 terminator fonts-wqy-zenhei pulseaudio ffmpeg firefox dbus-x11 &&\
7070
# remove and disable screensaver
7171
apt-get remove -y xfce4-screensaver --purge &&\
7272
# set firefox as default web browser
7373
update-alternatives --set x-www-browser /usr/bin/firefox &&\
7474
rm -rf /var/lib/apt/lists/*
7575

76-
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
77-
RUN apt-get update && apt-get install -y pulseaudio && mkdir -p /var/run/dbus &&\
78-
rm -rf /var/lib/apt/lists/*
79-
8076
## Configure ssh
8177
RUN mkdir -p /var/run/sshd && \
8278
sed -i 's/#*PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config && \

ubuntu-desktop/docker_config/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ if [ ! -f "/docker_config/init_flag" ]; then
1414
echo "root:$PASSWORD" | chpasswd
1515
echo "$USER:$PASSWORD" | chpasswd
1616
chsh -s /bin/bash $USER
17+
# /run/user/$UID
18+
mkdir -p /run/user/$UID
19+
chown $GID:$UID /run/user/$UID
1720
# extra env init for developer
1821
if [ -f "/docker_config/env_init.sh" ]; then
1922
bash /docker_config/env_init.sh
@@ -31,8 +34,6 @@ if [ -f "/docker_config/custom_startup.sh" ]; then
3134
fi
3235
# start sshd
3336
/usr/sbin/sshd
34-
# start dbus
35-
/etc/init.d/dbus start
3637
# start coder server
3738
if [ ! -z ${DISABLE_HTTPS+x} ]; then
3839
su $USER -c "code-server --bind-addr=0.0.0.0:5000 &"

ubuntu-desktop/docker_config/install_code_server.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
#!/bin/sh
2+
arch=$(dpkg --print-architecture)
3+
codename=$(lsb_release --short --codename)
4+
# update
25
apt-get update
36
# Install remote desktop (nomachine,kasmvnc,novnc)
47
bash /docker_config/install_nomachine.sh
58
bash /docker_config/install_kasmvnc.sh
69
bash /docker_config/install_novnc.sh
710
# Install code server
8-
bash /docker_config/install_code_server.sh
11+
CODE_VERSION=4.103.2
12+
if [[ $codename == 'bionic' ]]; then
13+
CODE_VERSION=4.16.1
14+
fi
15+
curl -fSL "https://github.com/coder/code-server/releases/download/v${CODE_VERSION}/code-server_${CODE_VERSION}_${arch}.deb" -o code-server.deb
16+
dpkg -i ./code-server.deb
17+
rm code-server.deb
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22
/etc/NX/nxserver --startup
3-
tail -f /usr/NX/var/log/nxserver.log
3+
tail -f /usr/NX/var/log/*.log

0 commit comments

Comments
 (0)