|Table of Contents|
What is LiteSpawn?|
What's a Shell Manager?
Setting Up the Configuration File
Specifying Alternate Shells
Choosing a Shell at Startup
Setting the Startup Timeout Value
Setting the Termination Timeout Value
Setting the Keyboard Interrupt Delay
Configuring LiteStep Theme Preferences
Swapping LiteStep Themes on the Fly
Command Line Options
Tips, Tricks and Things to be Aware of
Scary Legal Stuff
|What is LiteSpawn?|
LiteSpawn is a shell manager for use with LiteStep,
one of the coolest shell replacements around for the Windows platform. It has been designed to
be small, fast and very unobtrusive.|
LiteSpawn mimics much of the functionality of cael's excellent LoneRunner utility but goes a step further in that it will allow you to set up individual shell preferences for different user's and it allows you to switch between shells on the fly. It will allow you to setup and monitor shells other than LiteStep and Explorer on a per-user basis and allows each user under LiteStep to have his or her own theme preference as well as the ability to swap themes on the fly.
|What's a shell manager all about?|
Among it's more notable features are the following:
Installing LiteSpawn is a snap. Simply create a directory (i.e. c:\litespawn) and extract the LiteSpawn
files to that directory. Then, from a command prompt run Litespawn with the -install option.
c:\litespawn\LiteSpawn -installThis will set LiteSpawn as your shell. Next you need to futz around with the .cfg file to set up your personal preferences (see below) and then, after a quick reboot, you're ready to go...
For those of you that have been burnt by programs mucking about with your system setup while you weren't looking, here is EXACTLY what the -install option does to your system:
Uninstalling LiteSpawn is just as easy. Simply run Litespawn with the -uninstall option.
c:\litespawn\litespawn -uninstallThis will set your default shell as the new shell.
|Setting up the configuration file|
The config file is where you specify all of LiteSpawn's options. There are two mandatory sections to
this file, [LiteSpawn] and [default]. In the
[LiteSpawn] section you need to specify two directives: litestep_exe and
explorer_exe. These two directives specify the explicit path to where your
explorer executable and your LiteStep executable resides. For example:
[LiteSpawn] explorer_exe = c:\winnt\explorer.exe litestep_exe = c:\litestep\litestep.exeThe second section, [default] will contain one entry: shell that points to either explorer_exe or litestep_exe. For example:
[default] shell = litestep_exeAdditional sections can also be added for each user that logs into that machine to allow each user to specify their shell preference. This is especially handy under NT. For example if there are three users with the UserNames: katmai, mrgates and joeblow, and they all use the same PC, three sections can be added as follows:
[katmai] shell = litestep_exe [mrgates] shell = explorer_exe [joeblow] shell = litestep_exeWhen katmai or joeblow log in, LiteSpawn will start LiteStep. If mrgates logs in, then explorer will start. If the currently logged in user doesn't have a preference set up then the shell listed under [default] will be used.
|Specifying alternate shells|
If you are reading this, chances are you are into the whole Win32 shell development scene. Although
LiteSpawn has been developed specifically with LiteStep in mind, there are many other new shells
being developed such as Dimension, EVWM and Reveal that could benefit from LiteSpawns user
configurability and crash protection features. For this reason LiteSpawn now has alternate shell
In the LiteSpawn.cfg file you may add up to five alternate shells under the [Alternate_Shells] section. Here you list shells by their name and the path to the executable using the following syntax:
altshell_name_x = "Shell Name" altshell_path_x = "path\to\shell\executable"For example a typical shell connoisseur might have the following in litespawn.cfg:
[Alternate_Shells] altshell_name_1 = "Reveal" altshell_path_1 = "c:\reveal\reveal.exe" altshell_name_2 = "Dimension" altshell_path_2 = "c:\dimension\d.exe" altshell_name_3 = "EVWM" altshell_path_3 = "c:\evwm\evwm.exe"Each user may now specify one of these shells as the one to start when they login by setting the shell directive to the name of the alternate shell rather than litestep_exe or explorer_exe:
[sally] shell = "Reveal" [lameboy] shell = explorer_exe [tode] shell = "Dimension"LiteSpawn will provide full crash protection for each shell and most of the LiteSpawn commands such as -kill and -restart will work with no problems. Note, however, that swapping from an alternate shell on the fly is not supported.
|Choosing a Shell at Startup|
The third option "Start Other..." provides a nice and quick way of selecting an alternate shell on the fly without setting it up in the litespawn.cfg file in advance. Clicking on this entry will popup a dialog that will let you browse for an executable to start as your shell. If an alternate shell is set as the default shell for that user as described above then this option will show the name of that alternate shell, for example: "Start EVWM"
Selecting "Terminate after spawn" from this dialog will cause LiteSpawn to start the selected shell and then immediately terminate itself. This is useful if you want a shell to start and have it be the ONLY process running on the machine (other than the Windows kernel itself of course).
If you would like LiteSpawn to ALWAYS terminate itself without having to manually check the Terminate after spawn box each time, you can specify the self_terminate option in LiteSpawn.cfg. For example:
[ralph] shell = litestep_exe self_terminate = 1This tells litespawn to spawn LiteStep as the shell and then immediately terminate and remove itself from memory. Note that once LiteSpawn has terminated crash protection will be disabled and you will not be able to perform any LiteSpawn functions such as swapping shells or themes.
If this value is either 0 or not specified then LiteSpawn will continue to run after spawning the shell.
|Setting the Startup Timeout Value|
A timeout value: start_delay can be specified under each user's section.
This integer value specifies the number of seconds to wait for the user to select a shell when
ask_boot = 1 is present. The countdown timer will be displayed in the
titlebar of the startup dialog and, if no item is selected within that amount of time, the default
shell will start automatically. For example:
[default] shell = litestep_exe ask_boot = 1 start_delay = 10This will show the startup dialog for ten seconds and then start the default shell if no choice is made in that time. If start_delay is 0 or is not specified then there is no timeout.
|Setting the Termination Timeout|
By design, LiteSpawn tries to be as nice to the shells that it manages as it can. When
swapping shells on the fly it sends the proper messages to each shell to tell it to close
itself down. Sometimes, however, the shell (beit LiteStep or Explorer) may be in an
unstable state and refuse to acknowledge these shutdown requests. At this point, LiteSpawn
will terminate the shell forcefully.|
The default behavior is to wait 10 seconds after sending the shutdown request before terminating the shell. This is a good default value for a mid to low end PC with small amounts of RAM since Windows may be busy doing other things and may not get the chance to forward the request to the shell in a timely manner. If you are on a faster PC and the shell seems to be periodically hanging for no good reason (as shells tend to do) then you can specify a different termination timeout value using the kill_delay directive under any user section:
[default] kill_delay = 5This will tell LiteSpawn to wait 5 seconds for the shell to terminate before getting all medieval on the its ass. If you set kill_delay = 0 then LiteSpawn will simply terminate the shell immediately and not bother sending the QUIT messages at all. This translates to super fast swapping between shells BUT may also lead to system instability over an extended period of time since the shell does not get the opportunity to clean up all of its resources and library connections.
|Setting the Keyboard Interrupt Delay|
When swapping shells, LiteSpawn will generate a keyboard interrupt to make the shell suppress
running the startup items each time. When swapping from Explorer to LiteStep
a SHIFT interrupt is generated and when swapping from LiteStep to Explorer a CTRL interrupt
is generated. On most machines LiteSpawn is able to determine the appropriate times to depress
and release the key when starting the shell but under certain circumstances this may not always
work reliably. If you find that swapping from Explorer to LiteStep causes all the startup
items to be run a second time then you can override the default detection mechanism
and tell LiteSpawn to depress the key for a specific number of seconds using the
shift_delay directive under any user section:
[joe] shift_delay = 3This will tell LiteSpawn to wait 3 seconds before sending an interrupt to release the key. Depending on your CPU speed you may have to play around with different values before getting one that works reliably 100% of the time. This is, hopefully, a temporary feature that will be removed once a better startup suppression mechanism is written into LiteStep itself.
|Configuring LiteStep Theme Preferences|
Due to overwhelming demand, LiteSpawn now supports the ability to define a different
LiteStep theme for each user. Up to ten themes can be defined under the [Themes]
section of LiteSpawn.cfg using the following syntax:
theme_name_x = "Theme Name" theme_path_x = "path\to\theme\step.rc\and\modules.ini" theme_back_x = "path\to\theme\background\image" theme_mode_x = "tile" | "stretch" | "center" theme_disp_x = (x_res,y_res)For example:
[Themes] theme_name_1 = "Deception" theme_path_1 = "c:\litestep\themes\decept" theme_back_1 = "c:\litestep\themes\decept\background.bmp" theme_mode_1 = "tile" theme_disp_1 = (1024,768) theme_name_2 = "NeXTStep" theme_path_2 = "c:\litestep\themes\NeXTStep" theme_back_2 = "c:\litestep\themes\NeXTStep\wallpaper.bmp" theme_mode_2 = "center" theme_disp_2 = (1152,864)Now the theme for each user can be specified using the theme directive in each user section as follows:
[fred] shell = litestep_exe theme = "Deception" [stan] shell = litestep_exe theme = "NeXTStep"When fred logs in, LiteSpawn will copy the Step.rc and (if present) the modules.ini files from "c:\litestep\themes\decept" into the LiteStep directory and then change the background image to "c:\litestep\themes\decept\background.bmp". The background is not actually changed in the system so after a reboot, the previous background image will still be intact. Just to be on the safe side, LiteSpawn makes a backup copy of the step.rc and modules.ini in the LiteStep directory before it overwrites them with the new ones. These can be found in the LiteSpawn directory as Previous_Step.rc and Previous_Modules.ini.
|Swapping LiteStep Themes on the Fly|
If there are only two themes defined in litespawn.cfg then LiteSpawn will automatically toggle between the two. If there are more than two, a dialog will popup and allow you to choose the theme that you want to load. If you change your mind you can back out of this dialog by hitting ESCAPE or the close button in the upper right corner.
Once LiteSpawn has been installed and is running, you can run LiteSpawn again with several command-line
options to tell it to do different things. If you run LiteSpawn again after it has already started
it will read the option, send the message to the already running instance and then quit. This lets you bind
LiteSpawn to a popup, a Wharf item or a HotKey under LiteStep. For example, the following in your step.rc
will instantly swap shells whenever you hit Win-S.
*Hotkey Win S "C:\LiteSpawn\LiteSpawn.exe" -swapor if you wanted a reeeeal fast (seriously man, no prompts or nuthin!) way of shutting down:
*Hotkey Win Q "C:\LiteSpawn\LiteSpawn.exe" -shutdownThe full list of options is as follows:
|Tips, tricks and things to be aware of|
aww, you didn't think you'd get away that easy did you? Here are the current "issues" that I'm
aware of. If you think you have something else not on this list
then by all means let me know
|Scary legal stuff|
By using this program you agree to not hold the author responsible for
any damages or loses of any kind. You agree not to disassemble it,
or modify it in any shape or form with out written permission from the
author. Doing so revokes all licenses granted to you and/or your party
and is punishable by law where applies. hoooooooo-boy!|