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.

89 lines
2.0 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 XcfgT2 (the T2 LiveCD auto configuration)'
  36. 'gui_cmd XcfgT2 xcfgt2'
  37. 'Run X -configure (automated config)'
  38. 'gui_cmd Xorg Xorg -configure ; mv -v /root/xorg.conf.new /etc/X11/xorg.conf'"
  39. cmd="$cmd '' ''"
  40. for x in /usr/share/rock-registry/xdm/* ; do
  41. if [ -f $x ] ; then
  42. . $x
  43. if [ "$XDM" = "$exec" ]; then
  44. pre='[*]' ; else
  45. pre='[ ]' ; fi
  46. cmd="$cmd
  47. '$pre Use $name in runlevel 5'
  48. 'set_xdm $exec'"
  49. fi
  50. done
  51. cmd="$cmd '' ''"
  52. for x in /usr/share/rock-registry/wm/* ; do
  53. if [ -f $x ] ; then
  54. . $x
  55. if [ "$WINDOWMANAGER" = "$exec" ]; then
  56. pre='[*]' ; else
  57. pre='[ ]' ; fi
  58. cmd="$cmd
  59. '$pre Use $name as default Windowmanager'
  60. 'set_wm $exec'"
  61. fi
  62. done
  63. cmd="$cmd '' ''"
  64. cmd="$cmd
  65. 'Edit/View /etc/X11/xorg.conf'
  66. 'gui_edit xorg.conf /etc/X11/xorg.conf'
  67. 'Edit/View /etc/profile.d/windowmanager'
  68. 'gui_edit WINDOWMANAGER /etc/profile.d/windowmanager'"
  69. eval $cmd
  70. do : ; done
  71. }