input-wizard 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. #!/bin/sh
  2. #(c) Barry Kauler 2005/2006 www.puppylinux.com
  3. #2007 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
  4. #keyboard/mouse wizard for Puppy Linux
  5. #based on code from /usr/X11R7/bin/xwin
  6. #updated for 2.17
  7. #v411 rerwin: touchpad fix.
  8. #v411 rerwin: mouse detect fixes.
  9. #2009-03-03 ecube: "requires Xorg driver" added for Left-hand mouse
  10. #2009-05-23 ecube: kmap-1.1.14 keymaps used
  11. #v431 BK: usb and ps/2 mouse now has same devnode.
  12. #091122 BK: not using 'kbd' pkg keycodes anymore. only kmaps in /lib/keymaps.
  13. #100127 notice to restart X if change keyboard layout (see code in /usr/bin/xwin to sync x and console).
  14. #100215 moved sync code for console/xorg kbd layout from xwin.
  15. #100527 added jemimah's flsynclient touchpad config.
  16. #101112 disabled FONTMAP, see http://bkhome.org/blog/?viewDetailed=01956
  17. #110814 01micko: convert script from gtkdialog2 to gtkdialog3+.
  18. #120201 rodin.s: internationalized.
  19. #120627 use keymaps from kbd pkg if present.
  20. #130216 add button for "mouse sensitivity", run pupx.
  21. #131212 zigbert: gui (gtkdialog) improvements.
  22. #131230 zigbert: use quicksetup (via chooselayout) instead of internal keyboard layout setter
  23. export TEXTDOMAINDIR=/usr/share/locale
  24. export TEXTDOMAIN=input-wizard
  25. export OUTPUT_CHARSET=UTF-8
  26. . gettext.sh
  27. export MouseKeyboardWizard='
  28. <window title="'$(gettext 'Input Wizard')'" icon-name="gtk-preferences">
  29. <vbox space-expand="true" space-fill="true">
  30. '"`/usr/lib/gtkdialog/xml_info fixed mouse_keyboard.svg 60 " " "$(gettext "Configure your input devices")"`"'
  31. <hbox space-expand="true" space-fill="true">
  32. <frame '$(gettext 'Keyboard')'>
  33. <hbox>
  34. <button space-expand="false" space-fill="false">
  35. '"`/usr/lib/gtkdialog/xml_button-icon country_keyboard.svg big`"'
  36. <action type="exit">KEY1BUTTON</action>
  37. </button>
  38. <text space-expand="false" space-fill="false"><label>'$(gettext 'Layout for your country')'</label></text>
  39. <text space-expand="true" space-fill="true"><label>""</label></text>
  40. </hbox>
  41. <hbox>
  42. <button space-expand="false" space-fill="false">
  43. '"`/usr/lib/gtkdialog/xml_button-icon keyboard.svg big`"'
  44. <action type="exit">KEY3BUTTON</action>
  45. </button>
  46. <text space-expand="false" space-fill="false"><label>'$(gettext 'Keyboard interface')'</label></text>
  47. <text space-expand="true" space-fill="true"><label>""</label></text>
  48. </hbox>
  49. <hbox>
  50. <button space-expand="false" space-fill="false">
  51. '"`/usr/lib/gtkdialog/xml_button-icon keyboard_shortcut.svg big`"'
  52. <action type="exit">KEY4BUTTON</action>
  53. </button>
  54. <text space-expand="false" space-fill="false"><label>'$(gettext 'Advanced configuration')'</label></text>
  55. <text space-expand="true" space-fill="true"><label>""</label></text>
  56. </hbox>
  57. </frame>
  58. <frame '$(gettext 'Pointer')'>
  59. <hbox>
  60. <text><label>'$(gettext 'Type of mouse')'</label></text>
  61. <button>
  62. '"`/usr/lib/gtkdialog/xml_button-icon mouse.svg big`"'
  63. <action type="exit">MOUSE1BUTTON</action>
  64. </button>
  65. </hbox>
  66. <hbox>
  67. <text><label>'$(gettext 'Adjust mouse sensitivity')'</label></text>
  68. <button>
  69. '"`/usr/lib/gtkdialog/xml_button-icon mouse_sensitivity.svg big`"'
  70. <action type="exit">MOUSE2BUTTON</action>
  71. </button>
  72. </hbox>
  73. <hbox>
  74. <text><label>'$(gettext 'Touchpad')'</label></text>
  75. <button>
  76. '"`/usr/lib/gtkdialog/xml_button-icon touchpad.svg big`"'
  77. <action type="exit">TOUCHPAD1BUTTON</action>
  78. </button>
  79. </hbox>
  80. </frame>
  81. </hbox>
  82. <hbox space-expand="false" space-fill="false">
  83. <button>
  84. '"`/usr/lib/gtkdialog/xml_button-icon quit`"'
  85. <label>'$(gettext 'Quit')'</label>
  86. </button>
  87. </hbox>
  88. </vbox>
  89. </window>'
  90. CHECK1="false"
  91. #big while loop...
  92. while :; do
  93. unset MouseWizard
  94. unset KeyboardFeaturesWizard
  95. #put some code in here to ask keyboard layout, keyboard ps2/usb, mouse serial/ps2/usb setup?
  96. #also offer the old 2-letter layout...
  97. . /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
  98. eval `gtkdialog -p MouseKeyboardWizard | grep "EXIT"`
  99. case $EXIT in
  100. KEY1BUTTON)
  101. chooselayout
  102. ;;
  103. KEY4BUTTON)
  104. exec /usr/local/bin/xkbconfigmanager
  105. ;;
  106. KEY3BUTTON)
  107. KEYBRDTYPE="`cat /etc/keyboardtype`"
  108. CHECKKEY1="false"
  109. [ "$KEYBRDTYPE" = "usb" ] && CHECKKEY1="true"
  110. export KeyboardFeaturesWizard='
  111. <window title="'$(gettext 'Input Wizard')'" icon-name="gtk-preferences">
  112. <vbox space-expand="true" space-fill="true">
  113. '"`/usr/lib/gtkdialog/xml_info scale keyboard.svg 60 "$(gettext "Set interface for your keyboard")" "$(gettext "Changing this only takes effect after Puppy is rebooted!")"`"'
  114. <vbox space-expand="false" space-fill="false">
  115. <frame '$(gettext 'Interface')'>
  116. <text height-request="20"><label>""</label></text>
  117. <checkbox>
  118. <label>'$(gettext 'Keyboard has USB interface')'</label>
  119. <default>'$CHECKKEY1'</default>
  120. <variable>CHECKBOX002</variable>
  121. </checkbox>
  122. <text height-request="5"><label>""</label></text>
  123. </frame>
  124. </vbox>
  125. <hbox space-expand="false" space-fill="false">
  126. <button space-expand="false" space-fill="false">
  127. <label>'$(gettext "Cancel")'</label>
  128. '"`/usr/lib/gtkdialog/xml_button-icon cancel`"'
  129. <action>exit:CANCEL</action>
  130. </button>
  131. <button space-expand="false" space-fill="false">
  132. <label>'$(gettext "Ok")'</label>
  133. '"`/usr/lib/gtkdialog/xml_button-icon ok`"'
  134. <action>exit:OK</action>
  135. </button>
  136. </hbox>
  137. </vbox>
  138. </window>'
  139. . /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
  140. RETPARAMS=`gtkdialog -p KeyboardFeaturesWizard`
  141. echo "$RETPARAMS"
  142. if [ ! "`echo "$RETPARAMS" | grep "EXIT" | grep "OK"`" = "" ];then
  143. if [ "`echo "$RETPARAMS" | grep "CHECKBOX002" | grep "true"`" != "" ];then
  144. echo -n "usb" > /etc/keyboardtype
  145. modprobe usbhid 2> /dev/null #maybe then just need to restart X.
  146. else
  147. echo -n "ps/2" > /etc/keyboardtype
  148. fi
  149. fi
  150. ;;
  151. TOUCHPAD1BUTTON) #100527
  152. exec flsynclient
  153. ;;
  154. MOUSE2BUTTON) #130216
  155. exec pupx
  156. ;;
  157. MOUSE1BUTTON)
  158. MOUSEDEV="`cat /etc/mousedevice`"
  159. #RADIOBUTTONS="$RADIO2$RADIO1$RADIO3" #serial
  160. DEF1="false"
  161. DEF2="true"
  162. DEF3="false"
  163. if [ "$MOUSEDEV" = "psaux" ];then
  164. #RADIOBUTTONS="$RADIO1$RADIO2$RADIO3"
  165. DEF1="true"
  166. DEF2="false"
  167. DEF3="false"
  168. fi
  169. if [ "$MOUSEDEV" = "input/mice" ];then
  170. #RADIOBUTTONS="$RADIO3$RADIO2$RADIO1"
  171. DEF1="false"
  172. DEF2="false"
  173. DEF3="true"
  174. fi
  175. MOUSEBUTTONS="`cat /etc/mousebuttons`"
  176. CHECK1="false"
  177. if [ "$MOUSEBUTTONS" = "5" ];then
  178. CHECK1="true"
  179. fi
  180. #v1.0.7
  181. CHECKM="false"
  182. if [ ! "`cat /etc/xextraoptions | grep "\\-2button"`" = "" ];then
  183. CHECKM="true"
  184. fi
  185. #v2.01
  186. CHECKH="false"
  187. IDLETIME="0"
  188. if [ -f /etc/mousehide ];then
  189. IDLETIME="`cat /etc/mousehide | cut -f 1 -d ','`"
  190. [ ! "$IDLETIME" = "0" ] && CHECKH="true"
  191. fi
  192. #v2.14 modified by Raul Suarez (rarsa at yahoo.com)
  193. # if the button 1 is mapped to something different than 1 then I assume
  194. # it is a lefhanded mouse
  195. CHECKL="false"
  196. LEFT_H_MOUSE=` xmodmap -pp | grep -E " *[0-9] *[0-9]" | sed -e 's/ *\([0-9]*\) *\([0-9]*\)/\2/' | head -n 1`
  197. if [ ${LEFT_H_MOUSE} -ne 1 ] ; then
  198. CHECKL="true"
  199. fi
  200. #v4.11 Control "tapping" function on ALPS/Synaptics touchpads - manipulates MaxTapTime option in xorg.conf.
  201. TAPCHKBOX=""
  202. if [ -f /etc/X11/xorg.conf -a "`grep '"MaxTapTime"' /etc/X11/xorg.conf`" != "" ];then #touchpad present
  203. [ "`grep '"MaxTapTime"' /etc/X11/xorg.conf | grep '"0"'`" = "" ] && CHECKT="true" || CHECKT="false" #taps enabled/disabled
  204. TAPCHKBOX=" <checkbox>
  205. <label>$(gettext 'Enable touchpad tapping for mouse button clicks')</label>
  206. <variable>CHECKBOX013</variable>
  207. <default>$CHECKT</default>
  208. </checkbox>
  209. "
  210. fi #v4.11 end
  211. export MouseWizard='
  212. <window title="'$(gettext 'Mouse Wizard')'" icon-name="gtk-preferences">
  213. <vbox space-expand="true" space-fill="true">
  214. '"`/usr/lib/gtkdialog/xml_info fixed mouse.svg 60 "<b>$(gettext "Configure your mouse.")</b>" "$(gettext "If you got a touchpad, choose USB interface.")"`"'
  215. <hbox space-expand="true" space-fill="true">
  216. <hbox space-expand="false" space-fill="false">
  217. <vbox space-expand="true" space-fill="true">
  218. <frame '$(gettext 'Interface')'>
  219. <hbox space-expand="false" space-fill="false">
  220. <vbox space-expand="false" space-fill="false">
  221. <text height-request="1"><label>""</label></text>
  222. <radiobutton height-request="45">
  223. <label>'$(gettext 'USB')'</label>
  224. <variable>RADIO003</variable>
  225. <default>'$DEF3'</default>
  226. <action>if true disable:COMPORT</action>
  227. </radiobutton>
  228. <radiobutton height-request="45">
  229. <label>'$(gettext 'PS/2')'</label>
  230. <variable>RADIO001</variable>
  231. <default>'$DEF1'</default>
  232. <action>if true disable:COMPORT</action>
  233. </radiobutton>
  234. <radiobutton height-request="45">
  235. <label>'$(gettext 'Serial')'</label>
  236. <variable>RADIO002</variable>
  237. <default>'$DEF2'</default>
  238. <action>if true enable:COMPORT</action>
  239. </radiobutton>
  240. </vbox>
  241. <text space-expand="true" space-fill="true"><label>""</label></text>
  242. <vbox spacing="0" space-expand="false" space-fill="false">
  243. <pixmap><input file>/usr/share/pixmaps/puppy/plug_usb.svg</input><height>50</height></pixmap>
  244. <pixmap><input file>/usr/share/pixmaps/puppy/plug_ps2_mouse.svg</input><height>50</height></pixmap>
  245. <pixmap><input file>/usr/share/pixmaps/puppy/plug_serial.svg</input><height>50</height></pixmap>
  246. </vbox>
  247. <text width-request="5"><label>""</label></text>
  248. </hbox>
  249. <text height-request="5"><label>""</label></text>
  250. <hbox space-expand="false" space-fill="false">
  251. <text><label>'$(gettext 'Port')'</label></text>
  252. <combobox width-request="90">
  253. <item>ttyS0</item>
  254. <item>ttyS1</item>
  255. <item>ttyS2</item>
  256. <item>ttyS3</item>
  257. <variable>COMPORT</variable>
  258. <visible>disabled</visible>
  259. </combobox>
  260. </hbox>
  261. </frame>
  262. </vbox>
  263. </hbox>
  264. <vbox space-expand="true" space-fill="true">
  265. <frame '$(gettext 'Features')'>
  266. <text height-request="5"><label>""</label></text>
  267. <checkbox>
  268. <label>'$(gettext 'Mouse has a scroll wheel')'</label>
  269. <variable>CHECKBOX009</variable>
  270. <default>'$CHECK1'</default>
  271. </checkbox>
  272. <checkbox>
  273. <label>'$(gettext 'Middle button emulated on a 2-button mouse')'</label>
  274. <variable>CHECKBOX010</variable>
  275. <default>'$CHECKM'</default>
  276. </checkbox>
  277. <checkbox>
  278. <label>'$(gettext 'Auto-hide mouse cursor when not moving')'</label>
  279. <variable>CHECKBOX011</variable>
  280. <default>'$CHECKH'</default>
  281. </checkbox>
  282. <checkbox>
  283. <label>'$(gettext 'Left-handed mouse (requires Xorg driver)')'</label>
  284. <variable>CHECKBOX012</variable>
  285. <default>'$CHECKL'</default>
  286. </checkbox>
  287. '$TAPCHKBOX'
  288. <text height-request="5"><label>""</label></text>
  289. </frame>
  290. </vbox>
  291. </hbox>
  292. <hbox space-expand="false" space-fill="false">
  293. <button space-expand="false" space-fill="false">
  294. <label>'$(gettext "Cancel")'</label>
  295. '"`/usr/lib/gtkdialog/xml_button-icon cancel`"'
  296. <action>exit:CANCEL</action>
  297. </button>
  298. <button space-expand="false" space-fill="false">
  299. <label>'$(gettext "Ok")'</label>
  300. '"`/usr/lib/gtkdialog/xml_button-icon ok`"'
  301. <action>exit:OK</action>
  302. </button>
  303. </hbox>
  304. </vbox>
  305. </window>'
  306. . /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
  307. RETPARAMS=`gtkdialog -p MouseWizard`
  308. echo "$RETPARAMS"
  309. if [ ! "`echo "$RETPARAMS" | grep "EXIT" | grep "OK"`" = "" ];then
  310. if [ -e /lib/modules/2.6 ];then #v1.0.2 k2.6...
  311. modprobe -r psmouse 2> /dev/null #v1.0.2 k2.6
  312. modprobe -r sermouse 2> /dev/null #v1.0.2 k2.6
  313. else
  314. #modprobe -r usbmouse 2> /dev/null #v1.0.2
  315. modprobe -r mousedev #v2.0.0
  316. fi
  317. # if [ ! "`echo "$RETPARAMS" | grep "RADIO001" | grep "true"`" = "" ];then
  318. # MOUSEDEV="psaux" #ps/2 mouse.
  319. # ln -snf psaux /dev/mouse #v411
  320. # #k2.4 has ps/2 mouse support inbuilt.
  321. # if [ -e /lib/modules/2.6 ];then #v1.0.2 k2.6...
  322. # modprobe psmouse 2> /dev/null #v1.0.2 k2.6
  323. # fi
  324. # fi
  325. if [ ! "`echo "$RETPARAMS" | grep "RADIO002" | grep "true"`" = "" ];then
  326. eval `echo "$RETPARAMS" | grep "COMPORT"`
  327. MOUSEDEV="$COMPORT" #ttyS0,1,2,3
  328. ln -snf $COMPORT /dev/mouse #v411
  329. #2.4 kernel has serial mouse support inbuilt.
  330. if [ -e /lib/modules/2.6 ];then #v1.0.2 k2.6...
  331. modprobe 8250_pci
  332. modprobe sermouse
  333. fi
  334. fi
  335. if [ ! "`echo "$RETPARAMS" | grep -E "RADIO001|RADIO003" | grep "true"`" = "" ];then #use this for both usb and ps2 mouse
  336. MOUSEDEV="input/mice" #usb mouse
  337. if [ -e /lib/modules/2.6 ];then #v1.0.2 k2.6...
  338. modprobe usbhid 2> /dev/null
  339. else
  340. #modprobe usbmouse
  341. modprobe hid #v2.0.0
  342. modprobe mousedev #v2.0.0
  343. fi
  344. ln -snf input/mice /dev/mouse #v411
  345. fi
  346. echo -n "$MOUSEDEV" > /etc/mousedevice
  347. #v4.11 Touchpad tapping control - sets xorg.conf MaxTapTime to 0 to disable tapping and to default or user-specified xorg.conf value to enable.
  348. if [ "`echo "$RETPARAMS" | grep "CHECKBOX013"`" != "" ];then
  349. ZEROTAPTIME="`grep '"MaxTapTime"' /etc/X11/xorg.conf | grep '"0"'`"
  350. if [ "`echo "$RETPARAMS" | grep "CHECKBOX013" | grep "true"`" != "" ];then #enable tapping
  351. if [ "$ZEROTAPTIME" != "" ];then #currently disabled, else leave as is
  352. [ -f /root/.maxtaptime ] && MAXTAPTIME="`grep -m 1 '"MaxTapTime"' /root/.maxtaptime`" || MAXTAPTIME=' Option "MaxTapTime" "220"'
  353. SEDSCRIPT="s/$ZEROTAPTIME/$MAXTAPTIME/"
  354. sed -i -e "$SEDSCRIPT" /etc/X11/xorg.conf
  355. fi
  356. else #disable tapping
  357. if [ "$ZEROTAPTIME" = "" ];then #currently enabled, else leave as is
  358. MAXTAPTIME="`grep '"MaxTapTime"' /etc/X11/xorg.conf`"
  359. if [ "$MAXTAPTIME" != "" ];then
  360. echo "$MAXTAPTIME" > /root/.maxtaptime
  361. ZEROTAPTIME=' Option "MaxTapTime" "0"'
  362. SEDSCRIPT="s/$MAXTAPTIME/$ZEROTAPTIME/"
  363. sed -i -e "$SEDSCRIPT" /etc/X11/xorg.conf
  364. fi
  365. fi
  366. fi
  367. fi
  368. #v4.11 end
  369. #v2.14 modified by Raul Suarez (rarsa at yahoo.com)
  370. # sets right or lefhanded mouse and saves it for next boot.
  371. if [ ! "`echo "$RETPARAMS" | grep "CHECKBOX012" | grep "true"`" = "" ];then #v2.01
  372. XMODMAP_CMD="pointer = 3 2 1 4 5"
  373. else
  374. XMODMAP_CMD="pointer = 1 2 3 4 5"
  375. fi
  376. xmodmap -e "${XMODMAP_CMD}"
  377. grep -v "^pointer" /root/.Xmodmap > /tmp/Xmodmap.tmp
  378. cp /tmp/Xmodmap.tmp /root/.Xmodmap
  379. echo "${XMODMAP_CMD}" >> /root/.Xmodmap
  380. #
  381. if [ ! "`echo "$RETPARAMS" | grep "CHECKBOX011" | grep "true"`" = "" ];then #v2.01
  382. [ "$IDLETIME" = "0" ] && IDLETIME="3"
  383. echo -n "${IDLETIME}," > /etc/mousehide
  384. [ "`pidof unclutter`" = "" ] && unclutter -idle $IDLETIME &
  385. else
  386. echo -n '0,' > /etc/mousehide
  387. [ ! "`pidof unclutter`" = "" ] && killall unclutter
  388. fi
  389. #v1.0.7 emulate middle button
  390. #v2.02 Dougal has suggested changes for 3-button emulation...
  391. MBUTOUT="`cat /etc/xextraoptions | sed -e 's/ \-[23]button//g'`"
  392. if [ ! "`echo "$RETPARAMS" | grep "CHECKBOX010" | grep "true"`" = "" ];then
  393. #'-2button' tells Xvesa that want 3rd-button emulation...
  394. echo -n "$MBUTOUT -2button" > /etc/xextraoptions
  395. echo -n "2" > /etc/mousebuttons
  396. if [ -f /etc/X11/xorg.conf ];then
  397. #\W\+ means one or more whitespace chars...
  398. cat /etc/X11/xorg.conf | tr -s '#' | sed -e 's/#Option\W\+"Emulate3Buttons"/Option "Emulate3Buttons"/g' > /tmp/xorg.conf.tmp2
  399. sync
  400. cat /tmp/xorg.conf.tmp2 | tr -s '#' | sed -e 's/#Option\W\+"Emulate3Timeout"/Option "Emulate3Timeout"/g' > /tmp/xorg.conf.tmp
  401. fi
  402. else
  403. echo -n "$MBUTOUT" > /etc/xextraoptions
  404. echo -n "3" > /etc/mousebuttons
  405. if [ -f /etc/X11/xorg.conf ];then
  406. cat /etc/X11/xorg.conf | sed -e 's/Option\W\+"Emulate3Buttons"/#Option "Emulate3Buttons"/g' | tr -s '#' > /tmp/xorg.conf.tmp2
  407. sync
  408. cat /tmp/xorg.conf.tmp2 | sed -e 's/Option\W\+"Emulate3Timeout"/#Option "Emulate3Timeout"/g' | tr -s '#' > /tmp/xorg.conf.tmp
  409. fi
  410. fi
  411. sync
  412. if [ -f /tmp/xorg.conf.tmp ];then
  413. cp -f /tmp/xorg.conf.tmp /etc/X11/xorg.conf
  414. fi
  415. if [ ! "`echo "$RETPARAMS" | grep "CHECKBOX009" | grep "true"`" = "" ];then
  416. echo -n "5" > /etc/mousebuttons #enable scrollwheel.
  417. if [ -f /etc/X11/xorg.conf ];then
  418. cat /etc/X11/xorg.conf | tr -s '#' | sed -e 's/#Option\W\+"ZAxisMapping"\W\+"4 5"/Option "ZAxisMapping" "4 5"/g' > /tmp/xorg.conf.tmp
  419. fi
  420. else
  421. # echo -n "3" > /etc/mousebuttons ...v1.0.7 moved up.
  422. if [ -f /etc/X11/xorg.conf ];then
  423. cat /etc/X11/xorg.conf | sed -e 's/Option\W\+"ZAxisMapping"\W\+"4 5"/#Option "ZAxisMapping" "4 5"/g' | tr -s '#' > /tmp/xorg.conf.tmp
  424. fi
  425. fi
  426. if [ -f /etc/X11/xorg.conf ];then
  427. cp -f /tmp/xorg.conf.tmp /etc/X11/xorg.conf
  428. fi
  429. sync
  430. #v411 Moved xorg.conf protocol update to xwin, where it also supports changes by rc.sysinit.
  431. fi
  432. ;;
  433. *)
  434. break
  435. ;;
  436. esac
  437. done #end while loop.
  438. unset MouseKeyboardWizard
  439. unset MouseWizard
  440. unset KeyboardFeaturesWizard
  441. ###END###