|
|
|
@ -334,17 +334,17 @@ class Desktop:
|
|
|
|
|
where='cl_desktop_online_user',eq=urLogin,limit=1)
|
|
|
|
|
session = self.clVars.Get('cl_desktop_xsession')
|
|
|
|
|
if session == 'xfce':
|
|
|
|
|
logoutCommand = "org.xfce.SessionManager " \
|
|
|
|
|
logoutCommand = "/usr/bin/qdbus org.xfce.SessionManager " \
|
|
|
|
|
"/org/xfce/SessionManager Logout False False"
|
|
|
|
|
elif session == 'kde':
|
|
|
|
|
logoutCommand = "org.kde.ksmserver /KSMServer logout 0 0 0"
|
|
|
|
|
logoutCommand = "/usr/bin/kquitapp ksmserver"
|
|
|
|
|
elif session == 'gnome':
|
|
|
|
|
logoutCommand = "org.gnome.SessionManager " \
|
|
|
|
|
logoutCommand = "/usr/bin/qdbus org.gnome.SessionManager " \
|
|
|
|
|
"/org/gnome/SessionManager Logout 1"
|
|
|
|
|
else:
|
|
|
|
|
raise DesktopError(_("Unable detect X session"))
|
|
|
|
|
if process("su",urLogin,"-c",
|
|
|
|
|
("DISPLAY=:%s /usr/bin/qdbus "%display)+logoutCommand).failed():
|
|
|
|
|
("DISPLAY=:%s "%display)+logoutCommand).failed():
|
|
|
|
|
raise DesktopError(_("Unable send logout command"))
|
|
|
|
|
for i in range(0,20):
|
|
|
|
|
if filter(lambda x: "xdm/xdm\x00--logout" in x,
|
|
|
|
|