mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-18 00:06:21 +00:00
Plasma entrypoint
This commit is contained in:
parent
30df9e6621
commit
ff454ef1cb
1 changed files with 54 additions and 0 deletions
54
archplasma/entrypoint
Executable file
54
archplasma/entrypoint
Executable file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Check for MYVNC_VNCPASS variable
|
||||||
|
if [ -z ${MYVNC_VNCPASS} ]
|
||||||
|
then
|
||||||
|
echo "MYVNC_VNCPASS env variable is missing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure tigervnc auth
|
||||||
|
if [ ! -f ~/.vnc/passwd ]
|
||||||
|
then
|
||||||
|
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.vnc/passwd
|
||||||
|
chmod 0600 ~/.vnc/passwd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove VNCPASS env
|
||||||
|
unset MYVNC_VNCPASS
|
||||||
|
|
||||||
|
# VNC xstartup
|
||||||
|
install /dev/stdin ~/.vnc/xstartup <<- xstartup
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
unset SESSION_MANAGER
|
||||||
|
unset DBUS_SESSION_BUS_ADDRESS
|
||||||
|
exec ${STARTXBIN}
|
||||||
|
xstartup
|
||||||
|
|
||||||
|
# Turn vnc sharing on/off
|
||||||
|
if [[ ${MYVNC_VNCSHARING} == "true" ]] || [[ ${MYVNC_VNCSHARING} == "1" ]]
|
||||||
|
then
|
||||||
|
_MYVNC_VNCSHARING=alwaysshared
|
||||||
|
else
|
||||||
|
_MYVNC_VNCSHARING=nevershared
|
||||||
|
fi
|
||||||
|
|
||||||
|
# VNC config
|
||||||
|
cat >~/.vnc/config <<- vncconfig
|
||||||
|
session=plasmax11
|
||||||
|
dpi=192
|
||||||
|
geometry=1920x1080
|
||||||
|
framerate=60
|
||||||
|
depth=32
|
||||||
|
${_MYVNC_VNCSHARING}
|
||||||
|
vncconfig
|
||||||
|
|
||||||
|
# Disable KDE screenlock
|
||||||
|
cat >~/.config/kscreenlockerrc <<- 'kscreenlockerrc'
|
||||||
|
[Daemon]
|
||||||
|
Autolock=false
|
||||||
|
LockOnResume=false
|
||||||
|
Timeout=0
|
||||||
|
kscreenlockerrc
|
||||||
|
|
||||||
|
# Launch Tigervnc
|
||||||
|
/usr/bin/dbus-launch vncserver :0 &
|
||||||
Loading…
Add table
Add a link
Reference in a new issue