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 / xf86svga336wizard < prev    next >
Encoding:
Text File  |  2005-11-28  |  6.7 KB  |  165 lines

  1. #!/bin/sh
  2. #Barry Kauler 2005 www.puppylinux.com
  3.  
  4. VIDEOINFO="`cat /proc/pci | grep "VGA" | cut -f 2-4 -d ':'`"
  5.  
  6. BUTTONS="QUIT:10"
  7. MSGCHANGE="NOTICE: The XF86_SVGA server is currently not installed."
  8. CURRENTX="`readlink /usr/X11R6/bin/X`"
  9. if [ "$CURRENTX" = "XF86_SVGA" ];then
  10.  MSGCHANGE="NOTICE: The XF86_SVGA server is currently running. To change to the Xvesa
  11.         X server, click \"Change_to_Xvesa\" button.
  12.         To run the xf86config setup program for XF86_SVGA, click the
  13.         \"Run_xf86config\" button.
  14.         Both of these will require X to restart, so please close all other
  15.         applications.
  16.         There is also a GUI application called \"xvidtune\", for finetuning
  17.         the display. Click \"Run_xvidtune\". Use with caution."
  18.  BUTTONS="Run_xf86config:11,Run_xvidtune:14,Change_to_Xvesa:12,View_docs:15,QUIT:10"
  19. else
  20.  if [ -f /usr/X11R6/bin/XF86_SVGA ];then
  21.   MSGCHANGE="NOTICE: The XF86_SVGA server is installed but currently not running.
  22.         If you want to change to this server, click the \"Change_to_XF86_SVGA\"
  23.         button.
  24.         This will require X to restart, so please close all other applications."
  25.   BUTTONS="Change_to_XF86_SVGA:13,View_docs:15,QUIT:10"
  26.  fi
  27. fi
  28.  
  29.  
  30. SVGA336="      NV1, STG2000, RIVA 128, RIVA TNT, RIVA TNT2, RIVA ULTRA TNT2,
  31.       RIVA VANTA, RIVA ULTRA VANTA, RIVA INTEGRATED, GeForce 256,
  32.       GeForce DDR, Quadro, GeForce2 GTS, GeForce2 GTS (rev1),
  33.       GeForce2 Ultra, Quadro 2 Pro, GeForce2 MX, GeForce2 MX DDR,
  34.       Quadro 2 MXR, ET4000, ET4000W32, ET4000W32i, ET4000W32i_rev_b,
  35.       ET4000W32i_rev_c, ET4000W32p, ET4000W32p_rev_a, ET4000W32p_rev_b,
  36.       ET4000W32p_rev_c, ET4000W32p_rev_d, ET6000, ET6100, et3000, pvga1,
  37.       wd90c00, wd90c10, wd90c30, wd90c24, wd90c31, wd90c33, gvga, r128, ati,
  38.       sis86c201, sis86c202, sis86c205, sis86c215, sis86c225, sis5597,
  39.       sis5598, sis6326, sis530, sis620, sis300, sis630, sis540, tvga8200lx,
  40.       tvga8800cs, tvga8900b, tvga8900c, tvga8900cl, tvga8900d, tvga9000,
  41.       tvga9000i, tvga9100b, tvga9200cxr, tgui9400cxi, tgui9420, tgui9420dgi,
  42.       tgui9430dgi, tgui9440agi, cyber9320, tgui9660, tgui9680, tgui9682,
  43.       tgui9685, cyber9382, cyber9385, cyber9388, cyber9397, cyber9520,
  44.       cyber9525, 3dimage975, 3dimage985, cyber9397dvd, blade3d, cyberblade,
  45.       clgd5420, clgd5422, clgd5424, clgd5426, clgd5428, clgd5429, clgd5430,
  46.       clgd5434, clgd5436, clgd5446, clgd5480, clgd5462, clgd5464, clgd5465,
  47.       clgd6205, clgd6215, clgd6225, clgd6235, clgd7541, clgd7542, clgd7543,
  48.       clgd7548, clgd7555, clgd7556, ncr77c22, ncr77c22e, cpq_avga, mga2064w,
  49.       mga1064sg, mga2164w, mga2164w AGP, mgag200, mgag100, mgag400, oti067,
  50.       oti077, oti087, oti037c, al2101, ali2228, ali2301, ali2302, ali2308,
  51.       ali2401, cl6410, cl6412, cl6420, cl6440, video7, ark1000vl, ark1000pv,
  52.       ark2000pv, ark2000mt, mx, realtek, s3_savage, s3_virge, AP6422, AT24,
  53.       AT3D, s3_svga, NM2070, NM2090, NM2093, NM2097, NM2160, NM2200,
  54.       ct65520, ct65525, ct65530, ct65535, ct65540, ct65545, ct65546,
  55.       ct65548, ct65550, ct65554, ct65555, ct68554, ct69000, ct64200,
  56.       ct64300, mediagx, V1000, V2100, V2200, p9100, spc8110, i740, i740_pci,
  57.       Voodoo Banshee, Voodoo3, smi, generic"
  58.  
  59.  
  60. echo "$MSGCHANGE
  61.  
  62. Your PC has this video hardware:
  63. $VIDEOINFO
  64. However, Puppy cannot determine the chip model number. If you can determine
  65. that your video chip is in this list then you will be able to use the
  66. XF86_SVGA X server:
  67.  
  68. $SVGA336
  69.  
  70. However, this server may also work on recent video hardware that has
  71. backwards-compatibility. For example, I got a VIA EPIA motherboard to
  72. work, see this Forum thread: 
  73. http://www.murga.org/%7Epuppy/viewtopic.php?t=1378
  74.  
  75. XF86_SVGA is a PupGet package, named \"xf86_svga-3.3.6\", that you can
  76. download using the PupGet package manager, then reboot Puppy.
  77.  
  78. After rebooting, X may fail to start, dumping you back to the commandline.
  79. In that case, do this:
  80.  
  81. Run the program \"xf86config\" from the commandline, and it takes you through
  82. step by step, to create a new XF86Config file -- except at the final step it
  83. wants to save to /etc/XF86Config -- just accept this and Puppy will move the
  84. file to /etc/X11/ (where it is supposed to be).
  85.  
  86. NOTICE: Puppy 1.0.7 will prompt you to run xf86config if dropped back to the
  87.         commandline, and gives some advice, similar to what is written here.
  88.  
  89. When it asks about which video hardware you have, you have the option of
  90. bringing up a list and you choose what you think will work -- in my example
  91. of the VIA EPIA board, the \"Trident CyberBlade (generic)\" works.
  92. When it asks what video modes you want to support for each color-depth, get
  93. rid of the \"640x480\", as the X server will default to that.
  94.  
  95. One thing that is very confusing is that there is no way to specify the default
  96. color depth -- it is 8 bits, 256 colors. The docs state that an entry 
  97. \"DefaultDepth 16\" can be used in XF86Config, however this particular X server
  98. does not recognise that keyword and X will not start.
  99. Solution, /usr/X11R6/bin/xwin, has inserted \"-bpp 16\" into this line:
  100.   /usr/X11R6/bin/xinit /root/.xinitrc -- -bpp 16 > /tmp/xerrs.txt 2>&1
  101. Change that to \"24\" if you need greater color depth.
  102.  
  103. WHAT TO DO IF XF86_SVGA WILL NOT WORK!
  104. You can drop back to the Xvesa Kdrive X server by typing this:
  105. # ln -sf Xvesa /usr/X11R6/bin/X
  106. # xwin
  107.  
  108. Note also that the PupGet package has \"xvidetune\", and docs are in
  109. /usr/share/xf86_svga.txt, xf86config.htm, xvidtune.htm and Xserver.htm."  > /tmp/svga336msg.txt
  110.  
  111.  
  112. while [ 1 ];do
  113. xmessage -center -title "XF86_SVGA video Wizard" -buttons "$BUTTONS" -file /tmp/svga336msg.txt
  114.  
  115. RETVAL=$?
  116. if [ $RETVAL -lt 11 ];then
  117.  exit
  118. fi
  119.  
  120. if [ $RETVAL -eq 11 ];then #run xf86config
  121.  rxvt -bg yellow -e /usr/X11R6/bin/xf86config
  122.  sync
  123.  exec restartwm #no w.m. param, defaults to current.
  124. fi
  125. if [ $RETVAL -eq 12 ];then #change to Xvesa
  126.  ln -sf Xvesa /usr/X11R6/bin/X
  127.  sync
  128.  exec restartwm
  129. fi
  130. if [ $RETVAL -eq 13 ];then #change to XF86_SVGA
  131.  ln -s XF86_SVGA /usr/X11R6/bin/X
  132.  xmessage -center -bg orange "X is now going to die. At the commandline, type \"xf86config\""
  133.  sync
  134.  exec killall X
  135. fi
  136. if [ $RETVAL -eq 14 ];then #run xvidtune
  137.  xvidtune > /tmp/xvidtunedump.txt 2>&1
  138.  xmessage -center -bg green -title "Output from xvidtune" -file /tmp/xvidtunedump.txt
  139.  exit
  140. fi
  141. if [ $RETVAL -eq 15 ];then #view docs
  142.  xmessage -center -bg "#ffc0c0" -title "View XG86_SVGA docs" -buttons "xf86_svga:11,xf86config:12,xvidtune:13,Xserver:14,QUIT:10" "Choose which docs to view..."
  143.  case $? in
  144.  11)
  145.   defaulthandler file:///usr/share/doc/xf86_svga.txt &
  146.   ;;
  147.  12)
  148.   defaultbrowser file:///usr/share/doc/xf86config.htm &
  149.   ;;
  150.  13)
  151.   defaultbrowser file:///usr/share/doc/xvidtune.htm &
  152.   ;;
  153.  14)
  154.   defaultbrowser file:///usr/share/doc/Xserver.htm &
  155.   ;;
  156.  *)
  157.   echo "continue loop"
  158.   ;;
  159.  esac
  160. fi
  161.  
  162. done
  163.  
  164. ###END###
  165.