diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-06-28 15:27:32 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-06-28 15:27:32 +0200 |
commit | 2b9bd5cea0447075a53847b45bc7116a9ebfe899 (patch) | |
tree | 480dc4e3e759bdd6d66ed7a5bfed1e8162a3cc7f /src | |
parent | eaaefb9705dbdefd611893cea03126281e55a4b7 (diff) | |
download | librda-2b9bd5cea0447075a53847b45bc7116a9ebfe899.tar.gz librda-2b9bd5cea0447075a53847b45bc7116a9ebfe899.tar.bz2 librda-2b9bd5cea0447075a53847b45bc7116a9ebfe899.zip |
src/rda.c: Report a desktop session as local, if XDG_SEAT env var is set in the session. Good enough for a start, I guess.
Diffstat (limited to 'src')
-rw-r--r-- | src/rda.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -40,10 +40,16 @@ rda_init (void) gboolean rda_session_is_local(void) { - /* - * FIXME: how can we detect that a desktop session is running locally? - */ - return (!rda_session_is_remote()); + if (remote_technology == REMOTE_TECHNOLOGY_NONE) + return TRUE; + + if (g_getenv("XDG_SEAT")) + { + remote_technology = REMOTE_TECHNOLOGY_NONE; + return TRUE; + } + + return FALSE; } gboolean |