You can sign up to get a daily email of our articles, see the Mailing List page!
Support me on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! We will also never show adverts to anyone who supports GamingOnLinux! Alternatively, you can support me on Paypal.
Is there a way to autorun games when external drive is plugged?
Comandante Ñoñardo commented on 24 September 2017 at 12:50 am UTC

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)..
image
image

...and I want the game autorunning..

Is that possible on Linux?

AnxiousInfusion commented on 24 September 2017 at 2:08 am UTC

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 commented on 24 September 2017 at 8:57 am UTC

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 commented on 24 September 2017 at 4:19 pm UTC

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 commented on 24 September 2017 at 6:55 pm UTC

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 commented on 24 September 2017 at 7:38 pm UTC

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.

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Community Livestreams
  • hatniX plays: Neverending Nightmares
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Forum Posts
Facebook