Advertising

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

Offline kanliot

  • Jr. Member
  • **
  • Posts: 77
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
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!
« Last Edit: May 03, 2019, 07:02:12 am by kanliot »