Skip to content

Instantly share code, notes, and snippets.

@maxrp
Created November 2, 2014 20:55
Show Gist options
  • Save maxrp/11259cbe20c7d0a499ff to your computer and use it in GitHub Desktop.
Save maxrp/11259cbe20c7d0a499ff to your computer and use it in GitHub Desktop.
My preferred way of launching a test X server for WM experimentation
#!/bin/bash
# Usage: ./xephyrize 2bwm|dwm|cwm|tinywm
# Define a simple X session
function x_session() {
sleep 1;
$@ &
xterm &
}
# launch the nested X server
Xephyr +extension RANDR -screen ${SCREEN_SIZE:-800x600} :1 -ac &
# pass our arguments into the x_session
DISPLAY=:1 x_session $@ &
# wait for everyone in our shell's process group to exit
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment