website/content/blog/startgraphicalappsnoforwarding.md

20 lines
1.1 KiB
Markdown
Raw Normal View History

2020-09-08 00:38:51 +00:00
---
title: "Starting Graphical Applications Remotely without X-Forwarding"
date: 2020-09-07T20:24:49-04:00
draft: false
tags: []
---
One of my favorite casual gaming setups is to use a slim laptop on my couch while streaming from my desktop using Steam Remote Play. The downside though is that unless I want to get up, Steam needs to be already running on my desktop. This post describes how I start steam remotely from my couch so that I can stream my games without having to get up and set it up on my desktop first.
This requires you to be already logged into a graphical session on the computer you want to stream from.
On Linux, there is a DISPLAY environmental variable which tells X11 where to show the application. By default (at least on Ubuntu), the display starts as `:0` and moves up in count. We can make use of this fact, to start steam on a X11 server instance that is already running so that we don't have to do any X11 forwarding.
On the client computer,
```bash
ssh desktop "DISPLAY=:0 nohup steam"
```
The `nohup` allows the application to not terminate when you press `CTRL-C` from your client computer.