locking screen for root

Asked by Yashodhan

I have Ubuntu 7.10 installed in my laptop & I use gnome.I login as root,
is there any way that I can lock the screen for the user root ???
or is there any program in the repository that will do this for me ?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Utkarshraj Atmaram (utcursch) said :
#1

XScreenSaver intentionally doesn't allow you to lock the screen as root. You'll have to turn off some security features, before it can work. For details, please read the XScreenSaver FAQ:
<http://www.jwz.org/xscreensaver/faq.html#root-lock>

This is also true for gnome-screensaver. For details, please read GnomeScreensaver FAQ:
<http://live.gnome.org/GnomeScreensaver/FrequentlyAskedQuestions>

However, if you're using KDE, you can lock the screen as root normally. You can use this command to lock the screen:
 dcop kdesktop KScreensaverIface lock

There is no need to graphically log in as root. Logging as root is risky, more so when done graphically. You should use sudo instead. When you're logged in as a non-root user, you'll be able to use GUI administration tools with sudo privileges. (These programs will prompt you for the password when you start them). Similarly, you can use sudo on the command-line (gnome-terminal, konsole etc.).

So, it's wise to stop logging as root, and use sudo/gksudo instead. You can find a tutorial at <https://help.ubuntu.com/community/RootSudo>

Revision history for this message
xxot (kravetc) said :
#2

apt-get install xlockmore

Use "xlock" command for locking the screen.

Can you help with this problem?

Provide an answer of your own, or ask Yashodhan for more information if necessary.

To post a message you must log in.