Solved

Run X from Red Hat 3

Posted on 2006-11-17
13
1,865 Views
Last Modified: 2013-12-27
I'm at a windows machine running Cygwin.  I want to display a machine running Red Hat 3.
I have
 1.  xhost + Red-Hat-machine
 2. ssh -l user Red-Hat-machine
3.  export DISPLAY=windows-ip:0.0
4. /usr/X11R6/bin/twm

but nothing happens.  What do i need to do to have the display showing on windows?
0
Comment
Question by:xoxomos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
  • +1
13 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 17970755
You need to use X server on windows machine, and use ssh -X, and not export DISPLAY
0
 

Author Comment

by:xoxomos
ID: 17981267
I need to run export DISPLAY on the Red Hat machine otherwise it would not know where to display would it?
0
 
LVL 58

Accepted Solution

by:
amit_g earned 84 total points
ID: 17985553
You will have to run XWin.exe on the windows machine from Cygwin. Download from http://x.cygwin.com/ 
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:xoxomos
ID: 17990173
Yes, i have cygwin and i've been trying using xinit.

xinit
xhost + linux box
ssh -l user-a linuxboxipaddress
After the ssh to the linux box, i export
export DISPLAY=windowipaddress:0.0
twm &


I'll try XWin.exe to see if that gets it.
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 83 total points
ID: 17991946
ssh -X does tunnel X protocol over SSH session. Even if ssh server rejects it does export DISPLAY for you.
0
 

Author Comment

by:xoxomos
ID: 17999653
when i try XWin.exe in the cygwin environment, i get a just grayish screen.  I can move the mouse around, but cannot enter anything from keyboard.
0
 

Author Comment

by:xoxomos
ID: 17999721
xinit
here i get a window where i can key in:
xhost + linux box
ssh -X -l user-a linuxboxipaddress
After the ssh to the linux box, i export
export DISPLAY=windowipaddress:0.0
twm &

After the twm &. a green strip appears across the top of the ssh window, but none of the RedHat GUI appears.
0
 
LVL 20

Expert Comment

by:Gns
ID: 18013944
Well, Tabbed Window Manager (twm) isn't exactly the most "visible" of window managers:-). And if there already is a window manager... it won't run.
Try running a "gnome-session" instead;-). And make sure you don't have a local window manager.... Why not work by modifying the stock startx*.sh script that comes with Cygwin?

Both amit and Andrew are correct though. Either using the magic of ssh -X, or just setting the DISPLAY on the remote, you'll need have X running first, and without a window manager (since you want to start that from the remote "server")... Easiest is to do this with ssh -X, since then you already trust the host (localhost), so don't need use any pesky "xhost + ..." or "export DISPLAY=..." ... which is kind of nice:-).

The only distro I know of that really make sure that all "supported" window managers have more or less the same menu built... is Mandriva (this is a very nice thing, since that means you'll not be particularly limted when using the less graphical window managers like twm or icewm:-). On most others, twm is ... not that nice:-). Click on the background (left, middle, right) to get the menus defined...

-- Glenn
0
 

Author Comment

by:xoxomos
ID: 18097351
Maybe twm being 'less graphical' is the issue and my expectations were too high.
I use much the same setup of Cygwin on XP when I ssh to a Solaris box and export DISPLAY to the Cygwin machine.
On Solaris I use dtwm instead of twm and the results are as expected as I get the full Solaris graphics whereas when I use dtwm from Solaris.
0
 
LVL 20

Assisted Solution

by:Gns
Gns earned 83 total points
ID: 18100167
Likely... Or, as said, you already have a "local" window manager running (and there can only be one;-) which prevent twm from running... Would likely produce a bit of error output though, so perhaps (provided you don't get that) you are right:).

Did you try the alternate method? It could eb as easy as just executing
XWin.exe &
in the cygwin bash window, then executing
export DISPLAY=:0
ssh -X -l user-a linuxboxipaddress

When on the linuxbox, the DISPLAY should already be set, so for goodness sake... don't override that.
echo $DISPLAY
should reveal something like localhost:10 ... and that is the "tunnel endpoint" you should be using.
If it is set, do
gnome-session&
... and be done;)

If it is unset, this is likely due to
1) DISPLAY not being set on the windoze box, preventing ssh -X ... from detecting it
2) sshd_conf (likely in /etc/ssh/) not allowing X11 forwarding ... Just set
X11Forwarding yes
and restart sshd, if it isn't aet already.
3) ssh_conf (on the cygwin enabled windoze machine) not allowing X11 forwarding... you should have something like
Host *
  ForwardX11 yes
  ForwardX11Trusted yes
set, if you want it by default (IIRC if this is "no", ssh -X is the override for ForwardX11, and ssh -Y is the ForwardX11Trusted one, so ... no matter... Don't change those:-).

Make sure DISPLAY gets set correctly on the remote, either by "ssh -X ..." or "ssh -Y ....", use "gnome-session"... and all your problems should be alleviated:-)

Cheers
-- Glenn
0
 

Author Comment

by:xoxomos
ID: 18105568
Hooray, they're moving this database from linux onto Solaris and it's a lot simpler to hook up Cygwin and Solaris.
Thanks everybody
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question