Is there a way to have a pop-up or other window prompting to chose options upon insertion of a CD or DVD (like 'Play with VLC' or 'Rip CD with Asunder')?

1 Answer 1


If that feature were in place it would be coming from some panel applet or Pantheon Files. I cannot find an option for Pantheon Files to do that but I stumbled upon exactly what is asked here after installing the very light PCManFM File Manager.

sudo apt-get install pcmanfm

It has the option enabled by default

enter image description here

enter image description here

enter image description here

The last used application will appear first next time. In order to edit the list which appears there - namely to add an application that is not there already: edit ~/.config/mimeapps.list by adding under the section [Added Associations]:

for the "play cd" list:


for the "play dvd" list:


log-out and in.

The file manager needs to be open for that window to open automatically. To have PCManFM open but hidden (as deamon) at startup add this command to Settings - Applications - Startup:

pcmanfm -d

enter image description here

An alternative to pop-up windows upon insertion of removal media is to add to the dock some options to run your preferred commands on that.

For example, if you have VLC added to the dock as a launcher you can add some desktop actions to that launcher (supplementary options accessible as a list on right-click), like "Play DVD", "Play CD", etc.

An example on VLC:

sudo gedit /usr/share/applications/vlc.desktop  

Then, add to the end of that file:


[Desktop Action vlc-dvd]
Name=Play DVD
Exec=vlc dvd://

[Desktop Action vlc-cd]
Name=Play CD
Exec=vlc cdda://

[Desktop Action eject]
Name=Eject disk

The Icon= lines correspond to names of png file that I had put in ~/.local/share/icons.

enter image description here

More on desktop actions, here.

The command of playing cd is normally program_name cdda://. (If you prefer Deadbeef player, you will have to use deadbeef all.cda.) For playing dvds: program_name dvd:// (for example mpv dvd://). To rip a cd with this method, Asunder doesn't seem to take arguments, but Sound Juicer can automatically start ripping with sound-juicer -a.

Instead of desktop actions (lines added to existing desktop files) one can create and add to the dock new desktop launchers, for example, to start dvd in mpv player:

gedit ~/.local/share/applications/mpv-dvd.desktop

With this content:

[Desktop Entry]
Exec=mpv dvd://
Name=Play DVD in mpv Media Player

[Desktop Action Eject]
Name=Eject disk

Of course, these desktop launchers are then accessible from Applications launcher Super - Space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.