Table of Contents

Cygwin

How to use Cygwin/X



Idea

Package


Configuration

~/.xinitrc

I use rootless mode.

#!/bin/sh

# graphic mode
#/usr/X11R6/bin/XWin.exe -screen 0 800x600

# fullscreen
#/usr/X11R6/bin/XWin.exe -fullscreen -depth 32

# multiwindow
#/usr/X11R6/bin/XWin.exe -multiwindow

# rootless
/usr/X11R6/bin/XWin.exe -rootless


Operation

Connectiong X with ssh portfoward

$ run xwin -multiwindow -noclipboard      <-  start XWin Server
$ export DISPLAY=":0.0"
$ xhost +
$ ssh -XC USER@192.168.0.10   <-  -X : enable X11 port forwarding
                                  -C : Requests compression of all data
# xauth list
# xclock


old: Using X

cygwin

$ startxwin.exe              <-  start XWin Server
$ export DISPLAY="localhost:0.0"
$ xhost 192.168.100.5    <- Linux Server

Linux

# export DISPLAY=192.168.0.10:0.0    <- Windows
# xclock


old: Connectiong X with ssh portfoward

Before 2014

$ startxwin.exe              <-  start XWin Server
$ export DISPLAY=":0.0"
$ xhost +
$ ssh -XC USER@192.168.0.10   <-  -Y : enable X11 port forwarding
                                  -C : Requests compression of all data
# xclock


TIPS

To connect after su -

$ xauth list
localhost/unix:10 MIT-MAGIC-COOKIE-1 yyyyyyyyyyyyyyyyyyy
$ echo $DISPLAY
localhost:10.0
$ su -
# echo $DISPLAY
localhost:11.0
# export DISPLAY=localhost:11.0   <- If you have if the result of 'echo $DISPLAY' is different
# xauth add localhost/unix:11 MIT-MAGIC-COOKIE-1 yyyyyyyyyyyyyyyyyyy 
# xclock