How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
masterus
Sophomore Member
Posts: 241
Joined: Sun Mar 12, 2006 10:21 am
Location: EU

How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

#1 Post by masterus » Fri Jan 23, 2009 9:48 am

hi,

would like to know if there is a chance to edit some file (if yes then waht file) which let me know
to edit VolumeUp/VolumeDown buttons :?:
mean would like to change sound increasing/decreasing for 5%
would be very gratefull for all answers.

rgds,
Image T43-2668-CTO , T43p-2668-G7G
ex: A31-2652-D5G with 1GB Ram

GomJabbar
Moderator
Moderator
Posts: 9765
Joined: Tue Jun 07, 2005 6:57 am

Re: How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

#2 Post by GomJabbar » Fri Jan 23, 2009 10:37 am

AFAIK, the hardware buttons work on any OS for the T42. I would have thought the T43 would be the same. I don't think some of the newer ThinkPads volume buttons will necessarily work out-of-the-box though.

I see there is something about the headphone or line jack needing to be muted to hear sound with Alsa.

http://alsa.opensrc.org/FAQ004
DKB

Ryushin
Posts: 27
Joined: Thu Jun 12, 2008 8:31 am
Location: Castle Rock, Colorado

Re: How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

#3 Post by Ryushin » Mon Feb 02, 2009 8:31 am

The newer thinkpad volume control buttons are software based. I had to write a hack to use xbindkeys to make everything work. Note, I run Debian and Enlightenment 17 for my window manager, but things should mostly be the same with Ubuntu.

Install xbindkeys.

I added these entries to ~/.xbindkeysrc:
# Thinkpad Volume Up
"aumix -v +5;~/bin/show_volume_osd.bash"
m:0x0 + c:176

# Thinkpad Volume Down
"aumix -v -5;~/bin/show_volume_osd.bash"
m:0x0 + c:174

This first part of it, aumix -v +5/-5 actually changes the volume. I added the OSD so you can see it change. I think the latest gnome shows it as well without having to use OSD.

My show volume looks like this:
#!/bin/bash

VOLUME=$(aumix -q | grep vol | awk {'print $3'})
osd_cat -A center -T VOLUME -b percentage -d 1 -c green -P $VOLUME -p bottom -o 50 -f -*-lucidatypewriter-*
-*-*-*-*-240-*-*-*-200-*-*

That last line is actually all one line.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 0 guests