Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: control Audio Volume in Linux

by stefbv (Curate)
on Oct 11, 2013 at 08:14 UTC ( #1057848=note: print w/replies, xml ) Need Help??


in reply to control Audio Volume in Linux

If you use KDE4, DBus can be used like this:

#!/bin/env perl use strict; use warnings; use Net::DBus; #use Net::DBus::Dumper; my $bus = Net::DBus->session; my $mixer = eval { $bus->get_service('org.kde.kmix')->get_object('/Mixers/0/Master_0' +); }; if ( $@ ) { die "Error: $@.\n"; } #print dbus_dump($mixer); $mixer->toggleMute; #$mixer->decreaseVolume; #$mixer->increaseVolume;

I suppose it can be adapted for other desktops also.

Stefan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1057848]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2021-10-21 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (82 votes). Check out past polls.

    Notices?