-
-
Save unixnut/3706096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use with GDM (SuSE, Ubuntu, RHEL, CentOS) | |
# place into /etc/gdm/Init/ | |
if [ -x /usr/local/sbin/console_vnc ] ; then | |
/usr/local/sbin/console_vnc | |
else | |
echo warning: /usr/local/sbin/console_vnc not found | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use with GDM (SuSE, Ubuntu, RHEL, CentOS) | |
# place into /etc/gdm/Init/ | |
if [ -x /usr/local/sbin/console_vnc ] ; then | |
/usr/local/sbin/console_vnc | |
else | |
echo warning: /usr/local/sbin/console_vnc not found | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
if [ -x /usr/bin/x0vncserver ] ; then | |
prog=x0vncserver | |
else | |
prog=x11vnc | |
fi | |
metalogfile=/var/log/console_vnc.log | |
# start x11vnc/x0vncserver if it isn't already running | |
if [ -z "$(pgrep -x $prog)" ] ; then | |
date >> $metalogfile | |
echo XAUTHORITY=$XAUTHORITY >> $metalogfile | |
if [ $prog = x11vnc ] ; then | |
x11vnc -display :0 -forever -bg -xkb -o /var/log/$prog.log -passwdfile /root/.vnc/passwd | |
# -allow 192.168.1. | |
else | |
# see http://www.tigervnc.org/ | |
x0vncserver -PasswordFile=/root/.vnc/passwd -display=:0 -Log=/var/log/$prog.log -DisconnectClients=off | |
fi | |
# store the PID just for reference | |
echo -n 'PID: ' >> $metalogfile | |
pgrep -x $prog >> $metalogfile | |
else | |
echo $(date) -- already running >> $metalogfile | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment