mirror of
https://git.myvelabs.com/novnc/archlinux.git
synced 2026-06-17 05:19:17 +00:00
Add passwordless login
This commit is contained in:
parent
308f10a35d
commit
07b4f54d8d
3 changed files with 23 additions and 27 deletions
|
|
@ -26,7 +26,7 @@ then
|
||||||
chmod 0600 ~/.config/tigervnc/passwd
|
chmod 0600 ~/.config/tigervnc/passwd
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "SecurityTypes=none" >~/.config/tigervnc/config
|
MYVNC_PASSWORDLESS="-SecurityTypes none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove VNCPASS env
|
# Remove VNCPASS env
|
||||||
|
|
@ -49,7 +49,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# VNC config
|
# VNC config
|
||||||
cat >>~/.config/tigervnc/config <<- vncconfig
|
cat >~/.config/tigervnc/config <<- vncconfig
|
||||||
session=i3
|
session=i3
|
||||||
dpi=192
|
dpi=192
|
||||||
geometry=1920x1080
|
geometry=1920x1080
|
||||||
|
|
@ -150,4 +150,4 @@ done
|
||||||
startup
|
startup
|
||||||
|
|
||||||
# Launch Tigervnc
|
# Launch Tigervnc
|
||||||
/usr/bin/dbus-launch vncserver :0
|
/usr/bin/dbus-launch vncserver :0 ${MYVNC_PASSWORDLESS}
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,16 @@ do
|
||||||
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}/
|
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}/
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check for MYVNC_VNCPASS variable
|
# Configure tigervnc auth if MYVNC_VNCPASS is set
|
||||||
if [ -z ${MYVNC_VNCPASS} ]
|
if [ ${MYVNC_VNCPASS} ]
|
||||||
then
|
then
|
||||||
echo "MYVNC_VNCPASS env variable is missing"
|
if [ ! -f ~/.config/tigervnc/passwd ]
|
||||||
exit 1
|
then
|
||||||
fi
|
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd
|
||||||
|
chmod 0600 ~/.config/tigervnc/passwd
|
||||||
# Configure tigervnc auth
|
fi
|
||||||
if [ ! -f ~/.config/tigervnc/passwd ]
|
else
|
||||||
then
|
MYVNC_PASSWORDLESS="-SecurityTypes none"
|
||||||
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd
|
|
||||||
chmod 0600 ~/.config/tigervnc/passwd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove VNCPASS env
|
# Remove VNCPASS env
|
||||||
|
|
@ -86,4 +84,4 @@ tztime local {
|
||||||
i3status
|
i3status
|
||||||
|
|
||||||
# Launch Tigervnc
|
# Launch Tigervnc
|
||||||
/usr/bin/dbus-launch vncserver :0
|
/usr/bin/dbus-launch vncserver :0 ${MYVNC_PASSWORDLESS}
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,16 @@ do
|
||||||
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}/
|
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}/
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check for MYVNC_VNCPASS variable
|
# Configure tigervnc auth if MYVNC_VNCPASS is set
|
||||||
if [ -z ${MYVNC_VNCPASS} ]
|
if [ ${MYVNC_VNCPASS} ]
|
||||||
then
|
then
|
||||||
echo "MYVNC_VNCPASS env variable is missing"
|
if [ ! -f ~/.config/tigervnc/passwd ]
|
||||||
exit 1
|
then
|
||||||
fi
|
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd
|
||||||
|
chmod 0600 ~/.config/tigervnc/passwd
|
||||||
# Configure tigervnc auth
|
fi
|
||||||
if [ ! -f ~/.config/tigervnc/passwd ]
|
else
|
||||||
then
|
MYVNC_PASSWORDLESS="-SecurityTypes none"
|
||||||
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd
|
|
||||||
chmod 0600 ~/.config/tigervnc/passwd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove VNCPASS env
|
# Remove VNCPASS env
|
||||||
|
|
@ -72,4 +70,4 @@ kscreenlockerrc
|
||||||
exec "${@}" &
|
exec "${@}" &
|
||||||
|
|
||||||
# Launch Tigervnc
|
# Launch Tigervnc
|
||||||
/usr/bin/dbus-launch vncserver :0
|
/usr/bin/dbus-launch vncserver :0 ${MYVNC_PASSWORDLESS}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue