LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-29-2013, 10:53 AM   #1
mmcc0912
Member
 
Registered: Mar 2010
Posts: 37

Rep: Reputation: 0
Xserver in fedora 17, displaying from remote server.


I'm working on switching from win* to linux as my desktop at work. The only thing I'm struggling with is how I get a servers display to mine. I'd run Xserver client in win*, from cmdline of linux server, I'd export the display to my desktop and launch away.

There is -X in ssh but I find it not working after several jump boxes. I find articles to modify the Xaccess file, but I'm not finding that. I have x11-server (and other x11-packages), gdm and Xdmcp installed. Am I just missing a package or did something change from the days of Xaccess settings?

I'd prefer to continue with the method of setting access restrictions since it's now an open port, if not start/stop a service for when required. I'd like to continue to set the display on the remote machine for sending displays back. I just feel I'm missing something that I'm not terming right for google/LQ.

Thanks..
 
Old 01-29-2013, 02:30 PM   #2
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
-X pretty much works for me.

Try ssh with -Y then running the remote program from the shell prompt as you would locally. Does that work? Not a permanent solution, but something to try.
 
Old 01-29-2013, 02:32 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
As goumba said, it should be very straight forward:
Code:
$ ssh -Y server
$ program_name
 
Old 01-29-2013, 05:18 PM   #4
mmcc0912
Member
 
Registered: Mar 2010
Posts: 37

Original Poster
Rep: Reputation: 0
It doesn't when I ssh from server to server. I use -X on each one and it's not following the pathway back. I do the same thing on a win* VM and export display and it works using mochaX. I'm sure it's possible, but I can't find any Xaccess file on my fedora or how to make it to say, listen for inbound.

Thanks.
 
Old 01-29-2013, 05:24 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I don't know what this Xaccess file is that you're looking for, is this something you had to use before? I've never seen or touched that file on my systems.

Code:
$ \ssh -X server3
$ \ssh -X server4
$ \ssh -X server5
$ \ssh -X server6
$ \ssh -X server7
$ \ssh -X server8
$ emacs
works fine for me. No DISPLAY setting, nothing at all, through a chain of 6 different Linux machines running a combination of Fedora and CentOS.

Could you use ssh -v to print more debugging output? What are the error messages you get when you try to launch an X application? Perhaps you placed something in your shell startup scripts to hard-code the DISPLAY for your previous win client?
 
Old 01-30-2013, 12:37 PM   #6
mmcc0912
Member
 
Registered: Mar 2010
Posts: 37

Original Poster
Rep: Reputation: 0
Thanks for all the help, just wanted to say that first of all.

The Xaccess I'm talking about, I'm several references such as http://www.cyberciti.biz/faq/howto-l...via-the-xdmcp/.

If verbose ssh helps, I'll run that. Here's the quick snip-it without.


Code:
[mmcc0912@desktop ~]$ ssh -X me@ogismgmt1.domain.com 
me@ogismgmt1.domain.com's password: 
Last login: Wed Jan 30 10:39:38 2013 from IP
[me@ogismgmt1 ~]$ ssh -X root@oraapps1-test
Last login: Tue Jan 29 20:47:19 2013 from IP
[root@oraapps1-test ~]# xclock
Error: Can't open display: localhost:0.0
[root@oraapps1-test ~]# echo $DISPLAY
localhost:0.0
[root@oraapps1-test ~]#
There are some things that I'm just not familiar with yet, I've spent all my time without a GUI. The method has always been to export the DISPLAY and send it where I wanted to see it. Everything I can find so far is the same as above link. Maybe I'm not searching with the correct words.

Thanks.
 
Old 02-01-2013, 08:09 AM   #7
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Ok, I misread your initial question, missing the fact you're ssh-ing from one point to another.

I just tried it here, and don't have a solution, but got a slightly different message:

Code:
root@serenity:~# emacs /etc/ssh/ssh_config
X11 connection rejected because of wrong authentication.
Display localhost:10.0 unavailable, simulating -nw
I don't know what you were thinking of, but rereading your question and following posts, you mention it works fine under Win. I was thinking the problem was at the server end, but perhaps it is at the local end. I hope this suggestion is of help to you.

Did you try doing the same using -Y instead of -X, just to see if it works?

Last edited by goumba; 02-01-2013 at 08:11 AM.
 
Old 02-04-2013, 09:50 AM   #8
mmcc0912
Member
 
Registered: Mar 2010
Posts: 37

Original Poster
Rep: Reputation: 0
I did, but it doesn't make a difference.

Code:
# xclock
Error: Can't open display: 10.10.10.208:0.0
If I go to another server, look at the TCP it looks like this.

