XQuartz and draw in root

Hello,

I have a problem with ssh login to lxplus.

I did type ssh -X -Y melsawy@lxplu.cern.ch and when i try to draw something with root i got the below error. (or the screen turns to black and i have to restart my machine)

could you please advise what to do.

My operation system is Sierra OSX
XQuartz 2.7.11

thanks,

Mai

root [0]
Attaching file spinhalf_1000.lhe.root as _file0…
root [1] lhe.Draw(“e”)
Error in TGClient::TGClient: can’t open display “./:0”, switching to batch mode…
In case you run from a remote ssh session, reconnect with ssh -Y
root [2] .q

Hi,

After you ssh (-Y should be enough, maybe it helps to skip -X?), what does
echo $DISPLAY
say?

Can you run
xeyes
from lxplus?

Cheers, Axel.

Hi ,

Thank you for your reply.

I got the below :

[melsawy@lxplus109 ~]$ echo $DISPLAY
./:0
[melsawy@lxplus109 ~]$ xeyes
Error: Can’t open display: ./:0
[melsawy@lxplus109 ~]$

thanks,

Mai

Hi,

Well then that’s not ROOT but something messing up your environment. Hard to tell; I’d check whether you can start an ssh session without parsing your .bashrc etc to find which file is causing it, and then check that file - it’s likely to modify the DISPLAY environment variable.

If all fails you could open a ticket with the lxplus service to ask for help, at cern.service-now.com/service-portal/

Cheers, Axel.

Hi,

I sent them the error before posting my problem here and they pointed me to contact root support. but any way i sent another ticket now with the new error i got and mush details.

thanks,

mai

Hi,

Right - we managed to prove that it’s not ROOT :slight_smile:

Axel.

When I login into lxplus the DISPLAY variable is:

$ echo $DISPLAY
localhost:35.0

And I can display correctly xclock or xeyes. Any other value of DISPLAY fails.
I tried to find out where it is defined, but none of the local shell init scripts in my home directory define it.
I guess it is done (correctly) higher up in the login procedure. Axel is right pointing you to service-now.