XDG, Filezilla and more (II)

Thu, 12/19/2013 - 11:59 -- admin

After this, and then this, I revised my xdg file associator script, and I am putting the revised version here:

# rev 0.002
DESKTOP_FILE=$(basename $(locate "${1}".desktop))
if [ "${FILE_EXTENSION}" == "" ]
   MIME_TYPE=($(xdg-mime query filetype "${2}"))
   cd /usr/share/mime
   MIME_TYPE=($(find . -name *"${FILE_EXTENSION}"*))
for type in "${MIME_TYPE[@]}"
   xdg-mime default $DESKTOP_FILE $type
   # The following is just to verify the type is set correctly
   DE_FILE=$(xdg-mime query default $type)
   echo " * ${DE_FILE} set as viewer for MIME type ${type}"

XDG, Filezilla and more

Wed, 12/18/2013 - 19:40 -- admin


It's been long since I wrote for the last time because real life has kept me busy enough.

I'll just write today a simple note, so that if someone happens to stump on this same problem will have a tip on how to confront it, or just in case I have to come back to check my old notes as I do from time to time. My memory is not as good as it used to be :).

Today I've been doing some cleaning and updating a bit my laptop, something that I've been neglecting for quite some time. Between some other things that I might speak about some other day I have been dealing with some troubles that have been bothering me for a long time. Something about MIME types which has been giving me some headache.

Subscribe to RSS - xdg