[ale] Using Cygwin as X11 emulator on Windows

Lightner, Jeff JLightner at dsservices.com
Fri Apr 18 09:30:57 EDT 2014


X11:

My company provided Laptop is running Windows 7.   On occasion I want to see X-Windows from various UNIX/Linux servers on my Windows desktop.   That requires an X emulator on Windows.   There are commercials one (e.g. Exceed from OpenConnect/Hummingbird) but with Cygwin's X11 you can do it for free.

So when I first install Cygwin using its setup.exe - Select Packages screen appears
Multiple packages are selected by default.   Additionally I selected/deselected (with the X1ll below being the important part):
Category:       Package
Doc             cygwin-x-doc: Cygwin/X-specific documentation
Net             bind: DNS utilities suite
                rsync:
                whois: GNU whois
Shells          dash:- DESELECTED this one out of defaults
                xterm:
Utils           bc
Web             curl
                links
                lynx
                wget
X11             X-start-menu-icons: Start menu icons for Cygwin/X programs
                xinit

Create Icons screen appears at end of install.
Selected Create icon on Desktop and Add icon to Start Menu.
Below those it shows Installation Complete.
Clicked Finish.

After the install completed it put a Cygwin Terminal icon on desktop.
It created Xwin Server in Start menu - sent that to Desktop to create shortcut
there.  Verified I could open xterm windown from a Linux server to my desktop.

Found that launch of Xwin (Cygwin/X) puts two icons in task bar - one for
Xwin itself and the other with "~" which is apparently xterm (based on
Windows Task Manager running processes).  Clicking on either shows the open
Xterm.

Here we use PuTTY for most of our terminal sessions into UNIX/Linux.  In PuTTY settings:
In left pane Expand "Connection" then "SSH" then select "X11".
In right pane click (put a check mark in) the box next to "Enable X11 forwarding".
(This is the equivalent to doing "ssh -X" from command line in UNIX/Linux).
Save the settings or open the window.

On login it will create a ".Xauthority" file in your home directory and will set the DISPLAY variable.
Note that the DISPLAY variable is relative to the server (localhost) rather than using the IP/hostname of your Windows workstation.   This is because it will be sending the traffic back over your already established ssh tunnel (usually port 22) rather than attempting to open a new session in port 6000 range.   (This also means you do not need to muck with xhost command.)

Typically I run "xterm" in the PuTTY session to the UNIX/Linux host after login verify is working because that is a simple X-Window.   Most of the tools I'm using X for are fairly complex and doing the xterm rules out X as being the issue if they don't open.







-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Jeff Layton
Sent: Friday, April 18, 2014 7:18 AM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] [OT] Cygwin and mounted drives

Jeff,

Can you talk about how you use X11 on Windows? I'm interested in that.

BTW - I'll also try sshfs from cygwin at some point (good idea). I also like the nfs idea (I will try that too). I did get things working (see other email) but I'm not sure why (I'll call it a "Windows thing").

Thanks!

Jeff

> I do use Cygwin but mainly for its X11 for X-Windows from UNIX/Linux back to my Windows 7 laptop and haven't used sshfs with it.
>
> Since Cygwin is nearly the same as a full distro with many packages available it may actually include sshfs in its repository.   If you run the "setup.exe" that came with your Cygwin install you can expand the various areas it has to see what is available for install.  If so you might be able to mount the sshfs directly under Cygwin.
>
> Another idea would be to use nfs unless you're married to the idea of sshfs (which you might be due it being more secure).
>
> What does "df -hP" show when you're in the Cygwin terminal?
>
>
>
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo




Athena(r), Created for the Cause(tm)
Making a Difference in the Fight Against Breast Cancer

---------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------




More information about the Ale mailing list