Procházet zdrojové kódy

Add password and remove inactive gsettings

ehfd před 5 roky
rodič
revize
b7fad6ff45
3 změnil soubory, kde provedl 3 přidání a 7 odebrání
  1. 2 1
      Dockerfile
  2. 1 1
      README.md
  3. 0 5
      bootstrap.sh

+ 2 - 1
Dockerfile

@@ -146,7 +146,7 @@ RUN chmod 755 /bootstrap.sh
 COPY supervisord.conf /etc/supervisord.conf
 RUN chmod 755 /etc/supervisord.conf
 
-# Create user
+# Create user with password 'vncpasswd'
 RUN apt-get update && apt-get install -y --no-install-recommends \
       sudo && \
     groupadd -g 1000 user && \
@@ -154,6 +154,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     usermod -a -G adm,audio,cdrom,disk,games,lpadmin,sudo,dip,plugdev,tty,video user && \
     echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
     chown -R user:user /home/user/ && \
+    echo 'user:vncpasswd' | chpasswd && \
     rm -rf /var/lib/apt/lists/*
 
 EXPOSE 5901

+ 1 - 1
README.md

@@ -6,7 +6,7 @@ Use [docker-nvidia-egl-desktop](https://github.com/ehfd/docker-nvidia-egl-deskto
 
 **Change the NVIDIA GPU driver version to be same as the host and build your own Dockerfile.** Change **bootstrap.sh** if you are using a headless GPU like Tesla. Corresponding container toolkit on the host for allocating GPUs should also be set up.
 
-Connect to the spawned noVNC WebSocket instance with a browser in port 5901, no VNC client required.
+Connect to the spawned noVNC WebSocket instance with a browser in port 5901, no VNC client required (password for the default user is 'vncpasswd').
 
 Note: Requires access to at least one **/dev/ttyX** device. Check out [k8s-hostdev-plugin](https://github.com/bluebeach/k8s-hostdev-plugin) for provisioning this in Kubernetes clusters without privileged access.
 

+ 0 - 5
bootstrap.sh

@@ -31,11 +31,6 @@ sleep 2
 
 export DISPLAY=:0
 mate-session &
-sleep 2
-
-gsettings set org.gnome.desktop.lockdown disable-lock-screen true
-gsettings set org.gnome.desktop.screensaver lock-enabled false
-gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
 
 echo "Session Running. Press [Return] to exit."
 read