1

I am running a lot of network based processes in my office computer. I want others to switch on my computer in my absence, but I am not ready to share my password. So I have to enable the auto login to my user. But, I also don't want others to see my personal and official documents.

Hence I want to know how to enable screen lock in an auto login Ubuntu system. I am using 16.04 LTS.

I saw a solution in https://askubuntu.com/a/539270. But when I tired this, my system is automatically logging in, but the screen is not locked.

Expecting a solution.

NB: I know how to make auto login. No need to explain it.

Joo Nice
  • 154

1 Answers1

1

I have modified a solution from https://askubuntu.com/a/539270. Now it works for me.

I added the following command to Startup applications.

gnome-terminal -e 'gnome-screensaver-command -l'

Now after login/autologin the screen is successfully locked. BUT I cannot type the password at the unlock screen. However, I can click "Switch user" button and login from the login screen.

P.S. Please, be sure that you are using GNOME environment. For example, in MATE environment, use

mate-terminal -e 'mate-screensaver-command -l'
Chaosor
  • 383