Fix for #921
in mx linux, when started with non-systemd init, loginctl returns null string to stdout (and an error message to stderr). this patch will use XDG_SESSION_TYPE and XDG_SESSION_ID environment variables if the loginctl code fails to determine these.