mirror of
https://github.com/slgobinath/SafeEyes.git
synced 2024-12-25 23:52:42 +01:00
Merge pull request #546 from antoninkriz/patch-1
Correctly detect GNOME in screensaver plugin and in utility.py
This commit is contained in:
commit
bbcae910ed
@ -64,7 +64,7 @@ def __lock_screen_command():
|
||||
return ['mate-screensaver-command', '--lock']
|
||||
elif desktop_session == 'kde' or 'plasma' in desktop_session or desktop_session.startswith('kubuntu') or os.environ.get('KDE_FULL_SESSION') == 'true':
|
||||
return ['qdbus', 'org.freedesktop.ScreenSaver', '/ScreenSaver', 'Lock']
|
||||
elif desktop_session in ['gnome', 'unity', 'budgie-desktop'] or desktop_session.startswith('ubuntu'):
|
||||
elif desktop_session in ['gnome', 'unity', 'budgie-desktop'] or desktop_session.startswith('ubuntu') or desktop_session.startswith('gnome'):
|
||||
if utility.command_exist('gnome-screensaver-command'):
|
||||
return ['gnome-screensaver-command', '--lock']
|
||||
# From Gnome 3.8 no gnome-screensaver-command
|
||||
|
@ -274,7 +274,7 @@ def desktop_environment():
|
||||
env = 'lxde'
|
||||
elif 'plasma' in desktop_session or desktop_session.startswith('kubuntu') or os.environ.get('KDE_FULL_SESSION') == 'true':
|
||||
env = 'kde'
|
||||
elif os.environ.get('GNOME_DESKTOP_SESSION_ID'):
|
||||
elif os.environ.get('GNOME_DESKTOP_SESSION_ID') or desktop_session.startswith('gnome'):
|
||||
env = 'gnome'
|
||||
elif desktop_session.startswith('ubuntu'):
|
||||
env = 'unity'
|
||||
|
Loading…
Reference in New Issue
Block a user