Running Docker under Windows/cygwin environment. Ask Question Asked 3 years, 7 months ago. Active 5 months ago. Viewed 21k times 7. I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker.
Contents
- Linux
- Mac OS X
- Windows
- Connecting via the NX protocol
You can run interactive applications that have Graphical User interfaces (GUI) by connecting to the cluster login node using ssh with X11 Forwarding enabled. Your local machine must be running an X server and enable X11 forwarding in order to display graphical output.
- So basically Cygwin creates a POSIX-compliant environment for Windows. Mac is already POSIX-compliant, so if you're on Mac, you don't need Cygwin. Mac is already POSIX-compliant, so if you're on Mac, you don't need Cygwin.
- Aug 13, 2018 Edit me Introduction. Cygwin is a Unix-like environment for windows. Below are notes on how to install and setup cygwin for access to group computers.
ON UNIX-like systems, an X Window System server is generally available and running with the default installation (or can be readily installed via the OS package manager). You can enable X11 Forwarding (that is the ability to visualize GUI applications running on the cluster on your local linux box) by adding the -X flag to the ssh command you use to connect to the cluster:
Cygwin For Mac Os
ssh -X login_id@hoffman2.idre.ucla.edu
where
login_id
is replaced by your cluster user name.Alternatively, you can override the ssh default for all your sessions on the Hoffman2 cluster by creating (or adding to) a file named
config
in the $HOME/.ssh on your local machine and adding the option:Host hoffman2
Hostname=hoffman2.idre.ucla.edu
User=login_id
ForwardX11 yes
where
login_id
is replaced by your cluster user name. You can then login on the cluster as user login_id
simply issuing:ssh hoffman2
Notes for X Window System users
The X.org Foundation leads the X Window System project and its software forms the basis for all the X packages from the various linux distributions. Starting in Xorg 1.17 (running on CentOS 6.9 and 7.x; Ubuntu version 15.04 and up and other linux distributions) indirect GLX was disabled by default, to enable indirect GLX and to allow remote visualization on the cluster of applications that use OpenGL (such as Abaqus, matlab, etc.) on your linux box you will have to locate the executable file Xorg (which is located in /usr/bin in CentOS), make a copy and create a wrapper to it in which Xorg is invoked with the +iglx flag.
On CentOS this can be achieved with:
mv /usr/bin/Xorg /usr/bin/Xorg.original
echo -e '#!/usr/bin/env bashnexec /usr/bin/Xorg.original '$@' +iglx' > /usr/bin/Xorg
chmod +x /usr/bin/Xorg
chcon --type=bin_t /usr/bin/Xorg
N.B.: You will need root privileges to implement these changes.
On Ubuntu this can be achieved with:
sudo mv /usr/bin/Xorg /usr/bin/Xorg.original
and than editing
/usr/bin/Xorg
to look like: #!/bin/sh
#
# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
# This allows distros to put the suid wrapper in a separate package.
basedir=/usr/lib/xorg
if [ -x '$basedir'/Xorg.wrap ]; then
exec '$basedir'/Xorg.wrap '$@'
else
exec '$basedir'/Xorg '$@' +iglx
fi
The computer will need to be rebooted.
Google chrome for mac 10.6.8. On Mac OS X, the X windows system is called XQuartz. Mac OS X 10.5 10.6 and 10.7 installed it by default, but as of 10.8 Apple has dropped dedicated support and directs users to the open source XQuartz. You can install XQuartz from the OS distribution media or download it from https://www.xquartz.org/.
The Apple terminal application can be used to connect to the cluster. Specify -Y, not -X, in the ssh command to enable X11 Forwarding (as by default, a mac assumes that an -X connection is untrusted):
ssh -Y login_id@hoffman2.idre.ucla.edu
where
login_id
is replaced by your cluster user name. Alternatively, you can override the ssh default for your hoffman2 session creating a $HOME/ssh/config file similar to the one shown for linux logins.Notes for XQuartz users
Indirect GLX was disabled by default in Xorg 1.17, starting from XQuartz version 2.7.9, to enable indirect GLX and to allow remote visualization on the cluster you will have to issue at the terminal command prompt of your mac:
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
Note: You will need to reboot your machine before being able to open GUI applications on Hoffman2.
See About X11 and OS X Mountain Lion from http://support.apple.com/kb/HT5293. For Mac OS X 10.4 (Tiger): X11 should be installed from the OS media and manually started.
On Windows third-party software needs to be installed. Here is a list of possible choices:
- MobaXterm Enhanced terminal for Windows with X11 server, tabbed SSH client, network tools and much more. Free.
- XMing and Xming fonts X Window System Server for Microsoft. Free.
- CygwinLinux-like environment for Windows. To add Cygwin/X server, select the xinit package from the X11 category. Free.
- Xshell Commercial. www.netsarang.com
Notes for MobaXterm users
- download MobaXterm Home Edition (installer edition)
- double click on the installer and follow direction to install the package
- start mobaxterm
- navigate to the “Settings” tab a window will pop up, select the “SSH” tab and click on the “SSH keepalive” box and press OK
- select the “Session” tab, a window will pop up, select “SSH”, under Remote Host enter: hoffman2.idre.ucla.edu (you can also add your username here) click OK. You will be prompted to log on the cluster
Notes for Xming users
- You will need to install PuTTY and configure it as follows:
- start PuTTY
- enter hoffman2.idre.ucla.edu in the “Host Name (or OP address)” field
- enter hoffman2 in the “Saved Sessions” field
- expand the “SSH” menu under the “Category” field (press + sing) select X11 and click the “Enable X11 forwarding” field
- select “Session” in the “Category” field and press the “Save” button
- Double click on the Xming icon
- start putty and select the dalton Saved Session and log using your username and password
Notes for Cygwin users
If you have installed Cygwin (including the X11 packages) on your Windows system, you can use the following steps to make X11-enabled connection:
- Open a Cygwin terminal
- Enter the command:
startxwin
(this starts the X11 server on your Windows computer) - In the (graphical) window that pops up, use
ssh -X
command described above.
Alternatively you can connect to the cluster via the NX protocol. NX is a free, secure, compressed protocol for remote X Window System connections for Windows, Linux, Mac OSX, and Solaris. We currently support connecting to the Hoffman2 cluster via the NoMachine client as well as the X2Go client.