LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-08-2009, 03:51 PM   #1
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Rep: Reputation: 30
Export DISPLAY Back to FreeNX Server [CentOS 5.3]


Hello,

I set up FreeNX on one of my Linux boxes today running CentOS 5.3. I am using NX Client for Windows to connect to this machine. For the most part, everything seems to be running nicely and surprisingly fast.

However, when I connect to the FreeNX server, then ssh to another server, I cannot export my DISPLAY back to the FreeNX server. Is there a way to get this to work? I have confirmed that if I'm physically at the box, I can ssh and export my DISPLAY back without an issue, it only seems to be when I'm connected to FreeNX.

Example of what I've tried:

Code:
[on FreeNX server]
(The title bar describes this session as chryzmo@servername:1000)
$ xhost +
access control disabled, clients can connect from any host
$ echo $DISPLAY 
:1000.0

$ssh secondbox
chryzmo@secondbox's password: 
$ export DISPLAY=10.0.0.88:1000.0
$ xterm
(There is a 5-10 second pause here)
xterm Xt error: Can't open display: 10.0.0.88:1000.0
Does anyone know if there is a way to export your DISPLAY back to a FreeNX server?

Thanks,
chryzmo
 
Old 04-09-2009, 09:19 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 777Reputation: 777Reputation: 777Reputation: 777Reputation: 777Reputation: 777Reputation: 777
Don't use xhost if you have ssh. It is very insecure. Instead use ssh forwarding instead.

When you open the connection do "ssh -x host" instead of just "ssh host". This sets the DISPLAY to vi a special value on localhost and that value is then used to push the X traffic back over your ssh connection (which is secure).

Also make sure you aren't setting DISPLAY value in your bashrc, bashprofile etc... as it will override the DISPLAY the ssh forwarding is trying to use. With this you no longer need to use xhost on server to allow traffic as X never sees that the traffic is going anywhere but to the local server.

Type "man ssh" for more details.

Also note that this setting only applies for the user you logged in as. If you su to another user (e.g. "su -" to become root) the new user doesn't inherit. You just need to manually set DISPLAY for new user to same as original then set variable XAUTHORITY=<homedir_of_original_user>/.Xauthority. For any user other than root you'd also have to change permissions of the .Xauthority file as only the original user can read it.
 
Old 04-09-2009, 09:57 AM   #3
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
Thank you for your response. Normally I would not use xhost +, I was just getting frustrated that I could not get this working. I was attempting to limit possible causes of the issue.

It turns out that in /etc/nxserver/node.conf there is a line:
#AGENT_EXTRA_OPTIONS_X="-no-tcp"
change this to
AGENT_EXTRA_OPTIONS_X=""

Then restart the freenx-server and X forwarding should work. My problem was assuming that because it was commented out, there was a different default.
 
  


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
What is the difference between DISPLAY= and export DISPLAY=?? john test Linux - Newbie 4 09-01-2008 06:41 PM
Problem with Starting FreeNX. Followed Guide. Centos. Dont think GNOME is running. CrewXp Linux - Software 5 08-14-2007 02:04 AM
Installing FreeNX on Centos, quick question. CrewXp Linux - Software 5 08-13-2007 01:04 PM
how to export the display bruse Linux - Networking 18 05-03-2005 09:13 PM
kino 0.7.5 won't export back to camcorder tvphil Linux - Software 0 04-14-2005 09:48 PM


All times are GMT -5. The time now is 09:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration