6 ms·
Show HN: Play Pokémon to unlock your Wayland session
Hello everyone!
I've created a gameboy emulator to unlock my Wayland session and wanted to share this project to everyone here!
I've been a Linux enthusiast since I was a kid. What always captivated me was the freedom to customize my system exactly the way I wanted. With Wayland, we've reached an incredible level of performance. It's like turning your operating system into a video game! I've always been fascinated by the blend of fun and the serious, technical nature of an OS. That’s what inspired me to create this project.
I started by studying Wayland, its protocol and how to build a compositor. Then I became particularly intrigued by the concept of a locker, which reminded me a bit of an escape game. That’s when I thought: how cool would it be to solve a puzzle to unlock your session, instead of just typing a password? Since I’ve worked with emulators in the past and I’m a huge Pokémon fan, the idea of building the puzzle around that game came to me instantly!
Technically, the locker code and the wayland protocol have been implemented from scratch ( using EGL and wl_keyboard_listeners ).
My locker runs a version of the gbcc emulator modded by myself. This emulator waits for one precise value to be set in a given memory address.
I have modded the Pokémon game to my needs: when the password is good, I put the good value in the good memory address so the emulator knows it needs to unlock the session.
Hope you will appreciate this project!
- d3Xt3r 1y agoAh, goody. Looks like I found the only other Wayland user on HN. ;) You should also post here: https://news.ycombinator.com/item?id=44837981 https://news.ycombinator.com/item?id=44837981
- anajimi 1y agoThank you for the link! Hope to see more people using Wayland then :D
- righthand 1y agoThere are dozens of us…dozens!
- jchw 1y agoOn the KDE side, Wayland has been going pretty well. Wayland sessions make up 82% of all sessions with telemetry enabled. https://blogs.kde.org/2025/03/15/this-week-in-plasma-file-transfer-progress-graphs/#plasma-640-3 https://blogs.kde.org/2025/03/15/this-week-in-plasma-file-tr... For me the real conundrum was SwayWM vs KDE Wayland rather than any X.org session; I really felt like SwayWM was a good upgrade from i3wm and gave me a better desktop session with much less hacks. Hope to see wlroots push forward and support some of the newer Wayland protocols, it has started to fall behind a little bit, but I think it's good for alternative desktops.
- Y_Y 1y agoCool kids don't allow telemetry. I think that any software whose userbase isn't totally oblivious will have severe selection effects if you use data obtained by spying.
- jchw 1y agoIf the cool kids are so cool, they should learn to distinguish transparent opt-in telemetry from invasive opt-out telemetry. Unfortunately, being "cool" doesn't get your needs represented, so it's really not always in your best interests to never opt in.
- OsrsNeedsf2P 1y agoI run Wayland but I'm not happy about it. Most autoclickers still don't work, and autotypers need sudo and group magic to get working.
- jchw 1y agoRoot is definitely required to inject inputs at the kernel level using uinput, which I think is what you would hope, ignoring the fact that the typical Linux desktop still has a lot of other low hanging fruit to fix in terms of security. Anyway though, the "standard" way to do automatic clicking and typing on Wayland is via the RemoteDesktop portal, named such because it is used with ScreenCast to support use cases like VNC and RDP servers. Despite the poor choice of name, it gives a general API for sending inputs programmatically. https://docs.flatpak.org/en/latest/portal-api-reference.html#gdbus-method-org-freedesktop-portal-RemoteDesktop.CreateSession https://docs.flatpak.org/en/latest/portal-api-reference.html... This does require at least a one-time permission grant for an application to use, but at least on KDE it is possible for the permission to persist across runs. I'm sure everyone is unenthused about having to deal with another way to do things, but it's at least decently straightforward... You could certainly invoke this from a quick Python script I reckon. (There's also libei but it's kind of a mess imo and I don't know if it is well-supported yet.)
- juujian 1y agoThe trick was to switch to AMD (screw NVIDIA on Linux).
- techjamie 1y agoI'm on Wayland with NVIDIA, it took longer to get there but it does work perfectly fine.
- heresie-dabord 1y agoI count for at least two! Wayland in Raspberry Pi OS (labwc) Wayland in Debian: Bookworm (Sway), Trixie (labwc)
- alex-moon 1y agoI use Wayland! I like it a lot and I think that it's a sensible way to take window management in the 21st century. However, it's clearly not _mature_ yet (which is understandable - it's very new!). My use case specifically is a bit unusual: 1. I'm on an NVIDIA graphics card - this struggles a lot, I won't lie, and it's really odd issues which are difficult to track down. 2. I'm running Deskflow for virtual KVM - this is using literally someone's hand-rolled attempt to hack Wayland to make it work - it manages the most important element: my keyboard and mouse are shared between my Linux desktop and my MacBook - but much of the incidental functionality, most notably copy-pasting and repeating held keys, doesn't work at all. Mod keys seem a bit fucky as well. That said, I'm committed - am excited to see the tech honed in the coming years.
- ACS_Solver 1y ago> However, it's clearly not _mature_ yet (which is understandable - it's very new!) I'm admittedly biased against Wayland because in my view it's been a disaster both in organization and technically, and I've had some very frustrating interactions, but even so there's no way it's accurate to describe Wayland as very new. Wayland started development in 2008. Version 0.85 of the protocol and of Weston, which the devs called "the first real release", was in early 2012. KDE (KWin) started adding Wayland support in 2011. Wayland development began almost exactly 17 years after Linus released the first 0.01 kernel. Next month Wayland turns 17. So Wayland has been in development now for half of Linux's entire existence, and it's still not mature. It started when iPhone 3G was a new top notch phone, the MacBook Air was just launched, 4G mobile networks were not yet commercially available, netbooks were highly popular, solid-state drives were just breaking into the market, and the term blockchain hadn't yet been invented. You may like Wayland, but what you're saying is you're using the most common GPU vendor (yes everyone loves AMD's open approach to drivers, but there's a reason Nvidia dominates completely, and that's because AMD GPUs are not competitive) and basic functionality like copy-pasting and key repeats doesn't work for you. Yes Deskflow isn't the most standard setup but this is completely like my experience with Wayland. A 17 year old project and it only works for a certain set of typical setups with typical use cases the committee blessed.
- throwaway13337 1y ago
- DiabloD3 1y agoIronic you say that, because I also use Wayland.
- skerit 1y agoIncredible that we're getting something like this before a plain good old screensaver
- anajimi 1y agoThanks for your idea! I think it is totally possible to implement a screensaver with the ext-session-lock protocol. I will try to explore this idea when I have time in the next few months :)
- DrewRWx 1y agoDo you have a Ko-fi? 'cause I would really enjoy that screensaver. I adore this project on its own merits too because using the memory values in an emulated game is something that has fascinated me since Twitch Plays Pokémon integrated their Twitch display!
- anajimi 1y agoThank you for your kind comment! I don't have a ko-fi but I will think about creating one :)
- Svip 1y agoI wish you a lot of luck; I am basically just waiting on XScreenSaver to be ported to Wayland before I move on from X11. But jwz (XScreenSaver's creator and maintainer) doesn't give me much hope: https://www.jwz.org/blog/2025/07/xscreensaver-wayland-and-locking/ https://www.jwz.org/blog/2025/07/xscreensaver-wayland-and-lo...
- theblazehen 1y agoI always love the surprise when visiting jwz's site from HN
- Nursie 1y agoWhy ... why did I click it? LOL.
- rtsang1 1y agoFor a moment, I thought the punchline was that users needed to play through the game and clear the elite four to unlock their session.
- OsrsNeedsf2P 1y agoHeavy customization is important to me on the Linux desktop. This project has given me a lot more faith in Wayland than 5 years of hearing debates about it.
- yjftsjthsd-h 1y agoFWIW, as a ... Wayland skeptic/pessimist¹, screen locking does seem to be one place where things actually work and seem more sensible than under X. ¹ It always seems to be just around the next corner. Sixteen years on, it would be nice if we could have feature parity.
- jasonjayr 1y agoFrom my understanding, the security decisions around things like screen locking are the source of many of the pain points holding back X11 users from wayland.. Things like xtest(send input events from random sources), screen grabbing/video recording(allowing another app to see the contents of another window from a potentially different security domain), focus grabbing, input sniffing, are all difficult on wayland, specifically because they are serious security issues on X11, especially in light of a modern understanding of the risk profile.
- yjftsjthsd-h 1y agoYes, many of Wayland's problems come down to particular ideas about security at the expense of functionality. But IMHO screen locking is a rare exception because the overly restrictive approach is actually fairly reasonable here, and the set of features to (not) implement is smaller.
- skyzouwdev 1y agoThat’s a really creative take on session locking. I can see it being both fun and surprisingly secure — anyone trying to unlock your machine would need to know the game and the exact sequence. Do you see this as more of a novelty project, or could it be adapted for practical use in real security setups?
- anajimi 1y agoThank you for your kind comment! To be honest I saw this as a novelty project, however I think it could be more secure than a password locker, at least in some cases where the password is weak.