Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


Using the Factory Window Manager on Mac OS X

Factory is an X11 window manager written in Factor by Eduardo Cavazos. Although best used in Linux, it can also be run using the in Mac OS X.

First you need to build Factor using the X11 backend rather than the standard Mac OS X backend. This can be done with the latest darcs code using these steps:

cd Factor
make macosx-x86 X11=1
./ -i=boot.x86.32.image -ui-backend=x11

The program usually runs a Quartz based window manager. You can run any window manager by providing a .xinitrc file in your home directory. Copy /private/etc/X11/xinit/xinitrc to ~/.xinitrc:

cp /private/etc/X11/xinit/xinitrc ~/.xinitrc

Edit it so the last line which runs the window manager is removed, and remove the '&' from the end of the line that invokes 'xterm':

# Change this
xterm &

# to just

#Delete this line
exec quartz-wm

Now when you run you'll find an ugly looking xterm window starting with no window manager decorations. From within this xterm, run the X11 Factor you built, and start Factory:

cd ~/x11-factor/Factor
USE: factory
":0" start-factory

This starts a UI instance of Factor, loads the Factory code, and starts the window manager on the given display. You can also run it as a terminal application rather than the UI:

cd ~/x11-factor/Factor
./ -run=listener
USE: factory
":0" start-factory

Either way you run it, you'll see the X11 windows instantly get the Factory decorations. The key bound to bring up the Factory menu is F12 which by default on my Macbook does something else. This can be configured, along with the menu, by copying two files and editing them to do what you want:

cp ~/x11-factor/Factor/extra/factory/factory-rc ~/.factory-rc
cp ~/x11-factor/Factory/extra/factory/factory-menus ~/.factory-menus

In ~/.factory-rc, change references to the F12 key to F8. Now when you start Factory, F8 will bring the menu up for running applications.

With Factory loaded this way you can modify the window manager code on the fly and the effects occur immediately.


This site is accessable over tor as hidden service mh7mkfvezts5j6yu.onion, or Freenet using key: