Advertisement
Guest User

Untitled

a guest
Feb 5th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Sample .xinitrc for SuSE Linux
  4. # This script is called from 'startx' when you start an X session
  5. #
  6.  
  7. #
  8. # In case everything goes wrong, we at least fall back to a plain xterm
  9. #
  10. failsafe="xterm -ls -T Failsafe -geometry 80x24-0-0"
  11. trap "exec $failsafe" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO
  12.  
  13. #
  14. # Some bash (1 and 2) settings to avoid trouble on a
  15. # failed program call.
  16. #
  17. set +e > /dev/null 2>&1
  18. set +u > /dev/null 2>&1
  19. set +o posix > /dev/null 2>&1
  20. if type shopt > /dev/null 2>&1 ; then
  21. shopt -s execfail
  22. else
  23. no_exit_on_failed_exec=1
  24. fi
  25.  
  26. #
  27. # Run user xinit scripts.
  28. #
  29. for script in /etc/X11/xinit/xinitrc.d/*; do
  30. test -e $script || continue
  31. test -d $script && continue
  32. case "$script" in
  33. .*) continue ;;
  34. *.rpm*) continue ;;
  35. *.swap) continue ;;
  36. *.bak) continue ;;
  37. *.orig) continue ;;
  38. \#*) continue ;;
  39. *~) continue ;;
  40. esac
  41. if test -x $script ; then
  42. if grep -qE "^# to be sourced" $script >/dev/null 2>&1; then
  43. . $script
  44. else
  45. $script &
  46. fi
  47. else
  48. . $script
  49. fi
  50. done
  51. unset script
  52.  
  53. #
  54. # Source common code shared between the
  55. # X session and X init scripts
  56. #
  57. . /etc/X11/xinit/xinitrc.common
  58.  
  59. #
  60. # Special for twm
  61. #
  62. case "$WINDOWMANAGER" in
  63. *twm) xsetroot -solid darkslateblue
  64. esac
  65.  
  66. #
  67. # Uncomment next lines to activate asking for ssh passphrase
  68. #
  69. # if test -S "$SSH_AUTH_SOCK" -a -x "$SSH_ASKPASS"; then
  70. # ssh-add < /dev/null
  71. # fi
  72.  
  73. #
  74. # Add your own lines here...
  75. #
  76.  
  77.  
  78. # day planer deamon
  79. # pland &
  80.  
  81. #
  82. # finally start the window manager
  83. #
  84. unset WINDOW_MANAGER STARTUP
  85. exec $WINDOWMANAGER ${1+"$@"}
  86.  
  87. # call failsafe
  88. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement