After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759640 - gnome-shell doesn't lock the screen when not using gdm
gnome-shell doesn't lock the screen when not using gdm
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: lock-screen
3.18.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-12-18 17:10 UTC by g.trentalancia
Modified: 2021-07-05 14:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description g.trentalancia 2015-12-18 17:10:08 UTC
Gnome-shell doesn't lock the screen, despite the preferences are correctly set in the GSettings keys.

It might be related to the fact that Gdm is not being used (another display manager is being used).
Comment 1 Jasper St. Pierre (not reading bugmail) 2015-12-18 17:30:53 UTC
Indeed. In order to lock the screen and log back in, we need to run a PAM reauth session, and that means we need the original session owner. Currently, we only support talking to gdm for that.
Comment 2 g.trentalancia 2015-12-30 15:53:33 UTC
It is also possible to use XScreenSaver (or perhaps gnome-screensaver) and the following extension for Gnome-Shell:

/*
 * Copyright © 2015 Guido Trentalancia
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the licence, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Guido Trentalancia <g.trentalancia@libero.it>
 */

/*
 * Extension to lock the screen from an icon on the panel using
 * XScreenSaver (http://www.jwz.org/xscreensaver).
 */

const Lang = imports.lang;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Util = imports.misc.util;

const Main = imports.ui.main;

let _lockScreenButton;

function init() {
	_lockScreenButton = new St.Bin({ style_class: 'panel-button', 
								reactive: true,
								can_focus: true,
								x_fill: true,
								y_fill: false,
								track_hover: true });
	let icon = new St.Icon ({ icon_name: 'changes-prevent-symbolic',
								style_class: 'system-status-icon'});
	_lockScreenButton.set_child(icon);
	_lockScreenButton.connect('button-press-event', _LockScreenActivate);
}

function _LockScreenActivate () {
	Main.overview.hide();
	Util.spawnCommandLine('xscreensaver-command -lock');
}

function enable () {
	Main.panel._rightBox.insert_child_at_index(_lockScreenButton, 0);
}

function disable () {
	Main.panel._rightBox.remove_child(_lockScreenButton);
}
Comment 3 GNOME Infrastructure Team 2021-07-05 14:32:44 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.