Start Steam remotely with SSH

, ,

Is there a way to start Steam remotely once connected via ssh?

I’ve Fedora KDE edition installed on a desktop at home, and I’d like to use it with Steam Remote Play Anywhere, but I turn on the desktop with WOL via another pc always on, so it’s not logged in and steam is not started yet!

Steam requires a gui to start. If the server is not logged in with an active gui desktop then your goal is likely to fail.

Why not leave it logged in with a locked screen and try that way.

Note that GUI over ethernet will definitely show a lag in response.

If you’re running Xorg, the Gnome equivalent (which might work on KDE) would be DISPLAY=:0 gtk-launch /path/to/steam-application.desktop (replacing the last part with the actual location of the desktop file for the GUI entry). You can also try xdg-open if you don’t have gtk-open but that may or may not end up launching a text editor to edit the desktop file instead. If you haven’t logged in yet at this point, then X likely won’t be running but I think you can set auto-login in the KDE Settings menu.

The desktop file will likely either be in /usr/share/applications or ~/.local/share/applications.

Why not leave it logged in with a locked screen and try that way.

It will probably works but I don’t want to waste electric power :electric_plug:

If you’re running Xorg, the Gnome equivalent (which might work on KDE) would be DISPLAY=:0 gtk-launch /path/to/steam-application.desktop (replacing the last part with the actual location of the desktop file for the GUI entry). You can also try xdg-open if you don’t have gtk-open but that may or may not end up launching a text editor to edit the desktop file instead. If you haven’t logged in yet at this point, then X likely won’t be running but I think you can set auto-login in the KDE Settings menu.

I wouldn’t like to have autologin for security and because I’m not the only user on the PC.

Probably I want my cake and eating it, too :grimacing:

Are you saying you want to Play Anywhere to a Desktop running Steam that has ‘other’ users on it?
At the same time?

That doesn’t sound like a good idea.

If you do in-fact have exclusive use, then setup the desktop:

  • WOL (Wake on LAN)
  • Auto Login
  • Instant Screen saver with password (I think 1 min might be the lowest you can set, so the machine might be vulnerable for 1 min upon wake)
  • Auto run Steam and load your desired game in the launch command

Alternative:
WOL then Remote desktop from the remote device. I know Android can do this, not sure about that other phone make, I forget what they are called, no, not Nokia :wink:
Start Steam, Launch game, disconnect from Remote Desktop, play all day.

With either scenario, you need a method of putting the machine back to sleep (off) to save precious expensive power. So maybe remote desktop is the only answer.

Food for thought I hope.

p.s. I use a Raspberry Pi as my WOL device to my servers and desktop. Super low power option.

No, never said so :slight_smile:
I said the pc has other users also, so I won’t auto login on my user that has steam installed and set to start at login.

I’m using a Raspberry Pi too :slight_smile:

That’s a great idea, I should definitely go down this road! Thanks a lot!

I’ll install TigerVNC server and try to connect to steam after a connection!
Let’s see if it works :smiley:

You missing “#X11Forwarding no” part (sshd_config disabled by default) :slight_smile: