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
|
|
@ -17,18 +17,16 @@ do
|
|||
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}/
|
||||
done
|
||||
|
||||
# Check for MYVNC_VNCPASS variable
|
||||
if [ -z ${MYVNC_VNCPASS} ]
|
||||
# Configure tigervnc auth if MYVNC_VNCPASS is set
|
||||
if [ ${MYVNC_VNCPASS} ]
|
||||
then
|
||||
echo "MYVNC_VNCPASS env variable is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Configure tigervnc auth
|
||||
if [ ! -f ~/.config/tigervnc/passwd ]
|
||||
then
|
||||
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd
|
||||
chmod 0600 ~/.config/tigervnc/passwd
|
||||
if [ ! -f ~/.config/tigervnc/passwd ]
|
||||
then
|
||||
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd
|
||||
chmod 0600 ~/.config/tigervnc/passwd
|
||||
fi
|
||||
else
|
||||
MYVNC_PASSWORDLESS="-SecurityTypes none"
|
||||
fi
|
||||
|
||||
# Remove VNCPASS env
|
||||
|
|
@ -86,4 +84,4 @@ tztime local {
|
|||
i3status
|
||||
|
||||
# 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