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-gnome2 - used internally, generates IceWM program menus from FreeDesktop .desktop files (KDE/GNOME(2) menus).
- icewmhint - used internally

## 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 usable 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 concurrency 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

    # start icewm-session
    exec icewm-session

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 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 executable 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 &

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.

## 3.4 Extra session environment

Please note that if icewm-session is used as the only startup mechanism (without having .xsession involved), one can write additional environment settings into the file $HOME/.icewm/env but this only supports simple assignments. This means: no multiline is supported, no redundant whitespaces, no POSIX shell code; however, expansion of simple shell style variables should be supported on most platforms). This extra environment is only effective in applications started by icewm-session and their subprocesses.

Example (env):

    PATH=~/bin:$PATH
    LANG=de_DE.UTF-8

Next Previous Contents