xserverwizard 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/bin/sh
  2. #Barry Kauler 2005 www.puppylinux.com
  3. #2007 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
  4. #w019 apr2009: updated for woof.
  5. #100215 fixes.
  6. #110807 changed to gtkdialog3.
  7. #111019 screen out Xdialog.
  8. #120203 BK: internationalized.
  9. #131228 zigbert: gui (gtkdialog) improvements.
  10. export TEXTDOMAIN=xserverwizard
  11. export OUTPUT_CHARSET=UTF-8
  12. VIDEOINFO="`cat /proc/pci | grep "VGA" | cut -f 2-4 -d ':'`"
  13. WHATXS="`ls -1 /usr/bin/X?* | grep -v 'Xdialog' | sed -e 's/\/usr\/bin\///g' | tr "\n" " "`"
  14. CURRENTX="`readlink /usr/bin/X`"
  15. XVESATXT=""
  16. if [ -e /usr/bin/Xvesa ];then
  17. XVESATXT='
  18. <hbox border-width="2" space-expand="true" space-fill="true">
  19. <text xalign="0" use-markup="true" space-expand="true" space-fill="true"><label>"'$(gettext '<b>Xvesa Kdrive server</b>. This has been in most live-CDs, and works on the widest range of video hardware. The single biggest disadvantage is that the screen refresh frequency cannot be changed (which does not matter for LCD monitors, it is only a problem for CRT monitors where low frequency causes noticeable flicker).')'"</label></text>
  20. <vbox space-expand="false" space-fill="false">
  21. <button space-expand="false" space-fill="false">
  22. '"`/usr/lib/gtkdialog/xml_button-icon graphics_lowres.svg big`"'
  23. <action>video-wizard & </action>
  24. <action type="exit">exited xserver wizard</action>
  25. </button>
  26. </vbox>
  27. </hbox>'
  28. fi
  29. export XserverWizard='
  30. <window title="'$(gettext 'Puppy X server chooser Wizard')'" icon-name="gtk-preferences">
  31. <vbox space-expand="true" space-fill="true">
  32. '"`/usr/lib/gtkdialog/xml_info fixed "graphics.svg" 60 "$(gettext 'Installed graphical server(s):') <b>${WHATXS}</b>" "$(gettext 'Running graphical server is:') <b>${CURRENTX}</b>"`"'
  33. <frame '$(gettext 'Graphical server Wizards')'>
  34. <vbox space-expand="false" space-fill="false">
  35. '${XVESATXT}'
  36. <hbox border-width="2" space-expand="true" space-fill="true">
  37. <text xalign="0" use-markup="true" space-expand="true" space-fill="true"><label>"'$(gettext '<b>Xorg X server</b>. This is the big fella, large, sophisticated, accelerated rendering, Xinerama, supports many input devices.')'"</label></text>
  38. <vbox space-expand="false" space-fill="false">
  39. <button space-expand="false" space-fill="false">
  40. '"`/usr/lib/gtkdialog/xml_button-icon graphics.svg big`"'
  41. <action>xorgwizard &</action>
  42. <action type="exit">exited xserver wizard</action>
  43. </button>
  44. </vbox>
  45. </hbox>
  46. </vbox>
  47. </frame>
  48. </vbox>
  49. </window>'
  50. #If only xorg is installed, go straight to xorgwizard
  51. if [ ! "${XVESATXT}" ]; then
  52. xorgwizard &
  53. else
  54. . /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
  55. gtkdialog -p XserverWizard
  56. fi
  57. ###END###