<div dir="ltr"><div>Léa,</div><div><br></div><div>You will need to grant user_2 the x bit on user_1's home directory so that they can access /home/user_1/.Xauthority. I think most distros set $HOME permissions to 700, you may try setting it to 711 or adding user_2 to the user_1 gid and using 710 (depending on your security model).<br></div><div><br></div><div>Cheers,</div><div>Bryan<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 27, 2019 at 11:30 AM Lmhelp1 <<a href="mailto:lmhelp1@orange.fr">lmhelp1@orange.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Uli,<br>
<br>
Thank you for your answer and for the explanations.<br>
<br>
"ssh -X user_2@localhost" works fine indeed.<br>
<br>
Uli> The problem is access to the xauthority file of user_1<br>
<br>
I created a group "simple_users" and put "user_1" and "user_2" in that <br>
group.<br>
I changed the owner group of "/home/user_1/.Xauthority" to <br>
"simple_users" and set permissions to 660.<br>
 > chown user_1:simple_users /home/user_1/.Xauthority<br>
 > chmod 660 /home/user_1/.Xauthority<br>
<br>
Then I re-tried the experiment:<br>
<br>
user_1> su user_2<br>
Password:<br>
<br>
I don't get the error that I reported in my first post<br>
(No protocol specified<br>
xrdb: Resource temporarily unavailable<br>
xrdb: Can't open display ':50').<br>
<br>
Yet, when I run xeyes, I get an error:<br>
<br>
user_2> xeyes<br>
No protocol specified<br>
Error: Can't open display ':50'<br>
<br>
Best regards,<br>
--<br>
Léa<br>
<br>
<br>
On 27/12/2019 4:17 PM, Ulrich Sibiller wrote:<br>
> You are switching users without passing the display authorization<br>
> cookie. The easiest way to achieve this is probably using ssh: instead<br>
> of executing "su user_2" call "ssh -X user_2@localhost".<br>
><br>
> The problem is access to the xauthority file of user_1 (the path is<br>
> stored in the XAUTHORITY environment, usually<br>
> /home/user_1/.Xauthority.). This file contains the cookie you need to<br>
> access the display. As user_2 you are not allowed to read that file<br>
> while as user root you can read it.<br>
><br>
> Uli<br>
><br>
> On Fri, Dec 27, 2019 at 3:45 PM Lmhelp1 wrote:<br>
>> Hello,<br>
>><br>
>> I am using X2Go under Debian with Openbox.<br>
>> I have upgraded to Debian Buster, I didn't use to experiment the problem<br>
>> below with Debian Stretch.<br>
>> My problem is about running graphical clients (like xeyes, xterm, gvim,<br>
>> etc.) from a console logged in either as a "simple" user ("user_2"<br>
>> below) or as "root".<br>
>> "user_2" cannot run these clients, "root" can.<br>
>> I would like both of them to be able to run these clients.<br>
>> Below, is what happens ("user_1" is the user that started the X2Go<br>
>> session, it is also a "simple" user).<br>
>><br>
>> user_1> su user_2<br>
>> Password:<br>
>> No protocol specified<br>
>> xrdb: Resource temporarily unavailable<br>
>> xrdb: Can't open display ':50'<br>
>><br>
>> user_2> exit<br>
>><br>
>> user_1> su<br>
>> Password:<br>
>> root> xeyes<br>
>> <OK><br>
>><br>
>> Can you tell me how to allow "user_1" to run graphical clients like<br>
>> xeyes, xterm, gvim, etc.?<br>
>><br>
>> Best regards,<br>
>> --<br>
>> Léa<br>
>><br>
>> _______________________________________________<br>
>> x2go-user mailing list<br>
>> <a href="mailto:x2go-user@lists.x2go.org" target="_blank">x2go-user@lists.x2go.org</a><br>
>> <a href="https://lists.x2go.org/listinfo/x2go-user" rel="noreferrer" target="_blank">https://lists.x2go.org/listinfo/x2go-user</a><br>
<br>
_______________________________________________<br>
x2go-user mailing list<br>
<a href="mailto:x2go-user@lists.x2go.org" target="_blank">x2go-user@lists.x2go.org</a><br>
<a href="https://lists.x2go.org/listinfo/x2go-user" rel="noreferrer" target="_blank">https://lists.x2go.org/listinfo/x2go-user</a><br>
</blockquote></div>