-
-
Save unloadedroe/774d3093381b6f9e11355cb1b6bb47e6 to your computer and use it in GitHub Desktop.
Revisions
-
turicas revised this gist
Mar 22, 2012 . 2 changed files with 44 additions and 46 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,46 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ #!/bin/bash # Options: PASSWORD="mysecret" DISPLAY=":10" VNCSERVER_OPTIONS="-geometry 1024x768 -alwaysshared" PASSWD_PATH="$HOME/.vnc/passwd" XSTARTUP_PATH="$HOME/.vnc/xstartup" VNCSERVER="tightvncserver" VNCPASSWD="tightvncpasswd" # NOTE: you can change `tightvncpasswd` by `vncpasswd` if you don't use # TightVNC but it won't work in some VNC implementations NEW_SESSION="exec gnome-session" vncserver_stop() { # Kill server for this display if is running $VNCSERVER -clean -kill $DISPLAY } vncserver_start() { echo "$PASSWORD" | $VNCPASSWD -f > $PASSWD_PATH chmod 600 $PASSWD_PATH echo "$NEW_SESSION" > $XSTARTUP_PATH $VNCSERVER $DISPLAY $VNCSERVER_OPTIONS } case "$1" in start) vncserver_start ;; stop) vncserver_stop ;; restart) vncserver_stop vncserver_start ;; *) echo "Usage: $0 <start|stop|restart>" exit 1 esac -
turicas renamed this gist
Mar 21, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
turicas revised this gist
Mar 21, 2012 . 2 changed files with 46 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,46 @@ #!/bin/bash # Options: PASSWORD="mysecret" DISPLAY=":1" VNCSERVER_OPTIONS="-geometry 1024x768 -alwaysshared" PASSWD_PATH="$HOME/.vnc/passwd" XSTARTUP_PATH="$HOME/.vnc/xstartup" tightvnc_stop() { # Kill server for this display if is running tightvncserver -clean -kill $DISPLAY } tightvnc_start() { # Store new password # NOTE: you can change `tightvncpasswd` by `vncpasswd` if you don't use # TightVNC but it won't work in some VNC implementations echo "$PASSWORD" | tightvncpasswd -f > $PASSWD_PATH chmod 600 $PASSWD_PATH # Command to start new session echo "exec gnome-session" > $XSTARTUP_PATH # Start new TightVNC server tightvncserver $DISPLAY $VNCSERVER_OPTIONS } case "$1" in start) tightvnc_start ;; stop) tightvnc_stop ;; restart) tightvnc_start tightvnc_stop ;; *) echo "Usage: $0 <start|stop|restart>" exit 1 esac This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +0,0 @@ -
turicas revised this gist
Mar 21, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ XSTARTUP_PATH="$HOME/.vnc/xstartup" # NOTE: you can change `tightvncpasswd` by `vncpasswd` if you don't use # TightVNC but it won't work in some VNC implementations echo "$PASSWORD" | tightvncpasswd -f > $PASSWD_PATH chmod 600 $PASSWD_PATH # Command to start new session echo "exec gnome-session" > $XSTARTUP_PATH -
turicas renamed this gist
Mar 21, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ #!/bin/bash # Options: -
turicas created this gist
Mar 21, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ #!/bin/bash # Options: PASSWORD="mysecret" DISPLAY=":1" VNCSERVER_OPTIONS="-geometry 1024x768 -alwaysshared" PASSWD_PATH="$HOME/.vnc/passwd" XSTARTUP_PATH="$HOME/.vnc/xstartup" # Store new password # NOTE: you can change `tightvncpasswd` by `vncpasswd` if you don't use # TightVNC but it won't work in some VNC implementations echo "$PASSWORD" | tightvncpasswd -f > $PASSWD_PATH chmod 700 $PASSWD_PATH # Command to start new session echo "exec gnome-session" > $XSTARTUP_PATH # Kill server for this display if is running tightvncserver -clean -kill $DISPLAY # Start new TightVNC server tightvncserver $DISPLAY $VNCSERVER_OPTIONS