Is there a way to autorun games when external drive is plugged?
Comandante Ñoñardo Sep 24, 2017
title.

I would like to plug an external drive (or, like in the pic, hot swap an internal drive in a 3.5 docker for 2.5 ssd's)..



...and I want the game autorunning..

Is that possible on Linux?
GustyGhost Sep 24, 2017
That is a neat idea for "cartridge games". Are you just going to buy a bunch of low capacity SSDs and make a sort of pseudo console?
waitaha Sep 24, 2017
I think you could achieve something like this with creating an udev rule which matches your external hard drive and runs a script.
Comandante Ñoñardo Sep 24, 2017
Quoting: AnxiousInfusionThat is a neat idea for "cartridge games". Are you just going to buy a bunch of low capacity SSDs and make a sort of pseudo console?

Exactly! That is my idea..

..low capacity SSd's or, if the game is less than 32GB, the idea is to use those really fast USB 3 flash drives that outperform the most electromechanical 2.5 hdd's

I really miss the beautiful Plug'n'Play simplicity of the good old days of the gaming consoles like the Sega Genesis or Snes.

And this is why I hate modern consoles...


I have a similar idea for my steam library..
wolfyrion Sep 24, 2017
With udev Rules is possible to do it but I guess you may have to experiment a bit.

For example for a USB Drive(the one I use mostly) to run a local script.sh just in case if you want to have the launcher located on your pc.

sudo nano /etc/udev/rules.d/11autorunusb.rules

ACTION=="add", SUBSYSTEM=="usb_device",RUN+="/usr/bin/local/script.sh"

But in case you want to go hot swap I guess is a bit more complicate something like this (havent test it)

create another /etc/udev/rules.d/22hotswap.rules:

# mount-devices
KERNEL=="sd[a-z][0-9]", ENV{ID_MODEL_ID}=="yourmodelid", ENV{ID_VENDOR_ID}=="yourvendorid", ACTION=="add", ENV{mount_options}="relatime", RUN+="/usr/bin/local/script.sh"
tuubi Sep 24, 2017
I think the freedesktop Autostart spec (check under heading Autostart Of Applications After Mount) is supported by Xfce's Thunar at least. Needs to be enabled in the volume manager config though.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.