I have program which is starting on boot when raspberry powered up. What I want to do is prevent someone to plug a hdmi cable and see desktop of raspberry. Is it possible to set screensaver? Of course it should ask a password to unlock the screensaver?
1 Answer
Open the terminal on Raspberry Pi itself or you can do this in SSH also:
sudo pkill -f lxsession GUI session will logout and display the Login screen. SSH session will remain logged in.
If you want to blank the display, type following in the terminal:
xset -display :0 dpms force off note:
- this will work only if the desktop session is logged in
- The screen will turn on if the mouse or keyboard is used.
This command will disable HDMI port
To disable port
vcgencmd display_power 0 To enable port
vcgencmd display_power 1 - This does not really answer the question. However +1 for the good alternatives.Ingo– Ingo2018-11-15 19:24:45 +00:00Commented Nov 15, 2018 at 19:24
xscreensavermay work for you. Install it withsudo apt install