Skip to content

Instantly share code, notes, and snippets.

@PhilHudson
Created May 21, 2015 19:50
Show Gist options
  • Save PhilHudson/64e3ac71fa435b87d806 to your computer and use it in GitHub Desktop.
Save PhilHudson/64e3ac71fa435b87d806 to your computer and use it in GitHub Desktop.
#!/bin/tcsh -f
# For use by a terminal emulator as its startup script.
# Sets `DISPLAY' to `localhost:0.0' and launches/re-attaches `screen'.
echo ":0.0" > "$HOME/tmp/display"
switch ( "$OSTYPE" )
case "darwin":
set SCREEN='/opt/local/bin/screen'
breaksw
default:
set SCREEN='/usr/bin/screen'
breaksw
endsw
$SCREEN -D -RR -e^Za -U
unset SCREEN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment