1

I would like to know if it's possible to disable notification using XBMC (mails, network etc). I'm using Kubuntu 14.04.1.

I've found this command but the script doesn't work, the sound is re-enabled by XBMC:

#! /bin/bash

qdbus org.kde.kmix /Mixers/PulseAudio__Playback_Streams_3/restore_sink_input_by_media_role_event volume 0
xbmc
qdbus org.kde.kmix /Mixers/PulseAudio__Playback_Streams_3/restore_sink_input_by_media_role_event volume 100

I presice that the command line with qdbus is working independently in the terminal. Thanks

0

1 Answer 1

0

Ok, I've found a solution!

1) Running a script.sh while the notification is comming (possible with KDE, menuK->configuration->notifications)

2) The script .sh is:

#! /bin/bash

exec >/home/guillaume/ver-XBMC.log 2>&1
python /home/guillaume/ver-XBMC.py

3) The python script:

#!/usr/bin/env python
# coding: utf8

import psutil
import subprocess

app = [psutil.Process(i).name for i in psutil.get_pid_list()]
if "xbmc" in app:
    print "XBMC is running"
    cmd = "qdbus org.kde.kmix /Mixers/PulseAudio__Playback_Streams_3/restore_sink_input_by_media_role_event volume 0"
    subprocess.call(cmd, shell=True)

4) A log is created in the Home folder.

That's all folks!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .