Removable Media settings / Preferred Applications in XFCE

With Aravasian's help I am now running XFCE in Zorin OS16 Core. I was looking for a more lightweight DE to help my 2009 iMac run things a little faster.

In Gnome DE I had managed to get DVD's and CD's to autostart in VLC by selecting VLC as the Default App for Music and Video discs. Gnome uses Nautilus as the File Manager.

In XFCE with Thunar, there are no options to select the default apps for music and video in Preferred applications. I tried to use Nautilus but it still does not show the option to set the Default Music or Video Player. I tried to set this up in Removable Media/Media tab but struggled to know which commands to run. Eventually I found some old ones from a 2014 thread on the internet and they work but only if I have Thunar file manager open at the same time. If there is no File Manager window open the discs do not Mount.
image
I know you can set a particular type of file to open with a particular application but I have been unable to find a way to do it with a DVD or CD apart from opening the File Manager first., which sort of defeats the aim of being able to pop a CD or DVD in and it just auto starts.
This is not a huge deal but I just wondered if anyone else had encountered the same issue and found a solution.

2 Likes

This is just a guess and I probably would be wrong, but won't making changes to the defaults.list files change the default application?

Thanks for the reply and it may well do. How would I find that list and alter it? Sorry, probably very basic I know but I am a bit new to Linux.

There are four of them. Two of them are empty. And other two contain some text I barely understand. If you wish to get their location, type locate defaults.lists in terminal. I have not tried editing those files, so do it at your own risk. I really couldn't understand it's contents, but if you are able to understand it, they can do it if you wish to.

This is where I got this idea from. In my laptop, the defaults.list does not exist in the location that is given in the website:

1 Like

Thanks again for sharing but, like you, I think this is beyond me at the moment. Don't want to mess things up.

1 Like

Got it finally!!! I have been working on this like an hour for just two commands. But it is worth it. :grin:

Here is how I changed my default app to open mp4 files in xfce. First I went to terminal to find out what the default mime type was for mp4 files. To do so, I used the command xdg-mime query default video/mp4 and got the output as org.gnome.Totem.desktop.(this is the mime type of the default video application that comes with zorin) Now, I wanted to change the org.gnome.Totem.desktop to the mime of vlc. To do so I needed to find out what the mime of vlc was. To do so I had to go to gnome to set my default video application as vlc. Then I entered the command xdg-mime query default video/mp4 and got the output as vlc.desktop. So now I know what the mime of vlc is, I just need to set this mime to be the default of mp4 files. For that I used the command xdg-mime default vlc.desktop video/mp4. Now, vlc.desktop should have be set aas the default mime of mp4 files. If you want yo make sure that vlc is set as default, you can run the xdg-mime query default video/mp4 again.

Long story short, use the command xdg-mime default x.desktop y and you should replace 'x' with the mime and 'y' with the file-type/file-format. You will most probably find the values for 'y' in the internet. :wink:

Have a good day. :smiley:

2 Likes

Brilliant thanks for all your hard work.

1 Like

You are welcome. : )

Jeslin, you are on a roll. I really liked this one.

I'm also using vlc and watching those different movies for instance mkv, webm or avi, every time I had to make em work with the right application ( being vlc). I tried your suggestion and it just worked perfect.

2 Likes

Maybe jeslin could write a [HOW TO] Tutorial in the Tutorials forum.

2 Likes

I say YES, but it's up to Jeslin of course.

2 Likes

Okay then, I'll start working on it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.