1

My situation is I am logged in to gnome with a user, and through the terminal I am trying to run steam as a different user with the error unable to open a connection to X. Both users can run steam fine from their own gnome shell login, so I assume this is some conflict with x already being used by a different user. Any way to allow this?

Also as a side question, opinions on whether there is any point security wise to running steam through its own user? My thoughts are that there will be many games running through it that I don't want to give access to my personal files in my main users home directory.

2
  • 1
    how do you chnage user ? su ? try ssh -X otheruser@localhost, this should allow X protocol to be transfert to calling user.
    – Archemar
    Jun 11, 2015 at 14:25
  • @Archemar this works thanks. However how exactly does it work? Wouldn't sending all the x server data (video, audio and input?) over ssh through lo lead to performance issues with demanding games? I'll have to download some bigger games to test it out. Jun 11, 2015 at 15:43

2 Answers 2

1

You need to grant access to X server for other users

/usr/bin/xhost +

You can read about xhost in man page:

XHOST(1)
NAME
       xhost - server access control program for X
...
...
...
+       Access is granted to everyone, even if they aren't 
        on the list (i.e., access control is turned off).
...
...
...
0

Export a different display before trying to open an X11 connection:

export DISPLAY=:1

Then launch your GUI and it should work.

2
  • Do you mean use this command from the user running through terminal before launching steam? I still get the same error. Jun 11, 2015 at 15:45
  • Yes. The user has to export it, not you. You could put that command in their .bash_profile so that it's automatically done when they log in though.
    – Jeight
    Jun 11, 2015 at 17:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .