alsawizard 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #!/bin/sh
  2. #Lesser GPL licence v2 (/usr/share/doc/legal/lgpl-2.1.txt). 2007 www.puppylinux.com
  3. #120201 internationalized.
  4. #120226 01micko: test screensize and set SCROLLABLE variable.
  5. #120706 change gtkdialog3 to gtkdialog4.
  6. #120724 alsaconf does not work on arm boards. refer 3builddistro.
  7. #131210 zigbert: gui (gtkdialog) improvements.
  8. export TEXTDOMAIN=alsawizard
  9. export OUTPUT_CHARSET=UTF-8
  10. . /etc/rc.d/BOOTCONSTRAINED #120724
  11. export ASKDIALOG='
  12. <window title="'$(gettext 'Sound Wizard')'" icon-name="gtk-preferences">
  13. <vbox>
  14. <frame '$(gettext 'Sound wizard')'>
  15. '"`/usr/lib/gtkdialog/xml_info 0 sound_config.svg 60 "$(gettext "Presumably you are here because sound does not work? If so, here are steps to follow, to hopefully fix sound")..."`"'
  16. <hbox border-width="7" space-expand="true" space-fill="true">
  17. <vbox space-expand="false" space-fill="false">
  18. <pixmap>
  19. <input file>/usr/share/pixmaps/puppy/nr_1.svg</input>
  20. <height>40</height>
  21. </pixmap>
  22. </vbox>
  23. <text space-expand="false" space-fill="false"><label>""</label></text>
  24. <text xalign="0" use-markup="true" space-expand="true" space-fill="true"><label>"'$(gettext '<b>Adjust levels</b>
  25. Often non-working sound is just a matter of unmuting (tick a checkbox) and/or bring up a level in the audio mixer. Click this button to run the mixer.')'"</label></text>
  26. <vbox space-expand="false" space-fill="false">
  27. <button>
  28. '"`/usr/lib/gtkdialog/xml_button-icon sound_mixer.svg big`"'
  29. <action>/usr/local/bin/defaultaudiomixer & </action>
  30. </button>
  31. </vbox>
  32. </hbox>
  33. <hseparator></hseparator>
  34. <hbox border-width="7" space-expand="true" space-fill="true">
  35. <vbox space-expand="false" space-fill="false">
  36. <pixmap>
  37. <input file>/usr/share/pixmaps/puppy/nr_2.svg</input>
  38. <height>40</height>
  39. </pixmap>
  40. </vbox>
  41. <text space-expand="false" space-fill="false"><label>""</label></text>
  42. <text xalign="0" use-markup="true" space-expand="true" space-fill="true"><label>"'$(gettext '<b>Play test sound</b>
  43. Having adjusted the levels, click this button to play a test sound.')'"</label></text>
  44. <vbox space-expand="false" space-fill="false">
  45. <button>
  46. '"`/usr/lib/gtkdialog/xml_button-icon speaker_3.svg big`"'
  47. <action>/usr/bin/aplay /usr/share/audio/2barks.au & </action>
  48. </button>
  49. </vbox>
  50. </hbox>
  51. <hbox border-width="7" space-expand="true" space-fill="true">
  52. <text width-request="40" space-expand="false" space-fill="false"><label>""</label></text>
  53. <text space-expand="false" space-fill="false"><label>""</label></text>
  54. <text xalign="0" use-markup="true" space-expand="true" space-fill="true"><label>"'$(gettext 'On some hardware (very rare fortunately) sound plays but does not always stop! If your Puppy will not stop barking, click this button.')'"</label></text>
  55. <vbox space-expand="false" space-fill="false">
  56. <button>
  57. '"`/usr/lib/gtkdialog/xml_button-icon speaker_0.svg big`"'
  58. <action>/usr/bin/killall aplay</action>
  59. </button>
  60. </vbox>
  61. </hbox>
  62. <hseparator></hseparator>
  63. <hbox border-width="7" space-expand="true" space-fill="true">
  64. <vbox space-expand="false" space-fill="false">
  65. <pixmap>
  66. <input file>/usr/share/pixmaps/puppy/nr_3.svg</input>
  67. <height>40</height>
  68. </pixmap>
  69. </vbox>
  70. <text space-expand="false" space-fill="false"><label>""</label></text>
  71. <text xalign="0" use-markup="true" space-expand="true" space-fill="true"><label>"'$(gettext "<b>Multiple cards</b>
  72. Linux may have detected more than one audio interface or 'card', and has set the wrong one as default. Run Kirk's Multiple Sound Card Wizard to investigate this (note, a reboot is required for change to take effect).")'"</label></text>
  73. <vbox space-expand="false" space-fill="false">
  74. <button>
  75. '"`/usr/lib/gtkdialog/xml_button-icon sound_config.svg big`"'
  76. <action>/usr/bin/Multiple-Sound-Card-Wizard & </action>
  77. </button>
  78. </vbox>
  79. </hbox>
  80. </frame>
  81. <hbox space-expand="false" space-fill="false">
  82. <button>
  83. '"`/usr/lib/gtkdialog/xml_button-icon quit`"'
  84. <label>'$(gettext 'Quit')'</label>
  85. <action type="exit">EXIT</action>
  86. </button>
  87. </hbox>
  88. </vbox>
  89. </window>'
  90. . /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
  91. RETVAL="`gtkdialog -p ASKDIALOG 2>/dev/null`"
  92. eval "$RETVAL"
  93. [ "$EXIT" != "RUNALSA" ] && exit
  94. #/usr/sbin/alsaconf #101015
  95. rxvt -geometry 60x3 -bg orange -e /usr/sbin/alsaconf
  96. #depmod