Live data from Hacker News

X11 screen locking: a secure and modular approach

leahneukirchen.org

61–70 of 91 posts

Re: X11 screen locking: a secure and modular approach

#61

Earlier quoted context omitted.

This mentions writing the screen lock UI in QT. jwz, maintainer of xscreensaver, had a rant about why he avoids the use of a big toolkit. The short version is he wants minimal code size because the consequence of a crash is to unlock the screen. The rant was prompted because of a real life gtk+ bug which made another screen locker crash. I would find a link and include it but jwz is hostile to links with HN as a refe…

The author mentions what they did to mitigate this in the previous post in the series, see the part about XScreenSaver: https://blog.martin-graesslin.com/blog/2014/05/screenlocker-...

> the screen content can be exposed. Consider for example the linked screenshot.

That's funny, because the effect there is obviously intended, because, uh, it looks cool.

> For a screen saver of the last millennium this was a suitable solution

It's true that this particular effect was much more impressive in the 90s. Personally I use the 'blank' demo in xscreenaver. Which I guess I could replace with the script in TFA without noticing much.

> Today users also expect the current time, battery state and many more information on the lock screen. We need to provide accessibility features which is not possible in XScreenSaver.

I don't see why this is not possible with Xlib. Yes I have written Xlib code. Seems to be just an "omg xlib is so old" argument, and things being old does not by itself make them incorrect.

> We need DBus integration

> and logind integration

Says who? I certainly don't need these.

Re: X11 screen locking: a secure and modular approach

#62

Earlier quoted context omitted.

The author mentions what they did to mitigate this in the previous post in the series, see the part about XScreenSaver: https://blog.martin-graesslin.com/blog/2014/05/screenlocker-...

> the screen content can be exposed. Consider for example the linked screenshot. That's funny, because the effect there is obviously intended, because, uh, it looks cool. > For a screen saver of the last millennium this was a suitable solution It's true that this particular effect was much more impressive in the 90s. Personally I use the 'blank' demo in xscreenaver. Which I guess I could replace with the script in TF…

I don't have any opinion on those. Regardless of how you or I feel about any extra features, the author does seem to have an answer to the security concern.

Re: X11 screen locking: a secure and modular approach

#63

Earlier quoted context omitted.

Yes, sadly I think the best GNU/Linux for laptops is Windows 10 with WSL (Windows Subsystem for Linux). By far.

I don't want ads in my application menu, sorry. Good for you if you like them.

Yes this sucks. Do you remember the Amazon store integration in Ubuntu?

Re: X11 screen locking: a secure and modular approach

#64

Earlier quoted context omitted.

> the screen content can be exposed. Consider for example the linked screenshot. That's funny, because the effect there is obviously intended, because, uh, it looks cool. > For a screen saver of the last millennium this was a suitable solution It's true that this particular effect was much more impressive in the 90s. Personally I use the 'blank' demo in xscreenaver. Which I guess I could replace with the script in TF…

I don't have any opinion on those. Regardless of how you or I feel about any extra features, the author does seem to have an answer to the security concern.

[deleted]

Re: X11 screen locking: a secure and modular approach

#65

My experiences with screen locking on Linux over time, using various machines: * The screen doesn't lock, and remains on while the lid is closed. * The screen doesn't lock, but does turn off when the lid is closed. * The screen locks, but the machine doesn't suspend when the lid is closed. * The screen doesn't turn on after the lid is opened. Key commands work, though. * The screen turns on after the lid is opened, b…

Screen lock is all around useless. It's a security threat more than anything.

Re: X11 screen locking: a secure and modular approach

#66

Earlier quoted context omitted.

Yes, sadly I think the best GNU/Linux for laptops is Windows 10 with WSL (Windows Subsystem for Linux). By far.

I can't stop hating Microsoft for WSL. Yes, it is a way forward for the company but I still have a feeling they have found a perfect way to make younger generation ignore Linux completely.

Ignore Linux by using Linux?

Re: X11 screen locking: a secure and modular approach

#67

I prefer https://github.com/muennich/physlock It seems more secure as it bypasses X, and you can be sure (can you? I just assume this, I don't really know) your input is not even being passed to X when your screen is locked. In practice I've found it very reliable.

never been able to get it to work. I've been using i3lock on my machines, not sure how well it does on suspend, though.

Re: X11 screen locking: a secure and modular approach

#68
I don't understand why we don't just lock screens by switching to a different virtual terminal running a different X server. If the lock screen doesn't share an X server with the user session, a lot less information can leak. This entirely-separate-session approach is what Windows uses, and it works great there.

Re: X11 screen locking: a secure and modular approach

#69

suckless' sloc works great and it's very customizable https://tools.suckless.org/slock/

> it's very customizable

Yeah, lots of features and options in this one. Worth a look! ;)

I rewrote it in Nim some time ago to see how it works, and it was a good lesson in X11 and POSIX APIs. Short and to the point.

Re: X11 screen locking: a secure and modular approach

#70
post #8
post #4

Earlier quoted context omitted.

Interesting. The only issue I've encountered regarding screen locking was that in the past the desktop would be visible for a split second after opening the laptop lid and before the screenlock is displayed. Haven't seen that behaviour in couple years, I think. I use latest Ubuntu at home and latest Ubuntu LTS at work. Typically Lenovo and HP laptops, some Asus Zenbooks also in the past.

Interestingly this has started happening on my mac, as of a few years ago. Obviously unrelated to Linux.

This is better viewed as a sequencing thing that is easy to get wrong, whatever the operating system. I recall a similar thing on Windows, a couple of decades ago, fixed/reduced to much fanfare if memory serves correctly.
Post reply on HN