How to remove VLC from the sound menu /
How to prevent VLC from reappearing in the sound menu.
Removing VLC from the sound menu
- Install dconf editor
- Open dconf-editor, and browse to:
- In the list of soundmenu (
interested-media-players) items, remove the application(s) you do not need / want to appear in the menu. Close the dconf-editor.
- Done, VLC disappeared from the menu.
Command line method
To read the current menu items:
gsettings get com.canonical.indicator.sound interested-media-players
gives an output like:
To remove VLC, remove
vlc.desktop from the list and set the changed menu by the command:
gsettings set com.canonical.indicator.sound interested-media-players "['rhythmbox.desktop']"
Preventing VLC from returning in the sound menu (14.04)
The solution removes VLC from the sound menu, but if you start VLC, it will appear again in the sound menu. The script below does not prevent that, but immediately and automatically removes it once VLC is closed.
To use it:
Copy the script below, paste it in an empty textfile and save it as
vlc, make it executable. Then copy the
vlc.desktop file from
~/.local/share/applications and replace the (first) line starting with
Exec=/path/to/script/vlc. Log out and back in. The desktopfile will be redirected to the script, the script will start VLC and wait for it to stop and remove VLC from the soundmenu immediately.
curruser = getpass.getuser()
# read the current launcher contents
get_menuitems = subprocess.Popen([
"gsettings", "get", "com.canonical.indicator.sound", "interested-media-players"
# preparing subprocess command string
current_list = str(current_list).replace(", ", ",")
"gsettings", "set", "com.canonical.indicator.sound", "interested-media-players",
current_list = read_currentmenu()
for item in current_list:
if item == "vlc.desktop":
This method / script can also be used for other applications in the sound menu. Two lines in the last section of the script need to be altered then, according to the other application:
if item == "vlc.desktop": (change to desktop file of the application)
subprocess.call(["/usr/bin/vlc"]) (change the command to run the application)