0

How do I disable the automatic screen lock on incactivity with the console/bash? My system: Ubuntu 18.04LTS (VirtualBox)

The commands given here did not work.

michael
  • 395
  • 3
  • 15
  • If you just need to get this done, Settings, Power and set Blank Screen to Never. My Ubuntu 18.04 VM (VMware) screen does not turn off. – John Apr 17 '20 at 19:09
  • Thank you for your reply! It's necessary to do this with a script, because I have to enroll it to a cluster. Can you give me a hint? – michael Apr 17 '20 at 19:15
  • 1
    Does this solution work for you (another command line you posted did not work). https://askubuntu.com/questions/719782/change-power-options-for-ubuntu-server-via-terminal – John Apr 17 '20 at 19:20
  • Thank you very much! – michael Apr 17 '20 at 19:28

1 Answers1

1

There are power options and screen adjustments in this article below. I quoted the answer section from the article

In /etc/systemd/logind.conf, I edited the lines

HandlePowerKey=poweroff ...

HandleLidSwitch=hibernate

to

HandlePowerKey=ignore ...

HandleLidSwitch=ignore

And then reboot the system.

https://askubuntu.com/questions/719782/change-power-options-for-ubuntu-server-via-terminal

John
  • 46,167
  • 4
  • 33
  • 54