INSTALLING CYGWIN-X WITH THE
INTENTION OF RUNNING
University
of
Step 1: Install cygwin-x
Go to http://cygwin.com/setup.exe
The default
packages are NOT ENOUGH. you must click certain
packages in order to get the minimum stuff you need to run mentor.
Here are the bare necessities!!!
Under
X11 -
X-startup-scripts
xorg-x11-base
xorg-x11-bin
xorg-x11-bin-dlls
xorg-x11-fenc
xorg-x11-fnts
xorg-x11-xwin
xterm
Under
Net -
openssh
inetutils
openssl
Under
Admin -
cygrunsrv
Under
Base –
This should have every box checked
Under
lib (everything that is by default included LEAVE included!!)
crypt
openssl
zlib (if it's not already selected)
Under util
ccrypt
cygutils
Any less than these essentials will lead to mentor
not working at all or something else not working!!!!!!!!!!
After they
have installed select NOT to
put a shortcut or a start menu. The reason being we are not going to use their
shortcuts.
Step 2: Starting cygwin-x
Go to your desktop, right click, go to new and new shortcut.
Then make a shortcut to
C:\cygwin\usr\X11R6\bin\startxwin.bat
Right click on the new .bat shortcut and click "edit"
Insert these 2 lines if they are not already
SET CYGWIN_ROOT=\cygwin
SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
Save the
changes and then try it out. Double click on the startxwin.bat
and it should open up a BASH xterm. If you use SSH
Secure Shell Client, you may wish to not to have that xterm
pop up and to instead just use it to start your xwindows
session. If this is the case then go back into startxwin
and delete “xterm” command that opens the window.
It’s
important to understand what exactly CYGWIN-X does for you. It opens up an X11
connection that you can use through SSH, Telnet or wherever to remotely run
other X11 programs.
When you
double click on startxwin.bat… no matter what you
should see a x down in your task bar. If you see it, you are all good. If not, you
screwed something up and you should re-read this document thoroughly and make
sure you installed everything you need from step 1.
Step 3: Understanding how
to use SSH with X11 port forwarding
This is an easy step but still important none-the-less.
If you are using the SSH-Secure Shell on windows, you will have to go in to Settings – Tunneling and click on “Tunneling X11 Connections.”
Otherwise if you are using openssh from your xterm window that opens after you execute startxwin.bat… you use this:
ssh -X username@linuxmachine.cs.wisc.edu
For instance if I am using one of the tux machines I would do
ssh -X myname@tux24.cs.wisc.edu
Now, whatever the option before, do this: Type “emacs,” and instead of getting the text-based version, you will get an X11 connection from the remote machine with the real GUI interface of emacs. If this didn’t work and you got the text-based version, you might not have enabled X11 port forwarding correctly. Go back in and make sure the settings saved when you checked the X11 port forwarding box.
Otherwise, if you get errors at this point – it’s something you did somewhere back there.
Step 4: Installing mentor
fonts
For most applications, we would now be ready to go. But mentor is annoying and uses their own fonts that we have to install. It’s a real pain.
The way to get this done is to download this file... http://www.cs.wisc.edu/~dipiazza/mgc.zip
Run this, extract into C:\cygwin\usr\X11R6\lib\X11\fonts. This should make a folder
C:\cygwin\usr\X11R6\lib\X11\fonts\mgc_fonts_b4_dos
Now, here’s
the hard part.
LOCALLY (on your own machine!!! not through
SSH remotely!!!)
Run this sequence of commands:
mkfontdir /usr/X11R6/lib/X11/fonts/mgc_fonts_b4_dos
xset fp default
chmod
ugo+r /usr/X11R6/lib/X11/fonts/mgc_fonts_b4_dos
xset +fp
/usr/X11R6/lib/X11/fonts/mgc_fonts_b4_dos
This should
complete the font installation. Close everything including the X connection by
clicking on the X in the task bar and clicking close.
Run a new startxwin, and ssh
into a linux machine on campus. Type da and you should see the window pop up.
*****Finally,
so in the future the font is loaded correctly, we go back into the startxwin.bat and add another line:
run xset +fp
/usr/X11R6/lib/X11/fonts/mgc_fonts_b4_dos
If you
don’t do this, when you turn off your computer, the fonts will not be available
next time.
Any problems? Contact me at dipiazza@cs.wisc.edu