Running X from a windows desktop

Posted by: tahir

Running X from a windows desktop - 28/06/2006 10:41

How do I do that? We have terminal emulation software that we use for the command line and the text based app that we run on our (RedHat) Linux server but it doesn't do X windows.
Posted by: tonyc

Re: Running X from a windows desktop - 28/06/2006 10:45

Install Cygwin and install the xorg-x11-* packages.

More info here.
Posted by: tahir

Re: Running X from a windows desktop - 28/06/2006 11:05

Thanks Tony, will do.
Posted by: DWallach

Re: Running X from a windows desktop - 28/06/2006 14:52

I used to run X-Win32, a commercial X server, but it didn't deal very well with cut and paste. Now I'm running Cygwin, where cut-and-paste works fine, but emacs seems to have problems. The window comes up fine but whenever I try to do anything, I get this:
Quote:
X protocol error: BadAccess (attempt to access private resource denied) on protocol request 102

If I try running Netscape, I get this:
Quote:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 73 (X_GetImage)
Resource id in failed request: 0x3a
Serial number of failed request: 121
Current serial number in output stream: 121

For what it's worth, traditional Athena-widget apps seem to work just fine. I don't really need much more than xterms, so I haven't dug much deeper, but if somebody here knows a magic solution, that would be good.

Sundry details (xdpyinfo output, also note that the X connection is being tunneled through ssh):

Quote:
name of display: localhost:25.0
version number: 11.0
vendor string: The Cygwin/X Project
vendor release number: 60802000
maximum request size: 16777212 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 15, bits_per_pixel 16, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0xa0000e, revert to PointerRoot
number of extensions: 3
BIG-REQUESTS
LBX
XC-MISC
default screen number: 0
number of screens: 1

screen #0:
dimensions: 1920x1200 pixels (650x406 millimeters)
resolution: 75x75 dots per inch
depths (7): 24, 1, 4, 8, 15, 16, 32
root window id: 0x3a
depth of root window: 24 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x20
default number of colormap cells: 256
preallocated pixels: black 0, white 16777215
options: backing-store NO, save-unders NO
largest cursor: 32x32
current input event mask: 0x4a0004
ButtonPressMask StructureNotifyMask SubstructureNotifyMask
PropertyChangeMask
number of visuals: 4
default visual id: 0x22
visual:
visual id: 0x22
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x23
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x24
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x25
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
Posted by: tahir

Re: Running X from a windows desktop - 28/06/2006 15:04

Haven't really got very far with this so far. Just getting a blank fullscreen desktop when I run startxwin.bat

Will post again when I've managed to figure out what I'm doing.
Posted by: tahir

Re: Running X from a windows desktop - 28/06/2006 15:09

And a blank white box with a $ prompt if I run startx from the cygwin command line.
Posted by: tahir

Re: Running X from a windows desktop - 28/06/2006 15:26

Quote:
And a blank white box with a $ prompt if I run startx from the cygwin command line.


I'm assuming that I need to type something in this box to connect to the Linux server, no idea what though...

(sorry guys)
Posted by: RobotCaleb

Re: Running X from a windows desktop - 28/06/2006 17:55

Are you trying to do a remote desktop thing or run X apps locally?
Posted by: DWallach

Re: Running X from a windows desktop - 28/06/2006 18:20

That blank white box is probably an xterm, and the $ is your shell prompt. From there, you could ssh to your Linux box or whatever else. If you use ssh -X, then it will forward the X server connection from the remote box to your local machine.
Posted by: wfaulk

Re: Running X from a windows desktop - 28/06/2006 18:36

Exactly, What is it that you're trying to do with a Windows-based X Server?
Posted by: tahir

Re: Running X from a windows desktop - 29/06/2006 09:24

Quote:
Are you trying to do a remote desktop thing or run X apps locally?


Remote desktop. The terminal emulation app we have is text based only.
Posted by: tahir

Re: Running X from a windows desktop - 29/06/2006 09:28

Quote:
If you use ssh -X, then it will forward the X server connection from the remote box to your local machine.


Tried ssh -X:

$ ssh -X
9 [main] ? (1876) C:\cygwin\bin\bash.exe: *** fatal error - couldn't allocate heap, Win32 error 487, base 0x480000, top 0x4A0000, reserve_size 126976, allocsize 131072, page_const 4096
11 [main] bash 2476 child_copy: stack write copy failed, 0x22E980..0x230000, done 0, windows pid 2287796, Win32 error 5
bash: fork: No error
Posted by: tahir

Re: Running X from a windows desktop - 29/06/2006 12:54

Just managed to connect via VNC. I think it's doing what I want, thanks guys.
Posted by: tahir

Re: Running X from a windows desktop - 29/06/2006 13:21

Flipping hell, it's an exciting world the X one, got OpenOffice pre-installed (which I didn't know) and there's even a pretty decent text editor (gedit).

This'll make my Linux a lot easier.
Posted by: wfaulk

Re: Running X from a windows desktop - 29/06/2006 13:33

Quote:
Quote:
Are you trying to do a remote desktop thing or run X apps locally?

Remote desktop. The terminal emulation app we have is text based only.

X isn't designed for remote desktop. It can display individual applications on a remote computer. If the application you want to see is called "myapp", you can run "ssh -X unixhost myapp" and it will display the app on your local X server.

If all you're interested in is the one app, I'd say VNC is probably overkill, but you could give both a shot and see which works better for you.
Posted by: tahir

Re: Running X from a windows desktop - 29/06/2006 14:09

Quote:
I'd say VNC is probably overkill, but you could give both a shot and see which works better for you.


I'm running VNC now and I'm very happy with it.