initial commit

This commit is contained in:
fosslinux 2019-07-16 03:55:54 +10:00
parent 8c3269bf50
commit 40ccc0f600
2 changed files with 24 additions and 0 deletions

19
acquirevnc Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
USER=$(whoami)
# get new display
DISPLAY=0
for file in /var/lib/vnc/* ; do
if [ $(cat $file) -gt $DISPLAY ] ; then
DISPLAY=$(cat $file)
fi
done
let "DISPLAY++"
echo $DISPLAY
# add user file
echo "$DISPLAY" > /var/lib/vnc/${USER}
chmod 644 /var/lib/vnc/${USER}
/usr/local/bin/startvnc

5
startvnc Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
USER=$(whoami)
DISPLAY=$(cat /var/lib/vnc/${USER})
vncserver :${DISPLAY}