Home ¦ Categories ¦ Atom

Hold My Screen

If you find yourself with an overzealous screen lock timer where you turn your back to make a coffee and you find your screen locked. And now you have to remember that difficult password. Or maybe you're using multiple screens and one of them is remotely logged into another machine, but that other machine keeps locking and the screen goes blank.

Well, here are a few harmless ways you can employ to delay or stop that screen from locking.

Play a video

Muted videos are probably the easiest way to do this on your own machine. Just keep the video visible at all times.

Use a browser

A browser to hold the screen lock gives you a few possibilities on your local machine or remote ones. Same rule applies, keep the tab visible.

  1. Play a muted video on your browser is the easiest option if you're not worried about who could be checking your traffic

    Of course, mute the video, resize it to the smallest possible and set it to repeat

  2. Request a wakeLock from a Chrome browser through the console. This is the easiest if you have Chrome and can remember to re-request the wakeLock when the tab is not visible. Hit F12 or open the Developer Console from the menu and type:


    That's it - you get a promise back, which says it's pending, but if you assign that value to a variable and re-check it, it will be fulfilled

> w = navigator.wakeLock.request();
< Promise {<pending>}
> w
< Promise {<fulfilled>: ...}

Those are the two main ways I use to hold my screen from locking.

© 2023 Ahmad Khalifa. Built using Pelican