Novell Home

Auto Adjust Volume on X Session Login

Novell Cool Solutions: Tip
By Alwin Kumar Rathinam

Digg This - Slashdot This

Posted: 25 Oct 2005
 

PROBLEM: Some Linux sound drivers reset the sound volume back to zero, so you have to reset the volume everytime you startup. This sometimes happens with via chipsets and als4000 using ALSA sound system.

If your ALSA sound driver resets the volume to zero everytime you shutdown, then here is a simple solution.


SOLUTION: Copy and paste the following script in a text editor (Kate, for example). Save it as soundstart in your home folder /home/username/.kde/Autostart

script:

#! /bin/sh
# sound volume reset script
# copy this script to /home/username/.kde/Autostart
amixer sset 'PCM' 90%
amixer sset 'Master' 90%

Note:If you can't access the folder /.kde/ then turn on the function to view hidden files using Konqueror under the menu >[Show Hidden Files].

At a terminal, make the script executable:

[1808][smorris@linux:~]$ chmod +x /home/username/.kde/Autostart/soundstart
[1808][smorris@linux:~]$ 

Remember to switch out "username" in this command to your username.

When you log into KDE, your sound should be set to the proper volume.

Note: If you want to implement this for the Gnome desktop, you can use the startup session, as outlined in this article.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell