Skip to content

Instantly share code, notes, and snippets.

@louisje
Last active July 28, 2017 10:25
Show Gist options
  • Save louisje/3737e603cceaf83f4c26 to your computer and use it in GitHub Desktop.
Save louisje/3737e603cceaf83f4c26 to your computer and use it in GitHub Desktop.
#!/bin/sh
export DISPLAY=":2"
#sudo apt-get install -y tightvncserver
sudo apt-get install -y psmisc
#vncserver -kill $DISPLAY
sudo pkill x11vnc
sudo pkill Xvfb
### x-window ###
sudo apt-get install -y xfonts-cyrillic xfonts-100dpi xfonts-75dpi xvfb x11vnc xfce4
#vncserver $DISPLAY -geometry 1372x874 -depth 24
if test -z "$RESOLUTION"; then RESOLUTION="1372x874"; fi
if test -z "$DEPTH"; then DEPTH="24"; fi
Xvfb "$DISPLAY" -screen 0 "$RESOLUTION"x"$DEPTH" -pixdepths 8 16 24 32 -shmem -ac +xinerama +extension RANDR &
sleep 5
x11vnc -shared -threads -xkb -xrandr -xinerama -nopw -display "$DISPLAY" -forever -nonc -bg
sleep 5
touch $HOME/.Xresources
xrdb $HOME/.Xresources
xsetroot -gray
### Desktop ###
if test -f ~/.fehbg; then . ~/.fehbg; fi
startxfce4 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment