IceWM: First steps

Next Previous Contents

## 3. First steps

## 3.1 IceWM components

The IceWM suite consists of the following core applications provided by the main package:

- icewm - the actual window manager binary. This is the one you need to get window decorations.
- icewmbg - the background setting applications. It can assign plain background color or images in different formats to the X background, shared or separated for different workspaces. This program should be started before IceWM startup.
- icewmtray - catches the Docklet objects installed by various applications like PSI
- icewm-session - runs all of the above when needed
- icewm-menu-gnome1 - used internaly, generates IceWM program menus from located GNOME(1) menus
- icewm-menu-gnome2 - used internaly, generates IceWM program menus from FreeDesktop .desktop files (KDE/GNOME(2) menus).
- icewmhint - used internaly

## 3.2 Starting icewm

The `icewm` executable must be in your path for the restart function to work correctly. Please set your $PATH environment variable accordingly. The `icewm` program alone is suitable for usabe with Desktop environments like GNOME.

If you wish to run the whole IceWM suite (WM, background changer, Docklet support, and startup/shutdown script handling), use the `icewm-session` binary instead of pure `icewm`. Note that this is not a complete Session Manager but a helps only to automate the startup.

First make sure that you choose the correct X startup script in your home directory. For most distributions the file $HOME/.xsession is honored by startx and X Display Managers like kdm. On RedHat, the $HOME/.Xclients may be used instead. In all cases, choose the one recommended by your distribution and make sure that there is no concurency between the X startup scripts.

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

    # run profile to set $PATH and other env vars correctly
    . $HOME/.bash_profile
    # setup touchpad and the external mouse
    xset m 7 2
    xinput set-ptr-feedback 0 7 1.9 1
    # run initial programs
    uxterm &
    # start icewm, and run xterm if it crashes (just to be safe)
    exec icewm-session || 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 or /.Xsession, sometimes also /.xinitrc.os5).

## 3.3 Startup, restart and shutdown scripts

After initialization IceWM-Session will search the resource path ( lib ) for a startup script. If this file is found to exist and to be executeable IceWM-Session will run the script. On startup IceWM-Session will search for a script called "startup". And during the termination of icewm, the "shutdown" script is executed.

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