wmii built, doesn’t start

I was finally able to build wmii. Turns out that Cygwin doesn’t like to link to X11 before linking to the wmii libs.

So I changed the Makefile in cmd and cmd/wm to read:


LDFLAGS = -L../liblitz -llitz -L../libixp -lixp -L../libcext -lcext
LDFLAGS += ${LIBS}

instead of

LDFLAGS += -L../liblitz -llitz -L../libixp -lixp -L../libcext -lcext

This worked like a charm. Unfortunately I am unable to start the bloody thing but I think I’ve found out why. DISPLAY is set to 127.0.0.1:0.0 in startx and/or startxwin, and the wmii script tries to create a folder in tmp that has this in it’s name. That works on most unixen, but not cygwin, due to the colon, which is probably illegal on windows. So I’ll have to replace that colon somehow.

update:

I modified the wmii file to


#!/bin/sh
# start wmiiwm and wait for its termination

wmiiwm -c || exit 1

OLD_PATH=$PATH export OLD_PATH
PATH=$HOME/.wmii-3:CONFPREFIX/wmii-3:$PATH export PATH
BLE=`echo /tmp/ns.$USER.${DISPLAY%.0} | sed 's|:|_|'`
WMII_ADDRESS=unix!$BLE/wmii export WMII_ADDRESS

mkdir -m 700 $BLE 2>/dev/null
wmiiwm -a $WMII_ADDRESS &
wmiiwmpid=$!
mkdir "$HOME/.wmii-3" 2>/dev/null && welcome &
wmiirc &
wait $wmiiwmpid

This quotes the home directory, which is good, since I stupidly still have Home = “Documents and Settings\Nonni”. This also replaces any colons in the socket file with an underscore, using sed.

Leave a Reply