1

The file manager PCManFM has an option (enabled by default) to ask what to do with inserted/mounted volumes (cd, dvds, iso files etc) which is lacking in elementry OS' file manager. That's why I m using PCManFM for this purpose.

enter image description here

When connecting an external HDD:

enter image description here

When inserting a DVD or mounting an iso-dvd:

enter image description here

When inserting a CD:

enter image description here

But can that list be edited somehow in order to add or remove items?


Update after answer:

/.local/share/applications/mimeapps.list contains this:

[Default Applications]
x-scheme-handler/apt=apturl.desktop
xdg-mime default org.pantheon.appcenter.desktop x-scheme-handler/apt

No [Added Associations] , nor x-content/audio-cdda.

Possibly an elementary-os-specific issue?

1 Answer 1

1

Look for mimeapps.list. It can be $HOME/.local/share/applications/mimeapps.list or, if not, look in $HOME/.config.

Edit the section [Added Associations].

To add an application in the pop-up list for inserted CD, add this line:

x-content/audio-cdda=name_of_application.desktop

To add an application in the pop-up list for inserted DVD, add this line:

x-content/video-dvd=name_of_application.desktop

To remove some of those comment the lines related to them (add # in front of the line)

Then do

update-mime-database .local/share/mime/ 

or log out and in.

(Mpv player can play dvds but for that you'll have to create a new 'desktop' file in $HOME/local/share/applications containing the line Exec=mpv dvd:// - more details here.)

6
  • 1
    Then we try a long shot. Added the Section [Added Associations] Below x-content/video-dvd=your Programm and x-content/audio-cdda=your Programm. After update-mime-database $HOME/.local/share/mime
    – user192526
    Dec 5, 2016 at 11:19
  • An example for Video-DVD. I have x-content/video-dvd=xine.desktop;totem.desktop;brasero-copy-medium.desktop I can open Video-DVDs, with these Programs. But my Standart_program is x-content/video-dvd=mpv-dvd.desktop This desktop file I create by my own. xdg-mime query default x-content/video-dvd mpv-dvd.desktop I clear with my answer my kontext-menu from clamtk, because it would open my compressed files by default. And it was almost bei all data in the Kontext-menu. I hoped it did help you too.
    – user192526
    Dec 5, 2016 at 14:49
  • I have found the problem with your answer not working for me: the location of mimeapps.list is not the same in all cases; the same may be true for the location of desktop files, and for the path in the command update-mime-database . By pure chance I have found on one of my systems the file ~/.config/mimeapps.list . Adding x-content/audio-cdda=deadbeef.desktop in there, Deadbeef appears in the pop-up list for cd.
    – user32012
    Dec 5, 2016 at 16:34
  • I have made edits to your answer to give the working solution in a general form applyable in all cases. - If accepted I'll make your answer the accepted one too.
    – user32012
    Dec 5, 2016 at 17:10
  • on the location of mimeapps.list file: wiki.archlinux.org/index.php/default_applications#XDG_standard
    – user32012
    Dec 5, 2016 at 17:13

You must log in to answer this question.