steam-runtime icon indicating copy to clipboard operation
steam-runtime copied to clipboard

Proton 5.13 / Steam Linux Runtime doesn't start if no hostname is set

Open fagnerln opened this issue 5 years ago • 3 comments

Hey guys. I don't know if I need to open the issue here or on the Runtime, but as I only use the runtime running proton and it's easier to generate logs, I will create a issue here.

I tried a lot to run games on newer protons on OpenSUSE, and I tried the Flatpak version. The flatpak doesn't even open, showing a "Cannot open display" error, looking for solution on the web, I found that just need to put "xhost +" on terminal, and now I can make it run.

So as Proton is sandboxed too, I think that I should try to run on it, and for my surprise, it works. I did some tests after reboots: (1)steam-238530.log (2)steam-238530.log (3)steam-238530.log

The first one is the game not working, the second is after the xhost +, the game blinks and closes, the third is it running correctly.

Hardware information: https://gist.github.com/fagnerln/387c35e8f549659ec1d9d96624b870f8

fagnerln avatar Dec 18 '20 22:12 fagnerln

Hello @fagnerln, let's treat this as a Pressure Vessel issue until there's a stronger indication the issue is elsewhere.

kisak-valve avatar Dec 18 '20 22:12 kisak-valve

Hello @kisak-valve ! No problem.

I discovered one more thing, the issue is that my computer didn't have a name. If I executed hostnamectl it showed: Static hostname: n/a

So I added a name with: sudo hostnamectl set-hostname my-pc. And now there's no need to use the "xhost +" anymore.

I think that a lot of people can have similar issues like this, maybe would be nice if pressure vessel or even proton detects this.

fagnerln avatar Dec 19 '20 00:12 fagnerln

@kisak-valve, please could you retitle to something like "Proton 5.13/SteamLinuxRuntime doesn't start if no hostname is set"?

I found that just need to put "xhost +" on terminal

That command is insecure on multi-user systems. A better workaround would be xhost "+si:localuser:$(id -nu)", which gives your user-ID access to the X server via Unix sockets, without opening it up to literally everyone.

GNOME does the equivalent of xhost "+si:localuser:$(id -nu)" automatically, and I wish other desktop environments did the same, but unfortunately they don't.

maybe would be nice if pressure vessel or even proton detects this

This isn't really Proton's job, but pressure-vessel could maybe bail out with an error message if there's a way we can detect it.

This is the same problem that you're having in Flatpak, because we run the same code as Flatpak to set up the X11 display for the container (literally the same code - pressure-vessel contains a copy of parts of Flatpak, and specifically this is write_xauth()).

I'm curious how you installed without setting a hostname, and how other X11 apps worked - I thought the Xauthority protocol relied on having a known hostname...

smcv avatar Jan 04 '21 20:01 smcv