OpenSDE Packages Database (without history before r20070)
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.

55 lines
1.3 KiB

  1. #! /bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../kdebase/Xsession.pre
  6. # Copyright (C) 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. # Xsession - run as user
  16. # redirect errors to a file in user's home directory if we can
  17. for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
  18. do
  19. if ( cp /dev/null "$errfile" 2> /dev/null )
  20. then
  21. chmod 600 "$errfile"
  22. #exec > "$errfile" 2>&1
  23. break
  24. fi
  25. done
  26. DM_PATH=$PATH
  27. test -f /etc/profile && . /etc/profile
  28. test -f $HOME/.profile && . $HOME/.profile
  29. IFS_SAVE=$IFS
  30. IFS=:
  31. for i in $PATH; do
  32. case :$DM_PATH: in
  33. *:$i:*) ;;
  34. ::) DM_PATH=$i;;
  35. *) DM_PATH=$DM_PATH:$i;;
  36. esac
  37. done
  38. IFS=$IFS_SAVE
  39. PATH=$DM_PATH
  40. export PATH
  41. test -f /etc/xprofile && . /etc/xprofile
  42. test -f $HOME/.xprofile && . $HOME/.xprofile
  43. sess=$1
  44. shift
  45. case $sess in
  46. failsafe)
  47. exec xterm -geometry 80x24-0-0 $*
  48. ;;