Can't change video preferred application from VLC

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
msknight

Can't change video preferred application from VLC

Post by msknight »

Mint 20.3. Kernel 5.4.0-110 generic - Cinnamon 5.2.7

Preferred applications for video stays on VLC even after changing it to celluloid. It seems to take it, but after closing and reopening preferred applications, VLC is back as the default.

Also, I can't change the default application to celluloid on an AVI. Right click on the avi file, go into the properties and into "Open With" and select celluloid but "set as default" doesn't change Celluloid to the default.

Removing VLC sets the defaults to Celluloid, but on reinstalling VLC I'm back at the same position again.

Can't find a setting in VLC that tells it to enforce itself as preferred application, so I'm stumped as to how to get around this.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
LittleScriptMan
Level 3
Level 3
Posts: 158
Joined: Thu Jan 13, 2022 8:42 am

Re: Can't change video preferred application from VLC

Post by LittleScriptMan »

msknight wrote: Sun Jun 26, 2022 5:22 pm Mint 20.3. Kernel 5.4.0-110 generic - Cinnamon 5.2.7
Also, I can't change the default application to celluloid on an AVI. Right click on the avi file, go into the properties and into "Open With" and select celluloid but "set as default" doesn't change Celluloid to the default.
What you want is not clear, at least for me. Do you want all video files to open in Celluloid or just .avi files and leave VLC as default for the other mimetypes ?

PS : Do you use VLC from Debian packages or Flatpak ?
Interests : Firefox, Cinnamon & Bash Scripts
LM Version : LMDE5 (LMDE4 just in case)
msknight

Re: Can't change video preferred application from VLC

Post by msknight »

I want all video files to open in Celluloid.

These two options to try and make it happen, however, are not working.

The "system wide" option of Preferred Applications allows me to change to Celluloid, but when I close it and reopen it, it's back to VLC.

As a work around, I go to each type of file, go into the properties and change the "Open With" and this works for all except avi files. When I select Celluloid and then "Set Default" ... it doesn't. VLC stays as the default. I might as well have not pressed the button.

I am using VLC from packages.

I still need to use VLC for streaming feeds, so it's got to the point where I'm having to install VLC, do what I need to do, and then uninstall it again.
LittleScriptMan
Level 3
Level 3
Posts: 158
Joined: Thu Jan 13, 2022 8:42 am

Re: Can't change video preferred application from VLC

Post by LittleScriptMan »

msknight wrote: Mon Jun 27, 2022 9:13 am As a work around, I go to each type of file, go into the properties and change the "Open With" and this works for all except avi files. When I select Celluloid and then "Set Default" ... it doesn't. VLC stays as the default. I might as well have not pressed the button.
This behavior sounds like a bug in the mimetype management.
If you look into your ~/.config/mimeapps.list file (the file that overwrites the system default apps with the user's preferences), 3 different mime-types may be pointing to avi files : video/avi, video/x-avi and video/x-msvideo (maybe more, I've just these 3).
Checking what happens when doing what you did (change properties with Open With), I noticed it modifies the video/x-avi default app. However the one that commands avi files is the first one : video/avi.

To correct that bug with Terminal :

Code: Select all

gio mime video/avi
returns the default app for video/avi (VLC) and the recommended ones.

In the list of those recommended ones you should find Celluloid. On my system, it bears a long name io.github.celluloid_player.Celluloid.desktop. I'd guess you'll have the same one, else adapt the following command.

Code: Select all

gio mime video/avi io.github.celluloid_player.Celluloid.desktop
This will set Celluloid as the default player for avi files and display a confirmation of that.

You could also edit and modify the mimeapps.list in Xreader (it's just a text file). I wouldn't recommend it because a syntax error would have left video/avi unassociated. gio mime would return an error message without making any change if the app is not valid.
Interests : Firefox, Cinnamon & Bash Scripts
LM Version : LMDE5 (LMDE4 just in case)
msknight

Re: Can't change video preferred application from VLC

Post by msknight »

Thank you for your help on this.

I did the gio command for avi but vlc persisted as the default app for video in the "preferred applications".

I had to edit the mimeapps.list file and do a search/replace of all the vlc references for celluloid, (there were a considerable number) and that appears to have unstuck the "preferred applications" issue. Celluloid is now listed as the default for video and persists after closing and reopening.

What caused this behaviour I don't know, but just for interest I changed the default application for video back to vlc and closed preferred applications, and then reopened it to see if it had reverted to celluloid... it hadn't... so I changed it back to celluloid and closed/reopened it... but it had reverted back to vlc again.

The only thing I can think of, is that celluloid is not registered among some types to begin with, especially avi which is at the top of the list for video; which seems a little odd as celluloid can play the avi files I've tested.

I'm just going to have to change the mimeapps.list file manually, and never alter the video type in preferred applications again.

Code: Select all

michelle@main-desktop:~/.config$ cat mimeapps.list | grep vlc
video/avi=vlc.desktop
video/x-ms-asf-plugin=vlc.desktop
video/x-ogm=vlc.desktop
video/3gp=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/3gpp=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/3gpp2=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/divx=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/dv=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/fli=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/flv=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/mp4v-es=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/mpeg-system=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/ogg=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/vnd.divx=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/vnd.mpegurl=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/vnd.rn-realvideo=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-anim=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-flc=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-fli=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-m4v=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-mpeg-system=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-mpeg2=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-asf=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-asx=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-wm=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-wmv=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-wmx=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-wvx=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-nsv=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-theora=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-theora+ogg=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/vivo=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-flic=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-mng=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-afs=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-wvxvideo=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ogm+ogg=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/mp2t=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/mp4=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/mpeg=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/msvideo=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/quicktime=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/webm=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-avi=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-flv=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-matroska=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-mpeg=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/avi=io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
video/x-ms-asf-plugin=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/x-ogm=vlc.desktop;
LittleScriptMan
Level 3
Level 3
Posts: 158
Joined: Thu Jan 13, 2022 8:42 am

Re: Can't change video preferred application from VLC

Post by LittleScriptMan »

msknight wrote: Tue Jun 28, 2022 12:27 am I did the gio command for avi but vlc persisted as the default app for video in the "preferred applications".
Yes, but wrongly. The commands I submitted had to be executed in Terminal not pasted in mimeapps.list.

The lines in mimeapps.list should be like :

Code: Select all

video/3gpp=io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
and not :

Code: Select all

video/3gpp=gio mime video/avi io.github.celluloid_player.Celluloid.desktop;vlc.desktop;
Interests : Firefox, Cinnamon & Bash Scripts
LM Version : LMDE5 (LMDE4 just in case)
Locked

Return to “Cinnamon”