Monday, November 10, 2014

Remove items from sound indicator in Unity panel (troubleshooting) ::: Ubuntu 14.04

As You know, when some audio/video app is open, relevant item appears in sound indicator in Unity panel. Item(s) stays there forever. For me, it can be annoying. There is a way to remove it from sound indicator, but sometimes it is impossible to do it successfully. Why, I don't know.














Here I'm going to show You how to remove items from sound indicator in Unity panel. Regular way is to use dconf-editor. Simply, open the app and navigate to
com/canonical/indicator/sound.





















When You start i.e. Rhythmbox music player, it appears in interested-media-players line. You need to reset this to default value, so sound indicator will be cleaned after system reboot. Further, if You want to prevent Rhythmbox from showing in sound indicator, simply put 'rhythmbox' value in blacklisted-media-players line above (first line).

What to do if this does not work? 


From some reason, this does not work for me. So I need to manually reset intersted-media-players parameter every time when logged in Ubuntu. I found another way to do this. I wrote a script for this task and put it in Startup Applications, so it runs automatically every time I logged in Ubuntu.

#! /bin/sh
#
# Reset interested-media-players parameter in
# dconf-editor

set -e

gsettings reset com.canonical.indicator.sound \
interested-media-players

exit 0

I called it reset_interested_media_players.sh. You can call it whatever You want. You need to make it executable.

sudo chmod +x SCRIPT

And You need to put it in Startup Applications, so it runs every time You log in Your system.
















In Command space, enter the following:

sh -e /script/location/SCRIPT.sh

Change script location and SCRIPT.sh with appropriate values. That's it... It's not a big thing, but it does the job.

No comments:

Post a Comment