2010-05-13 3 views

답변

5

이 우분투 10.04에서 GNOME 2.30에서 작동하는 것 같다 :

40 %로 볼륨을 설정합니다
$ dbus-send --session --dest=org.ayatana.indicator.sound /org/ayatana/indicator/sound/service org.ayatana.indicator.sound.SetSinkVolume uint32:40 

. 볼륨을 원하는 백분율로 40을 대체하십시오.

반대로, 현재 볼륨이 무엇인지 볼 수 있습니다 :

$ dbus-send --session --print-reply --dest=org.ayatana.indicator.sound /org/ayatana/indicator/sound/service org.ayatana.indicator.sound.GetSinkVolume 
method return sender=:1.54 -> dest=:1.2228 reply_serial=2 
    double 39.9994 

가 (예, 당신이 UINT32로 볼륨을 설정할 수 있지만 이중으로 그것을 얻을 나도 그것을 얻을하지 않습니다.).

이 우분투 프로젝트 인 것 같아서,이게 다른 배포판과 얼마나 호환성이 있는지 모르겠습니다.

+0

그냥 내가 찾고 있었던 것 같은데. 고마워. 이 방법이 다른 배포판에서도 작동하는지 확인해 보겠습니다. – cdecker

1

당신은 또한 사용할 수 있습니다

xdotool key XF86AudioRaiseVolume 
xdotool key XF86AudioLowerVolume 
xdotool key XF86AudioMute