Redian新闻
>
关于X 窗口的问题 ( setenv DISPLAY ... )
avatar
关于X 窗口的问题 ( setenv DISPLAY ... )# Unix - 噫吁兮,危乎高哉
r*e
1
as you know, when I need to remotely use graphics software of UNIX, we need:
1) xhost+
2) setenv DISPLAY XX.XX.XX.XX:0.0
My tough question is: Is that possible to set the local port other than
0.0? ( I am not sure is 0.0 the port number? )
I am using a Router to connect internet, and there are two PCs need to run
Emacs at home. However, I can only transfer one port service to only one
PC...
So, is that possible?
Thanks !
avatar
m*e
2

bad idea. should use xauth instead.
if it's xx.xx.xx.xx:n, then the port number is 6000+n.

【在 r*e 的大作中提到】
: as you know, when I need to remotely use graphics software of UNIX, we need:
: 1) xhost+
: 2) setenv DISPLAY XX.XX.XX.XX:0.0
: My tough question is: Is that possible to set the local port other than
: 0.0? ( I am not sure is 0.0 the port number? )
: I am using a Router to connect internet, and there are two PCs need to run
: Emacs at home. However, I can only transfer one port service to only one
: PC...
: So, is that possible?
: Thanks !

avatar
r*e
3

Thanks , then can I use port other than 6000?

【在 m*****e 的大作中提到】
:
: bad idea. should use xauth instead.
: if it's xx.xx.xx.xx:n, then the port number is 6000+n.

avatar
m*e
4
I don't quite understand your question. What's the OS of your PC?
You connect from where to where? What's your problem with port number?

【在 r*e 的大作中提到】
:
: Thanks , then can I use port other than 6000?

avatar
s*t
5
the easiest, and secure, way to forward X display is to use ssh.
just run X server on your local machine, say eXceed for Windows,
enable X forwarding in ssh and you're readay to go.
don't use xhost+ and setenv DISPLAY, it's not secure.

【在 r*e 的大作中提到】
: as you know, when I need to remotely use graphics software of UNIX, we need:
: 1) xhost+
: 2) setenv DISPLAY XX.XX.XX.XX:0.0
: My tough question is: Is that possible to set the local port other than
: 0.0? ( I am not sure is 0.0 the port number? )
: I am using a Router to connect internet, and there are two PCs need to run
: Emacs at home. However, I can only transfer one port service to only one
: PC...
: So, is that possible?
: Thanks !

avatar
r*e
6
sorry for the confusion :P
I am using Win2000, and I am tring to connect to a UNIX server to run
Emacs. As you know, I need to use setenv Disply ..... after I loginto
the UNIX server.
Since I use Router, my current IP address is not a real one and I have
to use 'Forwarding' funciton of that Router. However, the rounter can only
set a range of ports to one PC. that means I can't just simply use one
port , say 6000 for both PCs. And that's why I am persistly asking you
If I can use other port f

【在 m*****e 的大作中提到】
: I don't quite understand your question. What's the OS of your PC?
: You connect from where to where? What's your problem with port number?

avatar
r*e
7

Exceed does use XX.XX.XX.XX:0.0 , I just checked.
And I used SSH too. but.... doesnt' work

【在 s***t 的大作中提到】
: the easiest, and secure, way to forward X display is to use ssh.
: just run X server on your local machine, say eXceed for Windows,
: enable X forwarding in ssh and you're readay to go.
: don't use xhost+ and setenv DISPLAY, it's not secure.

avatar
m*e
8

Oh I see. You can use 6000 for one and 6050 for the other, for example.
Just configure one of your x server to use display number 0 and the other
50, and you are set.
Does the UNIX server directly connect to the router? Otherwise you still
can't run X server since you are behind a router.

【在 r*e 的大作中提到】
: sorry for the confusion :P
: I am using Win2000, and I am tring to connect to a UNIX server to run
: Emacs. As you know, I need to use setenv Disply ..... after I loginto
: the UNIX server.
: Since I use Router, my current IP address is not a real one and I have
: to use 'Forwarding' funciton of that Router. However, the rounter can only
: set a range of ports to one PC. that means I can't just simply use one
: port , say 6000 for both PCs. And that's why I am persistly asking you
: If I can use other port f

avatar
s*t
9

did you enable X forwarding? if you are using F-secure SSH,
the default is disabled. check it.
SSH will negotiate a secure port with the server.

【在 r*e 的大作中提到】
:
: Exceed does use XX.XX.XX.XX:0.0 , I just checked.
: And I used SSH too. but.... doesnt' work

avatar
r*e
10

Thanks ! I will try .
I think UNIX server can connect to the router, since the router has one
real IP address. Anyway , let me try it first.
Thanks a lot!

【在 m*****e 的大作中提到】
:
: Oh I see. You can use 6000 for one and 6050 for the other, for example.
: Just configure one of your x server to use display number 0 and the other
: 50, and you are set.
: Does the UNIX server directly connect to the router? Otherwise you still
: can't run X server since you are behind a router.

avatar
m*e
11
And there is no point of xhost here, since it only affects the Unix server,
not his home PCs.

【在 s***t 的大作中提到】
: the easiest, and secure, way to forward X display is to use ssh.
: just run X server on your local machine, say eXceed for Windows,
: enable X forwarding in ssh and you're readay to go.
: don't use xhost+ and setenv DISPLAY, it's not secure.

avatar
m*e
12
I am curious about how this router forwarding works. What's the IP address
in your setenv? The router's or your PC's? If the former, then there should
be a mapping from the router's ports to your PC's ports. If the latter, then
the routing table on the Unix server has to have an entry for that router.
What I don't understand is, why you have to use two unique port numbers
for your two PCs. In either case I presumed it doesn't make much sense..

【在 r*e 的大作中提到】
:
: Thanks ! I will try .
: I think UNIX server can connect to the router, since the router has one
: real IP address. Anyway , let me try it first.
: Thanks a lot!

avatar
r*e
13
I just tried , it seems port 6050 doesn't work :(
My router is LinkSys's, and I need to use the router's IP address , which
is detectable for outside internet. my PC's IP address is only useful with
the LAN.
The reason I need find two different ports for displaying is that the forwading
function can only assign some ports uniquely to one single PC within the LAN,
i.e., if I set port 6000 to PC 1, then PC 2 can never use this port and can't
run emacs at home either. That is so stupid.
Fortunely,

【在 m*****e 的大作中提到】
: I am curious about how this router forwarding works. What's the IP address
: in your setenv? The router's or your PC's? If the former, then there should
: be a mapping from the router's ports to your PC's ports. If the latter, then
: the routing table on the Unix server has to have an entry for that router.
: What I don't understand is, why you have to use two unique port numbers
: for your two PCs. In either case I presumed it doesn't make much sense..

avatar
a*s
14
It saids you just check the X tunnel in "SSH Secure Shell" and next
login , you can run X program to your local box.
But, you must use SSH 2.0 protocol, under 2.0 will not support.
Try ssh -V ?
avatar
m*e
15

not true.

【在 a***s 的大作中提到】
: It saids you just check the X tunnel in "SSH Secure Shell" and next
: login , you can run X program to your local box.
: But, you must use SSH 2.0 protocol, under 2.0 will not support.
: Try ssh -V ?

avatar
s*t
16
both ssh1 and ssh2 support secure X forwarding. but ssh2 is not
a free software.

【在 a***s 的大作中提到】
: It saids you just check the X tunnel in "SSH Secure Shell" and next
: login , you can run X program to your local box.
: But, you must use SSH 2.0 protocol, under 2.0 will not support.
: Try ssh -V ?

avatar
a*s
17
I know Im wrong.
Just man it on my bsd box:
said:
....The DISPLAY value set by ssh will point to the server
machine...
It means you connect with evn DISPLAY , the sshd will use
xauth to spool
X tunnel, but I got a "Warning: Remote host denied X11
forwarding." when use
a Cygwin with X, and got no such warning from WinSSH client
and X11 apps are
not working alright.

【在 s***t 的大作中提到】
: both ssh1 and ssh2 support secure X forwarding. but ssh2 is not
: a free software.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。