I looked but there doesn’t seem to be a straightforward way to do that in Linux. I was thinking a udev rule but it would be clunky since the low level details for media like SD cards aren’t available. At best, maybe a generic rule that mounts it and looks for an autorun.sh or something, but that’s basically reinventing Autoplay on Windows and would have the same security implications.
I read Hack-a-Day frequently, and I’ve come across several projects that use NFC readers so you can tap a card to play specific songs or start playlists. Maybe something like that but launch a specific game instead?
e.g. https://hackaday.com/2025/03/31/a-music-box-commanded-by-nfc-tags/








Check this out: https://hackaday.com/2026/07/20/old-ssds-find-new-life-as-game-cartridges/
Just saw it on Hack a Day and remembered this post. It’s using old SSDs instead of SD cards but is basically what you’re describing.
And they’re using auto launch scripts like I mentioned in my first comment and a whitelist to address security.