Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

Author Topic: fixing xdg-open's mime defaults with a bash script  (Read 1830 times)

Offline kanliot

  • Jr. Member
  • **
  • Posts: 88
  • Karma: 0
fixing xdg-open's mime defaults with a bash script
« on: May 03, 2019, 06:57:47 am »
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'
Code: [Select]
# 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

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

« Last Edit: May 03, 2019, 07:02:12 am by kanliot »