Skip to content

Instantly share code, notes, and snippets.

@bmsleight
Last active August 29, 2015 14:10
Show Gist options
  • Save bmsleight/a556a0d3015bab39ae73 to your computer and use it in GitHub Desktop.
Save bmsleight/a556a0d3015bab39ae73 to your computer and use it in GitHub Desktop.
New Cloud Thingie
#/etc/rc.local
/usr/local/sbin/cloud
#/usr/local/sbin/cloud
echo "A cloud!" >/tmp/cloud.txt
su bms -c "/usr/X11R6/bin/Xvfb :0 -screen 0 1024x768x24 >/tmp/fb 2>&1 " &
su bms -c "/usr/local/bin/x11vnc -rfbauth /home/bms/.vnc/passwd -forever -loop100 -display :0 >/tmp/x11 2>&1 " &
su bms -l -c "sleep 100; DISPLAY=:0 /usr/X11R6/bin/xterm >/tmp/xterm 2>&1 " &
su bms -l -c "sleep 10; DISPLAY=:0 /usr/local/bin/dbus-launch --sh-syntax --exit-with-session /usr/local/bin/xfce4-session >/tmp/xfce 2>&1 " &
su bms -l -c "/home/bms/kanaka-noVNC-b2e8311/utils/launch.sh --vnc localhost:5900 --listen 8000 --cert /home/bms/self.pem >/tmp/vnc 2>&1 & "
echo "A cloud!.."
pkg_add x11vnc
pkg_add xfce
pkg_add unzip
pkg_add wget
pkg_add bash
ln -s /usr/local/bin/python2.7 /usr/local/bin/python
x11vnc -storepasswd /home/bms/.vnc/passwd
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout /home/bms/self.pem
chmod a+x /usr/local/sbin/cloud
wget http://github.com/kanaka/noVNC/zipball/master
unzip master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment