LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2013, 12:05 PM   #16
mmcc0912
Member
 
Registered: Mar 2010
Posts: 31

Original Poster
Rep: Reputation: 0

The only setting for display is rc.local, this is for the display manager for oracle to match and be happy. mocha software in win is default, just listens, installed it out of necessity to a VM.

I read that Xserver listens in the 600x range, the mocha is 6000 on the win box. But no listening with fedora. That's what I believe is the issue, the fedora listening for connections. I can send display to another system from this and other servers, if it's the win box.

Completely unedited, can display xclock to the win box but not fedora by telling it where to send it.


Code:
[mmcc0912@desktop scripts]$ ssh root@oraapps1-test.myorthofix.com
root@oraapps1-test.myorthofix.com's password: 
Last login: Wed Feb  6 10:49:15 2013 from 10.10.10.208
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# echo $DISPLAY
localhost:0.0
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# export DISPLAY=10.51.1.63:0.0
[root@oraapps1-test ~]# xclock &
[1] 15715
[root@oraapps1-test ~]# 
[1]+  Done                    xclock
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# export DISPLAY=10.10.10.208:0.0
[root@oraapps1-test ~]# xclock &
[1] 15792
[root@oraapps1-test ~]# Error: Can't open display: 10.10.10.208:0.0

[1]+  Exit 1                  xclock
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# 
[root@oraapps1-test ~]# exit
logout

Connection to oraapps1-test.myorthofix.com closed.
[mmcc0912@desktop scripts]$ netstat -an |grep ':600'
[mmcc0912@desktop scripts]$ 
[mmcc0912@desktop scripts]$ ifconfig
em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.208  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fe80::baac:6fff:fe9f:79c9  prefixlen 64  scopeid 0x20<link>
        ether b8:ac:6f:9f:79:c9  txqueuelen 1000  (Ethernet)
        RX packets 60841041  bytes 11384050020 (10.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 91429107  bytes 104445234428 (97.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 21  memory 0xf7fe0000-f8000000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 1654729  bytes 862840213 (822.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1654729  bytes 862840213 (822.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[mmcc0912@desktop scripts]$
 
Old 02-06-2013, 12:17 PM   #17
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
That's not how you use X forwarding through SSH. You don't "push" the display to some random IP with a listening X server. As jpollard said:

Quote:
Originally Posted by jpollard View Post
sshd creates the X forwarding by opening a TCP port (6000+offset specified from sshd config file+increment to find unused port). That port is then passed to the X clients using the DISPLAY environment variable (value is localhost:<port-6000>.0). Any other value causes an access failure due to improper credentials.
DISPLAY should be set automatically when you run ssh -X (or ssh -Y) to localhost:<port-6000>.0. You do not force it to anything. You mentioned that rc.local is modifying display, how so? An example of how it should look:
Code:
$ netstat -an | grep ':600'
$ \ssh -X server7
$ echo $DISPLAY
localhost:131.0
$ emacs &
[1] 2958
$
And how you're using it:
Code:
$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:30:48:D4:A4:58  
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::230:48ff:fed4:a458/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11327048 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9973211 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6765478122 (6.3 GiB)  TX bytes:4906091693 (4.5 GiB)
          Interrupt:16 Memory:c0100000-c0120000 

$ \ssh -X server7
$ echo $DISPLAY
localhost:131.0
$ export DISPLAY=192.168.1.102:0.0
$ xemacs

Gui error: X server not responding
, "192.168.1.102:0.0"
$

Can you get it to work if you ssh to yourself?
Code:
$ echo $DISPLAY
:0.0
$ \ssh -X localhost
$ echo $DISPLAY
localhost:10.0
$ xemacs &
[1] 1903
$

Last edited by suicidaleggroll; 02-06-2013 at 12:28 PM.
 
Old 02-07-2013, 10:49 AM   #18
mmcc0912
Member
 
Registered: Mar 2010
Posts: 31

Original Poster
Rep: Reputation: 0
Maybe this is one thing that I'm trying to say, I'm not trying to use ssh as the vehicle. All the years (few beit) that I've been in Linux, I've always connected via ssh, exported display to a host (windows w/ X software) and sent the display back to myself. I wanted to ask at large how to use the same functionality within Linux to send the display back, it was the original desire to continue working it the same way.

Yes, I can ssh to localhost and run, but I have the desire to get out of windows. I can make a Linux node display to windows host, but not back to another Linux host.
 
Old 02-07-2013, 10:59 AM   #19
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Well unfortunately you've been doing it wrong. The way you've been working is insecure, error-prone, labor-intensive, and only works when connecting between machines on the same local network or when you have a public IP. Perhaps instead of trying to force Linux to do it the wrong way, you should start learning how to do it the right way?

Since the X connection works properly when you ssh to yourself, that means you're using it correctly. So again, the problem comes down to a misconfiguration on the server.
 
Old 02-07-2013, 09:59 PM   #20
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Besides being insecure, the configuration and use of the display manager disable TCP connections because it is insecure.

X by default doesn't use TCP.

And until the use of encrypted TCP based X connections is restored (I believe it is being worked on), X will remain insecure over TCP. It passes the connection authorization in plaintext, and the usual authorization is just an long password, so it is as bad as using unencrypted passwords anywhere else.
 
Old 02-08-2013, 11:40 AM   #21
mmcc0912
Member
 
Registered: Mar 2010
Posts: 31

Original Poster
Rep: Reputation: 0
OK, well, I didn't know that it was insecure. I can see with public access how that can be, yes. But it's all internal. It's worked well for years, just exporting out to send the display out if you needed a GUI on a run-level 3 box. Nothing much really to it.

Yes, if there is a better way, I'm all for it. I'm not seasoned on Linux, converted win guy... But I do learn regularly.

Thanks everyone for banging me through it. It is greatly appreciated.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying 2 XServer simultaneously hupfdule Linux - Hardware 1 09-12-2012 07:49 AM
Why can't I open another Xserver on VT7 to 8 in Fedora 10 to start a remote x session Sm1ler Linux - General 4 05-28-2009 05:16 PM
Run remote X apps on remote Xserver trollman Linux - Desktop 5 10-08-2006 10:01 PM
Apache Server only displaying "Test" page. Fedora Core 4 Tear Syden Linux - Newbie 2 03-17-2006 08:40 PM
Displaying to a remote computer rech Slackware 2 01-06-2004 02:23 PM


All times are GMT -5. The time now is 12:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration