Lock screen when logged in gnome env as root gnome desktop environment, the root user cannot Lock the screen. The official explanation is for various security considerations. Www.2cto.com. OK. In any case, I need to have a screen lock method under the root -- to cope with the company's security check. Google + Baidu has gone through, and there is no way to configure gnome. Only the xlock command is installed. Record it in this blog so as not to forget it later. Xlock Official Website: http://www.tux.org /~ Bagleyd/xlockmore.html downloads the latest source code. I downloaded xlockmore-5.34.tar.bz2 and decompress it :. /configure & make install configure may find that various libraries of various packages do not exist and install them properly. The error "-lXinerama" is not found when I make it again. It is strange that if the link library is missing, the report should be reported when configure is used. After the investigation, we can see that only libXinerama. so.1 and libXinerama. so.1.0.0 are available. I am dizzy. I just need to manually create a symbolic link. During running, you only need to press the command on the terminal. # The xlock screen immediately enters the Screen Saver. When you press any key or move the mouse, a prompt is displayed for entering the password. The screen lock for the root account is successful in the gnome environment.