Code:
# netstat -an |grep ':600'
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:6001              127.0.0.1:32769             ESTABLISHED 
tcp        0      0 10.51.1.210:6001            10.51.1.210:35687           ESTABLISHED 
tcp        0      0 127.0.0.1:32769             127.0.0.1:6001              ESTABLISHED 
tcp        0      0 10.51.1.210:35687           10.51.1.210:6001            ESTABLISHED
But when I look at my system/desktop, I get nothing.

Code:
[root@desktop ~]# netstat -an |grep ':600'
[root@desktop ~]#
It would have to be listening in some means to to accept connections. The remote server above is a RHEL 4.8 where my system is fedora17. I setup the remote system and installed nothing special, just Xserver and gnome.

Thanks for the attention to my post. I appreciate it. I've been googling it for some time and just haven't found the how do I make X listen that's applicable.
 
Old 02-04-2013, 10:07 AM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Check the /etc/ssh/sshd_config. There should be a line in it (usually commented out):

#X11Forwarding no

This indicates that the default does not allow X windows to be forwarded to the remote user.

Uncomment (or duplicate the line, and uncomment) the line and change the "no" to "yes".

Restart the sshd server and you should be good to go.
 
Old 02-05-2013, 06:49 AM   #10
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Interesting, on my installation that comes set as yes as default.

I had missed that before, mmcc0912 in your case you're going to have to check the server config on every server along the way. Only one server having that set to "no" or commented out somewhere is going to stop you.
 
Old 02-05-2013, 09:04 AM   #11
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
In my system (Fedora 16 currently) it seems to show the default. But as it is a simple text file, it can show anything it wants. The only way to be sure (if it doesn't work) is to set it to "yes".
 
Old 02-05-2013, 10:37 AM   #12
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
I should rephrase that. On an untouched Debian install of openssh-server, the line is uncommented and explicitly states
Code:
X11Forwarding yes
.
 
Old 02-05-2013, 11:33 AM   #13
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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.

The usual offset value is 10, to skip a possible 10 locally based TCP X servers. The first port used by sshd should then be 6010... with an increment of one for each sshd that may be forwarding that users X applications. The display environment value should be "localhost:10.0" for the first ssh login forwarding windows. 11.0 for the second.

The credentials should be shown by a "xauth list", one for each key. If you are logged in remotely, with X forwarding there would normally be only one key. It is possible to get multiple keys... just login a second time through another ssh login...

The fact that you have a DISPLAY value of other than localhost:10.0 (or 127.0.0.1:10.0) implies that some login script is forcing the environment value to a wrong number. DISPLAY is one of the few variables that should not be modified except for extremely good reasons - usually related to testing.
 
Old 02-05-2013, 01:31 PM   #14
mmcc0912
Member
 
Registered: Mar 2010
Posts: 37

Original Poster
Rep: Reputation: 0
I appreciate the responses, I can forward from the server to a windows host running an Xserver (mochaX). I can't find jack on how to enable Xserver in fedora to listen so that I can send the display back to my fedora box. Well, what I do find doesn't fit the system, the files it says to modify don't exist... Either something has changed, or I don't have the right packages installed, IMHO.

Right now I'm using mochaX in a TS/rdesktop session in windows. But my desktop has several monitors and it's just a functional thing to me that I should be able to send it directly to my desktop (Linux to Linux vs. Linux to Windoze).

Thanks.
 
Old 02-05-2013, 02:12 PM   #15
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by mmcc0912 View Post
I appreciate the responses, I can forward from the server to a windows host running an Xserver (mochaX). I can't find jack on how to enable Xserver in fedora to listen so that I can send the display back to my fedora box.
It already is, there's nothing you have to do to make that happen. You should be able to install Fedora from scratch on two different machines, ssh -X from one machine to the other (assuming the sshd server is running on the destination machine), and open an X application without a problem.

As both myself and jpollard pointed out, your DISPLAY environment variable does not look correct. Are you SURE that you didn't hard-code anything in your log in scripts on the remote servers to force DISPLAY to some non-default value?

Last edited by suicidaleggroll; 02-05-2013 at 02:14 PM.
 
  


Reply



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 06: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 04:16 PM
Run remote X apps on remote Xserver trollman Linux - Desktop 5 10-08-2006 09:01 PM
Apache Server only displaying "Test" page. Fedora Core 4 Tear Syden Linux - Newbie 2 03-17-2006 07:40 PM
Displaying to a remote computer rech Slackware 2 01-06-2004 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:11 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
Open Source Consulting | Domain Registration