Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

fixing xdg-open's mime defaults with a bash script

Started by kanliot, May 03, 2019, 06:57:47 AM

Previous topic - Next topic

kanliot

I recently noticed that installing 'handbrake'  reset some of the mime-types away from my video player.

So I wrote a bash script to take a list of files and show default mime application in three columns
and another bash script to output bash code to change them all back to say: 'mpv.desktop'

# pass a list of files to show what xdg-mime thinks about the mime type of the files
show_mime_from_files () {

# pass a list of files, then enter a new desktop file when script asks for it.
# should output some shellcode to help you change default application for mime types
output_mime_code () {

these are functions you can run in bash after you download from
https://github.com/kanliot/bash-scripts/blob/master/show%2Coutput_mime.sh

arch wiki says to edit  ~/.config/mimeapps.list
but my way seems to work fine.

Cheers!

View the most recent posts on the forum