Created
November 18, 2010 02:14
-
-
Save jcsackett/704532 to your computer and use it in GitHub Desktop.
x-only trick from One Thing Well (http://onethingwell.org/post/1432068153/x-only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Did a program get specified? | |
if test $# -lt 1; then | |
echo "You must specify a program to run with x."; | |
exit; | |
fi | |
# Did a tty get specified? | |
if test $# -lt 2; then | |
tty=1; | |
else | |
tty=$2; | |
fi | |
# If a tty was specified, is it legit? | |
if test $tty -gt 6; then | |
echo "Cannot use a tty higher than 6."; | |
exit; | |
fi | |
# And finally, xinit. | |
xinit $1 -- :$tty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment