Author Topic: Forcing volume on start up  (Read 239 times)

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2237
Forcing volume on start up
« on: July 10, 2011, 02:15:26 PM »
Way, way back (June 2010), Hairyplotter (here: http://www.pclinuxos.com/forum/index.php/topic,58592.0.html) gave us a script to limit the volume on start up.

Code: [Select]
#!/bin/bash

# Is the current volume level greater than 30
if [ `aumix -q | grep vol | cut -d' ' -f3` -gt 30 ]; then
# YES, so lower the volume to 30
  aumix -v 30
fi


It worked well and I used it to prevent embarrassment in the library, but that was KDE 3.something.   ;D

I just tried it in KDE 4.6.5, and, as I feared, it mucked things up.  I suspect we're using a different sound system now.  Anyway, response was extremely slow, no programs would run, had no volume icon in the tray, couldn't shut the system down, etc.  >:(

So, I had to log in as root and delete the script, and then everything was fine again.

Point being, I still need something like this - any of you hardware/script gurus got any suggestions?  Doesn't need to be fancy, could be as simple as just forcing the volume to some value, before the start-up sounds play.

Retired Senior Chief, Retired Software Engineer, Active GrandPa