I have looked at this some more and have discovered that the following changes allow WindowMaker, FVWM and Blackbox to see the DBUS_SESSION_BUS_ADDRESS environment variable when started from run level 4 using kdm.
For WindowMaker:
1. Create a file /usr/bin/startwmaker (I copied the existing /usr/bin/startblackbox and edited) containing
Code:
#!/bin/sh
# startwmaker v1.0
########################################################################
## Start DBUS session bus ##
########################################################################
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
########################################################################
## Start wmaker Window Manager ##
########################################################################
exec /usr/bin/wmaker
########################################################################
2. Edit /usr/share/apps/kdm/sessions/wmaker.desktop to read
Code:
[Desktop Entry]
Type=XSession
Exec=startwmaker
TryExec=startwmaker
...
Comment - A similar fix probably applies to TWM and MWM.
For FVWM:
1. Edit /usr/share/apps/kdm/sessions/fvwm.desktop to read
Code:
[Desktop Entry]
Type=XSession
Exec=startfvwm2
TryExec=startfvwm2
...
For Blackbox:
1. Edit /usr/share/apps/kdm/sessions/blackbox.desktop to read
Code:
[Desktop Entry]
Type=XSession
Exec=startblackbox
TryExec=startblackbox
...