--- /usr/share/gnome-shell/js/ui/userMenu.js 2013-04-05 20:24:55.000000000 +0200 +++ /home/gerstrong/userMenu.js 2013-04-15 08:41:19.485161937 +0200 @@ -21,6 +21,7 @@ const ModalDialog = imports.ui.modalDial const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; const Params = imports.misc.params; +//const UnlockDialog = imports.ui.unlockDialog; const Util = imports.misc.util; const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; @@ -867,7 +868,11 @@ const UserMenuButton = new Lang.Class({ Main.overview.hide(); if (Main.screenShield) Main.screenShield.lock(false); - Gdm.goto_login_session_sync(null); +// Gdm.goto_login_session_sync(null); +// if (UnlockDialog.isSupported()) +// Gdm.goto_login_session_sync(null); +// else + this._lightdmLoginSession(); }, _onQuitSessionActivate: function() { @@ -994,5 +999,19 @@ const UserMenuButton = new Lang.Class({ this.menu.close(BoxPointer.PopupAnimation.NONE); this._loginManager.suspend(); } - } +// } + }, + _lightdmLoginSession: function() { + try { + let seat = GLib.getenv("XDG_SEAT_PATH"); + let result = Gio.DBus.system.call_sync('org.freedesktop.DisplayManager', + seat, + 'org.freedesktop.DisplayManager.Seat', + 'SwitchToGreeter', null, null, + Gio.DBusCallFlags.NONE, + -1, null); + } catch(e) { + Main.screenShield.lock(); + } +} });