summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-06-28 15:27:32 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-06-28 15:27:32 +0200
commit2b9bd5cea0447075a53847b45bc7116a9ebfe899 (patch)
tree480dc4e3e759bdd6d66ed7a5bfed1e8162a3cc7f
parenteaaefb9705dbdefd611893cea03126281e55a4b7 (diff)
downloadlibrda-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.
-rw-r--r--src/rda.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/rda.c b/src/rda.c
index ce7b1af..4a1e662 100644
--- a/src/rda.c
+++ b/src/rda.c
@@ -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