Skip to content

Instantly share code, notes, and snippets.

@gardouille
Created March 12, 2019 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gardouille/8ca2f3d2765d1fc44235aae48e63540c to your computer and use it in GitHub Desktop.
Save gardouille/8ca2f3d2765d1fc44235aae48e63540c to your computer and use it in GitHub Desktop.
auto-launch Steam
# Wired xbox 360 controller
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="028e", RUN+="/bin/systemctl start steam.service"
[Unit]
Description=Steam launcher
After=wm.target
Conflicts=unclutter.service
[Service]
# User
User=gardouille
Group=gardouille
# Ensure to run it in gui
Environment=DISPLAY=:0
# start and stop
ExecStart=/usr/games/steam
ExecStop=/usr/bin/pkill -F %h/.steampid
ExecStop=/usr/bin/pkill -9 MainThrd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment