XServer setup notes for remoting a FreeBSD box from a Windows PC

Installing basic ports on your FreeBSD box

These ports will aid in the following efforts:
/usr/ports/net/cvsup-without-gui

  • this should always be your first port. Install it, copy /usr/local/share/examples/cvsup/ports-supfile to /root, then edit the file and change the cvsup host name to the closest mirror found at: ????. then type rehash to update your paths to it, and run ‘cvsup /root/ports-supfile to update all your ports
    /usr/ports/misc/screen
  • this runs a ‘terminal in a terminal’ and keeps any accidental disconnect between you and your server from stopping any make’s that are running. I use it constantly inside putty so I can start a make job, and disconnect my putty while it runs in the background.
    /usr/ports/sysutils/portupgrade
  • I run ‘portupgrade –ra’ once every other month to update all my installed ports to the newest versions. This is tons better then installing a new port over an old one, or uninstalling and reinstalling.

Installing XFree86-4 on your FreeBSD box.

Run a make install clean from /usr/ports/x11/XFree86-4

To configure XFree86-4:
(note that your not too worried about your XFree86 configuration because it’s not going to actually run on your FreeBSD boxes hardware, but I always make sure everything works on the BSD box before trying to use it remotely from Windows.)
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html

type ‘startx’ to see of X is working. XFree86 itself can be very difficult to get working, but once you see a gui, you can move on to the next step.

Windows Maker

Run Make install clean on /usr/ports/x11-wm/windowmaker

This is fairly simple to get running over top of X. Once it’s installed, you’ll need to create a .xinitrc file in the home dir of any user you want to run wmaker. Hit alt-f2 to get another terminal, then logon as a regular user and make a .xinitrc file in the users home dir with the following contents:

!/bin/sh

exec wmaker

This file will run every time you start X, so now it will run the WindowMaker GUI overtop of X. Type ‘startx’ to test it. You should get the wmaker gui now rather then the default X gui.

Now to configure our XFree86 box to accept connections from other PC’s.

Installing Cygwin

Click on ‘install now’ from www.cygwin.com. The save and run the setup.exe which will download the whole system (about 30Mb). Chose all the defaults except for ‘local package directory’. Change this to your temp dir: C:\Documents and Settings\tempadmin\Local Settings\Temp. On the ‘chose a download site’ page, I always scroll down and highlight all the http servers (it will go through till it finds one that works). On the ‘Select Packages’ screen, the only necessary change is to install XFree86, so scroll to the bottom and click the little icon next to XFree86 do that it says ‘Install’. You can add all the other options you want, but this is the only necessary addition to the base install. Click next to begin the install. Unless you have a T1 or better, this will take awhile.

Now that Cygwin is installed, lets test the Cygwin ‘port’ of XFree86. Run xwin.bat