Tue Feb 16 13:48:04 2010

This program is an X11 Session Manager program.  It is started as the
last or only  command in a .xinitrc or .xsession script file.  It
provides a user definable menu of commands to be launched.  It also 
provides a text area that can be used for (electronic) note taking.  
The contents of the text area can be edited, saved, cleared, copied to
the X11 copy buffer, and printed.

It does the following on startup:
 1. Creates a pipe in /tmp that it reads text from.  This text is
    displayed on the Session Manager's text area. This pipe is also
    bound to stdout and stderr of the processes launched by from the
    user defined menu.
 2. Starts up the window manager.
 3. Optionally starts the Gnome Settings Daemon.
 4. Runs a session script which launches an initial set of programs.

I wrote this program as a replacement for the DECWindows session manager
that was included with the VAX/VMS DECWindows installation.  It is
written entirely in Tcl/Tk, making use of the standard packages,
BWidget, SNIT, and Img.

Building it should be trivial (Tcl/Tk (-devel packages), BWidget,
Tcllib, tetex w/ tetex-tex4ht, and doxygen need to be installed for
building from source):

./configure
make
make install

It uses tclkit technology to create a standalong native executable, so
once built, it is not necessary for Tcl/Tk to be installed on a target
system.  It is possible to built a 32-bit Linux executable on a 64-bit
machine (useful if you have 32-bit target systems).

To use the program, the user needs to create a file named
".tksessionmanagerrc" in his or her home directory.  This file is in
standard X11 resource format, containing lines association patterns to
values:

pattern: value

Where pattern is a standard X11 resource pattern and value is an
approprieate value.  These toplevel resources are used by the session
manager:

mainTitle (class MainTitle)
	Specifies the main title.  The default is "TK Session Manager".
mainGeometry (class MainGeometry)
	Specifies the size and placement of the session manager window.
	The default is to use the natural size and to center the window
	on the screen.
menuFilename (class MenuFilename)
	Specifies the name of the file containing the commands menu.
	The default is $HOME/tkSessionManager.menu.
printCommand (class PrintCommand)
	Specifies the command to use to print the contents of the
	session manager's text area.  Should be a command that can take
	a plain text stream on its stdin. Defaults to lp or lpr.
pipeName (class PipeName)
	Specifies the name of the pipe created in the /tmp directory.
	Text written to this pipe is displayed on the session manager's
	text area.  The default is ${USER}_TkSessionManager.
windowManager (class WindowManager)
	Specifies the path to the window manager program to start. 
	Defaults to /usr/bin/fvwm.
sessionScript (class SessionScript)
	Session startup script to run.  This stript contains the
	commands to start up the initial set of processes for the user's
	session. The default is $HOME/tkSessionManager.session.
gnomeSettingsDaemon (class GnomeSettingsDaemon)
	Flag to specify if the Gnome Settings Daemon should be started.
	This might be needed to allow theme settings for GTK+ 2
	programs. The default is yes.
gnomeScreensaver (class GnomeScreensaver)
	Flag to specify if the Gnome Screensaver should be allowed
	to run.  The Gnome Settings Daemon forks the Gnome Screensaver,
	which may not be desirable.  The default is no.

Here is an example .tksessionmanagerrc:

*MenuFilename: ~/mm.menu
*MainTitle: Robert's Menu
*MainGeometry: 590x315-20+110
*PrintCommand: a2ps -2
*background:  white
*foreground:  blue
*borderColor:  orange
*iconName:  Robert's Menu
*WindowManager: /usr/bin/fvwm
*SessionScript: ~/.x.login
*GnomeSettingsDaemon: yes
*GnomeScreensaver: no

Menu File
=========

The menu file consists of pairs of lines, the menu item text and the
command to run (which should be something suitable as an argument list
to the Tcl exec command).  Lines starting with a ! are comments ar
ignored. A casscade is introduced by using a '{' at the beginning of the
menu item text.  Lines are processed as menu items under the casscade
name until a lone '}' on a line by itself.  Casscades can occur under
casscades.  There is no set limit to the depth casscades can go.

Session Script
==============

The Session Script file is a normal script or program to run at startup.
Generally, it will be a series of commands that start up X11 programs. 
Each command should end in a '&', so that the programs are forked into
the background.  The script should be allowed to run to completion after
forking all of the programs.
