Hacker News new | past | comments | ask | show | jobs | submit login

X locking is notoriously difficult.



I run xlock on suspend rather than on resume, seems more reliable. I'm any case, locking is trivial to bypass by pressing Control-C a few times on resume to kill xorg, hence why I also start X with "startx; exit" so that this drops to the login prompt instead of the shell.


I think this still isn't secure. Try "sleep 5; exit" and press C-Z. You won't be logged out. You probably want to use "exec startx" instead.


Thank you, I took a look at my shell man page and this is very helpful.


I'm interested to understand why. Is it because of the design of Xorg?


Yes, it's one of the reasons Wayland was created. Screensavers didn't exist when X was designed. https://www.phoronix.com/scan.php?page=news_item&px=OTI5MQ

> Right now with screensavers under X it's basically capturing the input and continually redrawing over the display. > With Wayland, Kristian plans for the lock-screen to be part of the Wayland compositor. In having the compositor handle the screensaver role, it can ensure that no window can appear atop the screensaver surface, it can properly detect idling and grabs already, and has complete control over the screen. Unlike the X design, there wouldn't even need to be a screensaver "window" that's on top but the compositor could just keep painting a black screen. For those interested in a "fancy screensaver", a plug-in could be used or an out-of-process Wayland client for drawing whatever you desire.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: