Linux – xdg-mime returns “xprop: unable to open display ” “

command-line-interfacelinuxmime-type

I'm attempting to track down a problem with a particular CSS file being returned as text/html instead of text/css.

file -mime install.css returns some less useful info:

install.css: text/x-c; charset=us-ascii

So I was encouraged to use xdg-mime instead:

[box]# xdg-mime query filetype install.css
xprop:  unable to open display ''
usage:  xprop [-options ...] [[format [dformat]] atom] ...

What am I missing?

Best Answer

I was logged in over ssh. Logging in via noMachine and issuing the command on a terminal in that session worked. No idea why it fails over ssh.