34 строки
1.2 KiB
Diff
34 строки
1.2 KiB
Diff
From 1742464ca9e86044309041070ad2597f6723901a Mon Sep 17 00:00:00 2001
|
|
From: Jakub Filak <jfilak@redhat.com>
|
|
Date: Mon, 24 Aug 2015 09:57:33 +0200
|
|
Subject: [PATCH] Switch to XDG_CURRENT_DESKTOP
|
|
|
|
The environment variable is not documented (or at least I cannot find any
|
|
official documentation), the environment variable is used by all major
|
|
Dekstop vendors though (just try to ask google to search for its name).
|
|
|
|
Related rhbz#1194976
|
|
|
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
---
|
|
src/pyfros/plugins/screencastgnome.py | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/pyfros/plugins/screencastgnome.py b/src/pyfros/plugins/screencastgnome.py
|
|
index 7bf5105..d752c31 100644
|
|
--- a/src/pyfros/plugins/screencastgnome.py
|
|
+++ b/src/pyfros/plugins/screencastgnome.py
|
|
@@ -149,7 +149,8 @@ class ScreencastGnome(ScreencastBase):
|
|
end_handler()
|
|
|
|
def IsSuitable(self):
|
|
- if "gnome" in os.getenv("DESKTOP_SESSION"):
|
|
+ if os.environ.get('XDG_CURRENT_DESKTOP') in \
|
|
+ ['GNOME', 'GNOME-Classic:GNOME', 'GNOME-Classic']:
|
|
return const.SUITABLE_PREFERED
|
|
else:
|
|
return const.SUITABLE_NOT_SUITABLE
|
|
--
|
|
2.5.0
|
|
|