rc.x11 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #! /bin/sh -
  2. #
  3. # Multi-user mode with X11 session manager
  4. #
  5. # Copyright (c) 2018, 2020-2021 Matias Fonzo, <selk@dragora.org>.
  6. #
  7. # Licensed under the Apache License, Version 2.0 (the "License");
  8. # you may not use this file except in compliance with the License.
  9. # You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. # To reflect the name of this script
  19. RC="[${0##*/}]"
  20. umask 022
  21. IFS='
  22. '
  23. PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/opt/trinity/bin
  24. LC_ALL=C
  25. echo ""
  26. echo "${RC}: Looking for a graphical session manager ..."
  27. command -v gdm && exec gdm -nodaemon
  28. command -v kdm && exec kdm -nodaemon
  29. command -v tdm && exec tdm -nodaemon
  30. command -v xdm && exec xdm -nodaemon
  31. # Setback to INIT 3 in case of failure
  32. echo ""
  33. echo " If this message appears, it means that you do not have any"
  34. echo "of the following combinations of session managers installed:"
  35. echo "GDM, KDM, TDM, or XDM."
  36. echo ""
  37. exec telinit 3