Blogbody Rotating Header Image

Cygwin/X notes

While OS X is the best option for a nice development environment that has a great shell, a good UI, and full X support, sometimes you don’t have access to a Mac. Enter: Cygwin.

Just grab the installer, make sure you get the X Windows packages (grab all the window managers just to have them, including openbox, fvwm2, windowmaker, and twm).

Next, decide if you want your X environment to be integrated in to Windows XP or not. If you do, edit c:\cygwin\usr\X11R6\bin\startxwin.bat and change -multiwindow to -fullscreen or -screen options. If you remove -multiwindow, you also need to launch a window manager (look near the end of the file). I prefer WindowMaker (wmaker) personally.

Finally, I do a few tweaks that make my environment a little nicer:

Edit ~/.Xdefaults to give a nice xterm UI:
XTerm*scrollBar: true
XTerm*background: Black
XTerm*foreground: Green

Edit ~/.basrc to make bash a little nicer:
export PS1=”[\W]\$ “
alias s=”cd ..”
alias ls=”ls –color”
alias l=”ls”
alias ll=”ls -l”

Finally, to make the whole environment nicer in Windows XP, I do the following:

  • Copy startxwin.bat to xterm.bat, but comment out the part that launches Xwin. This gives me an easy way to launch new xterms.
  • Make a shortcut of startxwin.bat and place it in the Startup folder in the Start Menu. This launches X Windows on startup.
  • Make a shortcut of xterm.bat on the desktop and make a shortcut key to Ctrl-Alt-Shift-X. This lets me quickly launch new xterms.
  • Place some shortcuts in my home directory in cygwin to my Windows XP desktop and other useful places.

0 Comments on “Cygwin/X notes”

Leave a Comment