You are not logged in.
I have a setup where I'm running steam as a second user in my main user's X server. That way steam doesn't have access to my home directory and I don't have to deal with all the crap files that Steam throws around. This has worked great in X so far. I'm now experimenting a bit with Wayland and I'm having trouble setting up something similar there.
My script to start Steam in X is simply:
#!/usr/bin/bash
xhost +
exec sudo -u steam -s /usr/bin/steam "$@"So I'm looking for a way to do something similar to the above script in Wayland.
I've figured that Wayland has a socket in my XDG runtime directory. So what I believe I'm looking for is ideally a way to start Wayland and specify another directory for this socket, and then start Steam as the user steam while passing on the significant environment variables. But I have no idea have to do either of these things.
As an experiment, instead of getting Wayland to start with the socket somewhere else, I tried to give the steam user access to /run/user/1000 and start steam with the following command:
sudo --preserve-env=XDG_SESSION_TYPE --preserve-env=WAYLAND_DISPLAY --preserve-env=DISPLAY --preserve-env=XDG_RUNTIME_DIR -u steam -s /usr/bin/steamBut no luck. It seems that Steam is still trying to launch in X:
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
Steam client's requirements are satisfied
/home/steam/.local/share/Steam/ubuntu12_32/steam
[2020-11-23 17:06:19] Startup - updater built Oct 28 2020 23:34:22
Installing breakpad exception handler for appid(steam)/version(1603992987)
/data/src/steamexe/updateui_xwin.cpp (339) : Assertion Failed: Could not open connection to X
/data/src/steamexe/updateui_xwin.cpp (339) : Assertion Failed: Could not open connection to X
Installing breakpad exception handler for appid(steam)/version(1603992987)
Error: Unable to open a connection to X. Check your DISPLAY environment variable and make sure that you have enabled X. If you are running remotely, make sure that you have a remote connection which will allow an X connection.
For more information visit https://support.steampowered.com/kb_article.php?ref=4050-WOJB-0608.
crash_20201123170619_3.dmp[38162]: Uploading dump (out-of-process)
/tmp/dumps/crash_20201123170619_3.dmp
/data/src/steamexe/main.cpp (773) : Assertion Failed: failed to initialize update status ui, or create initial window
/data/src/steamexe/main.cpp (773) : Assertion Failed: failed to initialize update status ui, or create initial window
jimmy-laptop% Error:
Unable to open a connection to X. Check your DISPLAY environment variable and make sure that you have enabled X. If you are running remotely, make sure that you have a remote connection which will allow an X connection.
For more information visit https://support.steampowered.com/kb_article.php?ref=4050-WOJB-0608.
Press enter to continue: crash_20201123170619_3.dmp[38162]: Finished uploading minidump (out-of-process): success = yes
crash_20201123170619_3.dmp[38162]: response: CrashID=bp-2e498c43-723b-4b8c-8be1-fb6dd2201123
crash_20201123170619_3.dmp[38162]: file ''/tmp/dumps/crash_20201123170619_3.dmp'', upload yes: ''CrashID=bp-2e498c43-723b-4b8c-8be1-fb6dd2201123''Does anyone have an idea how to make this work?
Offline
There's several different things going on here so we first need to separate some things.
1) There is a difference between display servers (compositors) using wayland and applications using wayland (or not).
2) Steam is not a native wayland application and does not support wayland. As such it will always be looking for an X server, even on wayland.
3) To not break these kinds of applications, wayland has Xwayland, which is basically an X server running as a wayland client so you can use these applications on a wayland display server.
Now that we have that out of the way, we can see that in this situation wayland is basically irrelevant for your problem as your display server has set up Xwayland for you as the X server and Steam just needs an X server to work; no wayland is involved there.
That means to be able to get this to work you need to account for basically just 1 thing; make it so Steam can access the X server. This is exactly what you needed to before with the only difference being that it's now provided by/through Xwayland instead of a classic Xorg installation/setup.
Other than that I can't really provide exact information on the details of connecting to an Xwayland X server from another user as I've never attempted to do so.
I would expect it's still just running `xhost +` (or more specifically if you care about security; `xhost +si:localuser:steam`) and ensuring DISPLAY is properly available (it should already be set by your display server) but you'd have to experiment here I'm afraid unless someone else comes along and has all the answers ![]()
EDIT: for the record, if we'd be talking about native wayland applications your train of thought would be correct and the other user would need access to the wayland socket.
Last edited by Omar007 (2020-11-23 20:16:37)
Offline