Xdg-mime script not found?

Yesterday I used the “xdg-mime” script to register a MIME type and associate it with my application. I then used another script to link a chosen icon with the type. So everything worked as expected… Today, I attempt to do the same thing for another application of mine (PipeWrench) and I immediately run into problems attempting to register the new MIME type (via an “xdg-mime install…”). It errors with “Command ‘xdg-mime’ not found…” So, I try the same command using a fully-qualified path to the script and it errors with “No such file or directory” (if you can believe that). As you can see, I then ran a different invocation of the same “xdg-mime” script (to query a file’s MIME type) and that works fine regardless of whether I invoke the “xdg-mime” script fully-qualified or not. I’ve never seen anything like this before. Am I in the Twilight Zone? Ideas, anyone? xdg-mime screenshot

It turns out that one variant of the command was copied into the terminal and the other had been typed from scratch and the former included the invisible unicode character, #x200B at its beginning. Although I had suspected something like this and I edited the beginning characters (“xdg-mime”) of the recycled command in Tilix, this still left the invisible character at the beginning. I should’ve just re-typed the entire command. :slight_smile:

1 Like