mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
775 B

  1. #! /bin/sh
  2. # Xsession - run as user
  3. # redirect errors to a file in user's home directory if we can
  4. for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
  5. do
  6. if ( cp /dev/null "$errfile" 2> /dev/null )
  7. then
  8. chmod 600 "$errfile"
  9. #exec > "$errfile" 2>&1
  10. break
  11. fi
  12. done
  13. DM_PATH=$PATH
  14. test -f /etc/profile && . /etc/profile
  15. test -f $HOME/.profile && . $HOME/.profile
  16. IFS_SAVE=$IFS
  17. IFS=:
  18. for i in $PATH; do
  19. case :$DM_PATH: in
  20. *:$i:*) ;;
  21. ::) DM_PATH=$i;;
  22. *) DM_PATH=$DM_PATH:$i;;
  23. esac
  24. done
  25. IFS=$IFS_SAVE
  26. PATH=$DM_PATH
  27. export PATH
  28. test -f /etc/xprofile && . /etc/xprofile
  29. test -f $HOME/.xprofile && . $HOME/.xprofile
  30. sess=$1
  31. shift
  32. case $sess in
  33. failsafe)
  34. exec xterm -geometry 80x24-0-0 $*
  35. ;;