I'm logged into an Ubuntu 14.04 server remotely with ssh. I'm trying to find out which Desktop Environment is running. When I do the following, nothing happens:

admin@server:~$ echo $DESKTOP_SESSION
admin@server:~$ echo $XDG_CURRENT_SESSION

I know for a fact that there is a desktop running on the server. I saw it this morning, but now I'm 5 miles away.

marked as duplicate by TheWanderer, Rinzwind, Eric Carvalho, edwinksl, Zanna Sep 8 '16 at 17:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I believe that is what you want. – TheWanderer Aug 18 '16 at 23:35
  • To be clear, the question of the dupe target ostensibly mentions "window manager" but there are many answers there that actually check for desktop environments. – edwinksl Aug 18 '16 at 23:45
  • "I know for a fact that there is a desktop running on the server" <<< How do you know that? Maybe it's just a wm with various embellishments giving the impression that there's a desktop environment. – DK Bose Aug 19 '16 at 1:51
  • - why would there be a desktop on a server? – Rinzwind Aug 19 '16 at 8:40
  • ls /usr/bin/*session would be what I would use. see askubuntu.com/questions/125062/… – Rinzwind Aug 19 '16 at 8:43