Skip to content

Instantly share code, notes, and snippets.

@zmughal
Created February 12, 2016 22:53
Show Gist options
  • Save zmughal/da6a0a78dbeb7dfca8dc to your computer and use it in GitHub Desktop.
Save zmughal/da6a0a78dbeb7dfca8dc to your computer and use it in GitHub Desktop.
#!/bin/sh
#DISPLAY=:0
SIZE="1024x700"
SCREEN_HEIGHT=`xrandr -q | grep '*' | head -1 | grep -o 'x[0-9]\+' | grep -o '[0-9]\+'`
if [ "$SCREEN_HEIGHT" = "1024" ]; then
SIZE="1280x1000"
fi
Xephyr -screen "$SIZE" :1 &
sleep 3
export DISPLAY=":1.0"
fvwm &
(DISPLAY=":1.0" sleep 5 && script -c matlab /dev/null ) &
@zmughal
Copy link
Author

zmughal commented Feb 12, 2016

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