- When I run echo
$XDG_CURRENT_DESKTOP
or$XDG_SESSION_DESKTOP
I can see values on my Linux machine. - When I run same commands on my machine from remote machine showing empty results.
IMO, those variables are set only for its session. How to get which desktop environment is running on the remote machine?
I was developing an application that has a feature to check which desktop environment is running on Linux machine.
Tried (getting empty results):
bash -c "echo $XDG_CURRENT_DESKTOP"
source ~/.profile && echo $XDG_CURRENT_DESKTOP
`./find-DE.sh
user: root
uid: 0
XDG_CURRENT_DESKTOP:
GDMSESSION: `
– Zubaidullo Niimatullo uulu Dec 02 '17 at 14:42DESKTOP_SESSION:
Desktop:
– Zubaidullo Niimatullo uulu Dec 02 '17 at 14:55Session:
XDG...
vairables are set by the GUI session that the user runs underneath. When you access the "Remote Machine", you're not running a GUI on the "Remote Machine", so those variables should NOT be defined for your process. – waltinator Dec 05 '17 at 22:14