How To Set CrowPi Lock Screen

edited December 2022 in Raspberry Pi & CrowPi

Question:

Is there a way to set up the CrowPi so that I can have a lock screen where I have to enter a password to unlock the CrowPi?

Answer:

Raspberry Pi OS has a lock screen installed. You need to add it to the menu by configuration.
Before that, you need to set xservice to keep the screen lit first, othervise you'll not be able to wake up the screen by touching the screen, tapping the keyboard or clicking the mouse.

Set xservice to keep the screen lit
1. Open the system file lightdm.conf
sudo nano /etc/lightdm/lightdm.conf
2. Modify the parameters of lightdm.conf
Find the 'xserver command' under the SeatDefaults section, delete the #, and modify it to
xserver-command=X - s 0 -dpms



Parameter meaning:
- s : set screen saver not to start,
- dpms: turn off power saving management.


3. Save and exit: Ctrl+X, press Y and press Enter

4. Reboot the system.
 sudo reboot

Add Screen Lock to the menu
1. Open the terminal to modify the configuration file. The command is as follows:
cd ~/.config/lxpanel/LXDE-pi/panels 
sudo nano panel



2. Find the content of Plugin {type=menu..., and add the following content at the end of the configuration section:
 
      separator {
      }
      item {
      name=Lock…
      image=gnome-lockscreen
      action=/usr/bin/dm-tool lock
      }


3. Save and exit: Ctrl+X, press Y and press Enter

4. Reboot the system, you can see that there is a lock screen icon in the start menu.



5. Click it to lock the screen.


Sign In or Register to comment.