This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
Plasma-in-Arch-in-Docker/start.sh

21 lines
553 B
Bash
Raw Normal View History

2020-02-02 05:20:10 +00:00
#!/bin/bash
umask 0077 # use safe default permissions
chmod go-rwx "$HOME/.vnc" # enforce safe permissions
2020-05-17 03:47:58 +00:00
chmod +x "$HOME/.vnc/xstartup"
# chromium
sed -i 's/\/usr\/bin\/chromium/\/usr\/bin\/chromium --no-sandbox/g' /usr/share/applications/chromium.desktop
2020-02-02 05:20:10 +00:00
2020-02-02 11:58:03 +00:00
# Start TigerVNC
2020-02-02 05:20:10 +00:00
if [ ! -z $VNC_PASSWD ]; then
2020-05-14 03:34:15 +00:00
vncpasswd -f <<< "$VNC_PASSWD" > "$HOME/.vnc/passwd"
vncserver -rfbport 5900
2020-02-02 05:20:10 +00:00
else
2020-05-14 03:34:15 +00:00
vncpasswd -f <<< "" > "$HOME/.vnc/passwd"
vncserver -rfbport 5900 -SecurityTypes None
2020-02-02 05:20:10 +00:00
fi
2020-02-02 11:58:03 +00:00
# Start noVNC
/noVNC-${noVNC_version}/utils/launch.sh