?
Solved

Run X from Red Hat 3

Posted on 2006-11-17
13
Medium Priority
?
1,868 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 336 total points
ID: 17985553
You will have to run XWin.exe on the windows machine from Cygwin. Download from http://x.cygwin.com/ 
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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 332 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 332 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

765 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