Next Previous Contents

3. Starting icewm

The icewm executable must be in your path for the restart function to work correctly. Please set your $PATH environment variable accordingly.

First make sure that there is no $HOME/.xinitrc or $HOME/.Xsession file or that any of those correctly starts $HOME/.Xclients.

The recommended way to start is from $HOME/.Xclients shell script (must be executable). Mine looks something like this:

# run profile to set $PATH and other env vars correctly
. $HOME/.bash_profile
# setup background
xsetroot -solid '#056'
# setup mouse acceleration
xset m 7 2
# run initial programs
xterm &
# start icewm, and run xterm if it crashes (just to be safe)
exec icewm || exec xterm -fg red

The xterm on the last line is there simply to make sure that your X session doesn't crash if icewm does (should never happen). You can restart icewm from there or start some other window manager. The session will close if you close the xterm.

The above should work for most Linux systems. On commercial unices you should use $HOME/.dtprofile if you have CDE or $HOME/.vueprofile for HP-UX with HP VUE. If you are running xdm or some other login program check it's manpage for the correct place to start the window manager (usually  /.Xsession).

3.1 Startup script

After initialization IceWM will search the resource path ( lib ) for a startup script. If this file is found to exist and to be executeable IceWM will run the script. On startup IceWM will search for a script called "startup", on restart a script called - you guess it - "restart" is searched.

Additionally the flag "--with-gnome" is passed if a GNOME session manager is detected.

Example (startup):

#!/bin/bash

[ -x ~/.icewm/restart ] && source ~/.icewm/restart

gnome-terminal --geometry 80x25+217+235 &
xscreensaver &

Example (restart):

#!/bin/bash

xsri --emblem=/usr/share/pixmaps/redhat/redhat-emboss.png \
     --emboss --geometry=+0+48 --vgradient --color=\#567 --color2=\#123 &

Hint: This feature is meant for easy desktop initialization and it is part of IceWM due popular demand. For more sophisticated session management you should learn how to use a real session manager - IceWM does support the XSESSION protocol.


Next Previous Contents