[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Run X from Red Hat 3

Posted on 2006-11-17
13
Medium Priority
?
1,871 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
  • 6
  • 2
  • 2
  • +1
11 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

831 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