Discussion:
[SLE] unable to run remote X-apps, can't open display
Long Fei
2005-04-08 14:58:33 UTC
Permalink
I am running SUSE 9.2. I did in the standard way:

my_local_host: xhost +
ssh remote_host
[bash] export DISPLAY=my_local_host:0.0
xterm

it gives me this message:
xterm Xt error: Can't open display: my_local_host:0

does anyone have a solution ? did you experience this before ?

thanks,
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Anders Johansson
2005-04-08 15:04:21 UTC
Permalink
Post by Long Fei
my_local_host: xhost +
ssh remote_host
[bash] export DISPLAY=my_local_host:0.0
xterm
xterm Xt error: Can't open display: my_local_host:0
does anyone have a solution ? did you experience this before ?
ssh -X remote_host
xterm

By default, 9.2 will refuse remote X connections, but you don't need that
since it's a functionality built into ssh
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Stan Glasoe
2005-04-08 15:12:24 UTC
Permalink
Post by Long Fei
my_local_host: xhost +
ssh remote_host
[bash] export DISPLAY=my_local_host:0.0
xterm
xterm Xt error: Can't open display: my_local_host:0
does anyone have a solution ? did you experience this before ?
thanks,
Use 'ssh -X remote_host'.

Stan
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Long Fei
2005-04-10 15:56:43 UTC
Permalink
that doesn't solve the whole problem. I use scripts to start remote
X-based programs, and pass them with DISPLAY=my_local_host:0 such that
when they start, they can start a window at my local host.

I wonder if there is a way to make SUSE allow remote X11 data.

thanks,
--Long
Post by Stan Glasoe
Post by Long Fei
my_local_host: xhost +
ssh remote_host
[bash] export DISPLAY=my_local_host:0.0
xterm
xterm Xt error: Can't open display: my_local_host:0
does anyone have a solution ? did you experience this before ?
thanks,
Use 'ssh -X remote_host'.
Stan
--
Check the headers for your unsubscription address
Also check the archives at http://lists.suse.com
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Ken Schneider
2005-04-10 18:03:41 UTC
Permalink
Post by Long Fei
that doesn't solve the whole problem. I use scripts to start remote
X-based programs, and pass them with DISPLAY=my_local_host:0 such that
when they start, they can start a window at my local host.
I wonder if there is a way to make SUSE allow remote X11 data.
thanks,
--Long
Post by Stan Glasoe
Use 'ssh -X remote_host'.
This is the answer that was given to you previously.

Use ssh -X to connect to the remote host and you will be able to run
your "X" apps locally. With this there is NO need to pass the DISPLAY
variable (it is NOT needed) and that is probably what is making your
programs not work.
--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998

"The day Microsoft makes something that doesn't suck is probably
the day they start making vacuum cleaners." -Ernst Jan Plugge
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Michael Kershaw
2005-04-11 18:43:36 UTC
Permalink
first off, which window manager do you use? are you kicking off X
with startx? your most likely going to need to vi /usr/bin/startx &
at this line "defaultserverargs="-nolisten tcp -br" , your going to
want to remove the -nolisten tcp -br and restart your Xsession. then
go about your normal business and you should be good to go! let me
know if this helps ya out!

MikeK.
Post by Long Fei
that doesn't solve the whole problem. I use scripts to start remote
X-based programs, and pass them with DISPLAY=my_local_host:0 such that
when they start, they can start a window at my local host.
I wonder if there is a way to make SUSE allow remote X11 data.
thanks,
--Long
Post by Stan Glasoe
Post by Long Fei
my_local_host: xhost +
ssh remote_host
[bash] export DISPLAY=my_local_host:0.0
xterm
xterm Xt error: Can't open display: my_local_host:0
does anyone have a solution ? did you experience this before ?
thanks,
Use 'ssh -X remote_host'.
Stan
--
Check the headers for your unsubscription address
Also check the archives at http://lists.suse.com
--
Check the headers for your unsubscription address
Also check the archives at http://lists.suse.com
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Aldrik KLEBER
2005-04-11 08:34:45 UTC
Permalink
Post by Long Fei
my_local_host: xhost +
ssh remote_host
[bash] export DISPLAY=my_local_host:0.0
xterm
xterm Xt error: Can't open display: my_local_host:0
does anyone have a solution ? did you experience this before ?
thanks,
If you try to launch the X program after a su command, you have to check if
xauth propagate the authorization.

For exemple you connect through ssh with user1 login

YaST2
-> crash
cat /home/user1/.Xauthority > /root/.Xauthority
YaST2
-> All is well



You know where is the problem

If you are in this situation to solve it

Check your /etc/pam.d/su have xauth loaded inside, this is my configuration
with xauth for su :

#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_unix2.so nullok #set_secrpc
account required pam_unix2.so
password required pam_pwcheck.so nullok
password required pam_unix2.so nullok use_first_pass use_authtok
#session required pam_homecheck.so
session required pam_xauth.so
session required pam_unix2.so debug # none or trace
Ken Schneider
2005-04-11 11:24:56 UTC
Permalink
Post by Aldrik KLEBER
Post by Long Fei
my_local_host: xhost +
ssh remote_host
Use ssh -X remote_host instead.
Post by Aldrik KLEBER
Post by Long Fei
[bash] export DISPLAY=my_local_host:0.0
Not needed anymore.
Post by Aldrik KLEBER
Post by Long Fei
xterm
xterm Xt error: Can't open display: my_local_host:0
does anyone have a solution ? did you experience this before ?
thanks,
If you try to launch the X program after a su command, you have to check if
xauth propagate the authorization.
That's why you use sux instead.
Post by Aldrik KLEBER
For exemple you connect through ssh with user1 login
YaST2
-> crash
cat /home/user1/.Xauthority > /root/.Xauthority
YaST2
-> All is well
You know where is the problem
Use the sux command -not- just su.

This is the "new, more secure" way of connecting to remote hosts.
--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998

"The day Microsoft makes something that doesn't suck is probably
the day they start making vacuum cleaners." -Ernst Jan Plugge
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Aldrik KLEBER
2005-04-11 14:25:48 UTC
Permalink
Post by Ken Schneider
Use the sux command -not- just su.
Wonderful !! I didn't know this command ! Thank you very much !
Anders Johansson
2005-04-11 18:32:26 UTC
Permalink
Post by Aldrik KLEBER
Post by Ken Schneider
Use the sux command -not- just su.
Wonderful !! I didn't know this command ! Thank you very much !
Note that sux is removed in 9.3. In 9.3, root is able to run graphical
programs with a normal 'su'
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-***@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-***@suse.com
Continue reading on narkive:
Loading...