command to change default application to open file

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
afora
Level 1
Level 1
Posts: 48
Joined: Mon Aug 26, 2019 7:35 pm

command to change default application to open file

Post by afora » 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!

User avatar
Flemur
Level 17
Level 17
Posts: 7203
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: command to change default application to open file

Post by Flemur » Sat Oct 12, 2019 7:41 pm

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!
I bet one of these commands might do it!

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
You might also look at adding/modifying some text to/in:

Code: Select all

~/.config/mimeapps.list
...like cat a file of new defaults onto the end...but I'll bet right now that that's too easy. (The file is divided up into segments)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 19.1 Xfce/fluxbox
Manjaro openbox/fluxbox

Post Reply

Return to “Newbie Questions”