Skip to content

Instantly share code, notes, and snippets.

@RichardNesbitt
Created February 13, 2025 23:09
Show Gist options
  • Save RichardNesbitt/647a1617007d0b18488b95472b940f60 to your computer and use it in GitHub Desktop.
Save RichardNesbitt/647a1617007d0b18488b95472b940f60 to your computer and use it in GitHub Desktop.
Clear and Launch new VNCServer Sessions - Ubuntu
rm -rf ~/.vnc && mkdir ~/.vnc
cat > ~/.vnc/xstartup << 'EOL'
#!/bin/bash
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="XFCE"
export DISPLAY=:1
export XAUTHORITY=$HOME/.Xauthority
xsetroot -solid grey
vncconfig -iconic &
startxfce4 &
EOL
chmod +x ~/.vnc/xstartup && touch ~/.Xresources && vncserver :1 -geometry 1024x768 -depth 24
@RichardNesbitt
Copy link
Author

I've chained the commands into 3 copy/pasteable chunks that can be executed from the shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment