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.

86 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../xorg-server/stone_mod_xorg.sh
  5. # Copyright (C) 2008 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2004 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. #
  17. # [MAIN] 50 xorg X11 Configuration
  18. set_wm() {
  19. echo "export WINDOWMANAGER=\"$*\"" > /etc/profile.d/windowmanager
  20. }
  21. set_xdm() {
  22. echo "export XDM=\"$*\"" > /etc/conf/xdm
  23. }
  24. main() {
  25. while
  26. WINDOWMANAGER=
  27. if [ -f /etc/profile.d/windowmanager ]; then
  28. . /etc/profile.d/windowmanager
  29. fi
  30. XDM=
  31. if [ -f /etc/conf/xdm ]; then
  32. . /etc/conf/xdm
  33. fi
  34. cmd="gui_menu x 'X11 Configuration Menu'
  35. 'Run X -configure (automated config)'
  36. 'gui_cmd Xorg Xorg -configure ; mv -v /root/xorg.conf.new /etc/X11/xorg.conf'"
  37. cmd="$cmd '' ''"
  38. for x in /usr/share/rock-registry/xdm/* ; do
  39. if [ -f $x ] ; then
  40. . $x
  41. if [ "$XDM" = "$exec" ]; then
  42. pre='[*]' ; else
  43. pre='[ ]' ; fi
  44. cmd="$cmd
  45. '$pre Use $name in runlevel 5'
  46. 'set_xdm $exec'"
  47. fi
  48. done
  49. cmd="$cmd '' ''"
  50. for x in /usr/share/rock-registry/wm/* ; do
  51. if [ -f $x ] ; then
  52. . $x
  53. if [ "$WINDOWMANAGER" = "$exec" ]; then
  54. pre='[*]' ; else
  55. pre='[ ]' ; fi
  56. cmd="$cmd
  57. '$pre Use $name as default Windowmanager'
  58. 'set_wm $exec'"
  59. fi
  60. done
  61. cmd="$cmd '' ''"
  62. cmd="$cmd
  63. 'Edit/View /etc/X11/xorg.conf'
  64. 'gui_edit xorg.conf /etc/X11/xorg.conf'
  65. 'Edit/View /etc/profile.d/windowmanager'
  66. 'gui_edit WINDOWMANAGER /etc/profile.d/windowmanager'"
  67. eval $cmd
  68. do : ; done
  69. }