If I run the following command, the text file opens in my preferred editor (kate).
$ xdg-open /path/to/text/file
However, if I try the following, where
sparhawk is my username, I get several warnings, and the file opens in Chromium instead.
$ sudo -u sparhawk xdg-open /path/to/text/file Warning: unknown mime-type for "/path/to/text/file" -- using "application/octet-stream" Error: no "view" mailcap rules found for type "application/octet-stream" Opening "/path/to/text/file" with notepad (text/plain) wine: invalid directory "/home/sparhawk/.wine" in WINEPREFIX: not an absolute path Created new window in existing browser session.
What is the difference?