home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / sbin / xserverwizard < prev    next >
Encoding:
Text File  |  2005-12-03  |  5.4 KB  |  140 lines

  1. #!/bin/sh
  2. #Barry Kauler 2005 www.puppylinux.com
  3.  
  4.  
  5. VIDEOINFO="`cat /proc/pci | grep "VGA" | cut -f 2-4 -d ':'`"
  6. WHATXS="`ls -1 /usr/X11R6/bin/X?* | sed -e 's/\/usr\/X11R6\/bin\///g' | tr "\n" " "`"
  7. CURRENTX="`readlink /usr/X11R6/bin/X`"
  8.  
  9.  
  10. MAINDIALOG="
  11.  <wtitle>Puppy X server chooser Wizard</wtitle>
  12.   <hbox>
  13.   <vbox>
  14.    <text><label>\"
  15. These X servers are currently installed:
  16. $WHATXS
  17.  
  18. The currently running X server is:
  19. $CURRENTX\"</label></text>
  20.   </vbox>
  21.  
  22.   <vbox>
  23.    <frame X server Wizards>
  24.     <hbox>
  25.      <text><label>Xvesa Kdrive server. This has been in all live-CDs, and works on the widest range of video hardware. The single biggest disadvantage is that the screen refresh frequency cannot be changed. Click button to run the Xvesa video Wizard:</label></text>
  26.      <button>
  27.       <input file>/usr/local/lib/X11/pixmaps/x.xpm</input>
  28.       <action>video-wizard</action>
  29.      </button>
  30.     </hbox>
  31.  
  32.     <hbox>
  33.      <text><label>Xorg X server. This is the big fella, large, sophisticated, accelerated rendering, Xinerama, supports many input devices. Click button to run the Xorg Video Wizard:</label></text>
  34.      <button>
  35.       <input file>/usr/local/lib/X11/pixmaps/x.xpm</input>
  36.       <action>xorgwizard</action>
  37.      </button>
  38.     </hbox>
  39.  
  40.  
  41.    </frame>
  42.   </vbox>
  43.   </hbox>
  44. "
  45.  
  46. echo "$MAINDIALOG" | gtkdialog2 --stdin
  47.  
  48. exit
  49. ###early stuff below####
  50.  
  51. MSGXFBDEV="Click button for info how to install Xfbdev server."
  52. if [ -f /usr/X11R6/bin/Xfbdev ];then
  53.  ACTIONXFBDEV="framebufferwizard"
  54. else
  55.  echo "The Xfbdev Kdrive X server is available as a PupGet package.
  56. You need to install two packages, \"xfbdev\" and \"modules_fb\".
  57. (some live-CD builds may have modules_fb already installed, in which
  58.  case PupGet manager will not offer it as an installation choice)
  59. Go to the menu: Start -> Setup -> PupGet package manager
  60. and install them, then immediately reboot Puppy." > /tmp/servermsg.txt
  61.  ACTIONXFBDEV="xmessage -center -title xfbdev -file /tmp/servermsg.txt"
  62. fi
  63.  
  64. CURRENTX="`readlink /usr/X11R6/bin/X`"
  65. case $CURRENTX in
  66.  Xfbdev)
  67.   MSGXFBDEV="Click button to run the Framebuffer Wizard:"
  68.   ACTIONXFBDEV="framebufferwizard"
  69.   ;;
  70.  *)
  71.   ;;
  72. esac
  73.  
  74.  
  75. MAINDIALOG="
  76.  <wtitle>Puppy X server chooser Wizard</wtitle>
  77.   <hbox>
  78.   <vbox>
  79.    <text><label>\"Your PC has this video hardware:
  80. $VIDEOINFO\"</label></text>
  81.  
  82.    <text><label>Puppy has a variety of X servers to choose from. The live-CD has the Xvesa Kdrive server and/or the Xorg, and custom builds may also have the Xfbdev or Xi810 Kdrive servers. The Kdrive servers are a simplified and smaller server. If one of these is not in the live-CD, it can be downloaded and installed as a PupGet package.</label></text>
  83.    <text><label>There are also full X servers to choose from, both as PupGet or DotPup packages. To install many of these, it is wise to read about them on the Wiki or Forum first.</label></text>
  84.    <text><label>The buttons on the right tell you more about some of the servers, with instructions to install where appropriate. Note that the current running server is $CURRENTX</label></text>
  85.    <text><label>---o0o---</label></text>
  86.    <text><label>WORK IN PROGRESS: We are currently developing the /usr/sbin/framebufferwizard script. When installed, the framebuffer modules are at /lib/modules/`uname -r`/video, but they are not fully supported by the script. You are welcome to work on the script. Some framebuffer docs are at /usr/share/doc/framebuffer (when modules_fb is installed)</label></text>
  87.  
  88.   </vbox>
  89.  
  90.   <vbox>
  91.    <frame X server Wizards>
  92.     <hbox>
  93.      <text><label>Xvesa Kdrive server. This has been in all live-CDs, and works on the widest range of video hardware. The single biggest disadvantage is that the screen refresh frequency cannot be changed. Click button to run the Xvesa video Wizard:</label></text>
  94.      <button>
  95.       <input file>/usr/local/lib/X11/pixmaps/x.xpm</input>
  96.       <action>video-wizard</action>
  97.      </button>
  98.     </hbox>
  99.  
  100.     <hbox>
  101.      <text><label>The Xfbdev Kdrive server uses kernel framebuffer modules. Performance may be inferior to Xvesa but some of the modules allow adjustment of refresh frequency. $MSGXFBDEV</label></text>
  102.      <button>
  103.       <input file>/usr/local/lib/X11/pixmaps/x.xpm</input>
  104.       <action>$ACTIONXFBDEV</action>
  105.      </button>
  106.     </hbox>
  107.  
  108.     <hbox>
  109.      <text><label>There is a compact full X server for older video hardware, pre year 2000, named XF86_SVGA (XFree version 3.3.6). Note, it may work on recent video hardware that is backwards-compatible. Click the button for further information:</label></text>
  110.      <button>
  111.       <input file>/usr/local/lib/X11/pixmaps/x.xpm</input>
  112.       <action>exec xf86svga336wizard</action>
  113.      </button>
  114.     </hbox>
  115.  
  116.     <hbox>
  117.      <text><label>Xorg full X servers are available as DotPup packages. These are large, which is why one of them is not in the live-CD. However, you can certainly install one. Click the button for further information on the Puppy Forum:</label></text>
  118.      <button>
  119.       <input file>/usr/local/lib/X11/pixmaps/x.xpm</input>
  120.       <action>defaultbrowser http://www.murga.org/%7Epuppy/viewtopic.php?t=672</action>
  121.      </button>
  122.     </hbox>
  123.  
  124.    </frame>
  125.   </vbox>
  126.   </hbox>
  127. "
  128.  
  129. #  <hbox>
  130. #   <text><label>The currently running server is $CURRENTX. Click to change:</label></text>
  131. #   <button>
  132. #    <label>Change X</label>
  133. #    <action>xmessage -center -title Change_X -buttons $XBUTTONS -file /tmp/changex.txt</action>
  134. #   </button>
  135. #  </hbox>
  136.  
  137. echo "$MAINDIALOG" | gtkdialog2 --stdin
  138.  
  139.  
  140.