Unable to lock the desktop as root within GNOME

This document (7008715) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server 10
SUSE Linux Desktop 10


Whilst logged in as root the screen cannot be locked whilst running a GNOME desktop.


Best practice suggests not to login as the root user, due to security implications.  The recommendation is to login as a non-root user, then use su to switch to root when required.

However, if there is a requirement to login to the desktop as root and a need to lock the screen a utility called xlock can be used.
xlock by default requires the users password to unlock the screen.

An example xlock implementation:
# xlock -mode blank -mousemotion

-mode blank = a blank screen will be displayed instead of a screen saver
-mousemotion = allows mouse motion to display the password window

Please see the man pages for more options.

Additional Information

For further information on the reasons why root cannot lock the GNOME desktop please see the following:


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7008715
  • Creation Date: 07-Jun-2011
  • Modified Date:06-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center