Advertisement
Guest User

Untitled

a guest
Mar 24th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #killx() {
  4. #       proc=`ps xa | grep "X :1" | grep "SL" | awk '{print $1}'`;
  5. #       if [ $proc ]; then
  6. #               kill proc;
  7. #       fi;
  8. #}
  9.  
  10. bin=$1
  11. [ -x "$bin" ] && bin=$(readlink -f "$bin")
  12. [ -x "$bin" ] || bin=$(which "$bin" 2>/dev/null)
  13. [ -x "$bin" ] || { echo "No such executable \"$1\""; exit 1; }
  14.  
  15. #       killx && sleep 1
  16. #       # http://www.linuxquestions.org/questions/showthread.php?threadid=38281
  17. #       xauth add  :1 . `mcookie`
  18. #       X -screen "NX" :1 &
  19. #       DISPLAY=:1 $1
  20. #       sleep 1; killx
  21.  
  22. xauth add  :1 . `mcookie`
  23. export __GL_FSAA_MODE=5
  24. xinit "$bin" -- :1 #-xf86config xorg.conf -screen NX
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement