Skip to content

Instantly share code, notes, and snippets.

@markjlorenz
Created June 10, 2014 02:48
Show Gist options
  • Save markjlorenz/3c6abb0460db33b0193f to your computer and use it in GitHub Desktop.
Save markjlorenz/3c6abb0460db33b0193f to your computer and use it in GitHub Desktop.
Running an xserver with no display attached

Can You Run an X11 Server with a Fake Display?

yes.

On The Server

sudo yum install xorg-x11-server-Xvfb
export DISPLAY=:1
Xvfb :1 -screen 0 1024x768x16 &
xeyes &
xwd -out screenshot.xwd -root
convert screenshot.xwd screen.png

On Another Machine

ssh j_snow@headless "cat screen.png" | display -

Yields

eyes without a head

@skpy
Copy link

skpy commented Jun 10, 2014

j_snow is an inappropriate username for this server. It should have been named "eddard" or "ned_stark". :)

@skpy
Copy link

skpy commented Jun 10, 2014

unless you just dropped a huge spoiler on me, because I'm only watching the show, not reading the books!

@markjlorenz
Copy link
Author

No you're right. I'm a terrible nerd :-/

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