I know how to change it via GUI - the interface is pretty familiar to Windows.
However, I searched and struggled to find to do this programmatically as a script command. Can anyone suggest a way? I'm trying to associate Mirage with all image filetypes.
Many thanks!
[SOLVED] command to change default application to open file
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] command to change default application to open file
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: command to change default application to open file
I bet one of these commands might do it!afora wrote: ⤴Sat Oct 12, 2019 5:39 pm I know how to change it via GUI - the interface is pretty familiar to Windows.
However, I searched and struggled to find to do this programmatically as a script command. Can anyone suggest a way? I'm trying to associate Mirage with all image filetypes.
Many thanks!
Code: Select all
gvfs-mime
mimeopen
mimetype
update-mime
update-mime-database (edit: pretty sure not this one)
xdg-mime
xfce4-mime-settings (xfce4 only?)
xdg-mime
Code: Select all
~/.config/mimeapps.list
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: command to change default application to open file
I'm new to Linux, and I'm not quite sure how to use any of those...
Can you suggest a complete command which will take care of this?
Tu!
Can you suggest a complete command which will take care of this?
Tu!
Re: command to change default application to open file
Open the file ~/.config/mimeapps.list with the text editor.
Search for image - you'll find bmp, gif, jpeg, png and tiff e.g., image/gif=xviewer.desktop
Change xviewer to mirage
Search for image - you'll find bmp, gif, jpeg, png and tiff e.g., image/gif=xviewer.desktop
Change xviewer to mirage
Re: command to change default application to open file
That's fantastic, thank you for your help.
Just curious - as this is only for images - is it possible to change associated application with other file types? Say, mp3s? Or text files? Or an arbitrary file type?
Just curious - as this is only for images - is it possible to change associated application with other file types? Say, mp3s? Or text files? Or an arbitrary file type?
Re: command to change default application to open file
You can try the lines that start with audio and video or add one for mp3 since there isn't one there.
Not sure about the others
You know there is a preferred applications dialog
-
- Level 1
- Posts: 32
- Joined: Thu Jan 29, 2015 8:36 am
Re: [SOLVED] command to change default application to open file
Just installed easytag. Now .opus files open in EasyTag not VLC (as I usually have it).
mimeapps.list is unchanged and still points to VLC.
Found that the easy way to correct this is to right-click the file in Nemo, select: Open With - Other Application, select the application (VLC in this case), then "Set as default".
Now works correcty. So mimeapps.list can't be the only place where this info is stored.
[Double Solved]!!
mimeapps.list is unchanged and still points to VLC.
Found that the easy way to correct this is to right-click the file in Nemo, select: Open With - Other Application, select the application (VLC in this case), then "Set as default".
Now works correcty. So mimeapps.list can't be the only place where this info is stored.
[Double Solved]!!
Re: [SOLVED] command to change default application to open file
I believe that manual file association as you are describing would be automatically reflected in `mimeapps.list`. You may either need to restart your system or run a update command on this first to see it.