|
    |
|
To err is human - and to blame it on a computer is even more so.
|
 |
 |
Tutorial: Deconstructing the Shell |
 |
That means taking it apart to see how it works.
About this article:
This is written for people about to replace the shell in any 32 bit Microsoft Windows system from 95 to XP, or considering whether to do that. It aims to clarify the basics of shells, rather than a how-to on setting up any particular shell.
If you start with a clear overview, you are less likely to get into trouble or waste your time.
Though suitable for first timers, I hope it will also be useful to experienced shellers; you may already know most but not all of it.
The examples assume you are using Windows 98 SE. For reasons explained in my previous article, "Max Bang Per Buck" in Shell-Shocked, alt shells and Win98 are a great combination.
However I hope there is also much in here for shellers using Win 2000 or XP - there are some special tips for you too. :)
The shells which I mention most are the default shell which comes with Windows (it's wise to understand it before replacing it); LiteStep (because it's free, very comprehensive, and has the most users); and LiteShell (also free, very minimal, and much easier to setup than LiteStep). There is also a brief description of my favourite shell setup, but mainly this article is about the fundamentals of all shells, plus some emergency trouble-shooting tips.
Tip 1: Don't Panic
Occasionally it may seem you have harmed your system and need a total reinstall of Windows. No need to worry - just be sure to read the Emergency Repairs section below, which describes how to easily revert to the standard shell with no harm done.
What is a shell?
A shell is like the dashboard of a car. It is an
interface between you and the system, which shows
you stuff and lets you do things whenever you are
not working in an application.
If you are browsing this site, you already know
roughly what a replacement shell is (a program
like litestep or geoshell) but we need some clear
definitions...
The word "shell" can have several meanings, like "shelling to DOS" etc. Here I am using one very specific meaning - the Windows Shell in any 32bit Windows operating system.
BTW Even good shareware sites like Tucows, NoNags and Download.com might occasionally make the mistake of referring to a File Manager as a "shell" if the FM program's own blurb calls it that. In Windows it seems wiser to keep the word shell for its very specific meaning:
- The Shell is whichever program you have told the system to use as the Shell for this Windows session. Its functions are described in detail below. In Windows 95/98 it must be something (you can't have no Shell) but only one program can be the official Shell at any one time.
(Note: in XP/2000 a shell is less essential; one can possibly get by without one.)
- A "replacement shell" is any program specifically designed to be used as the Shell. Let's call them "alt shells" for short. Most are freeware or shareware. As described below, you could also set the Shell to be some other program, one not designed to be an alt shell.
- A "shell swapper" or "shell manager", is a small freeware or shareware program which sets or changes what program the system will use as the Shell for this session. A shell swapper is nice but not essential. There's a section about shell swapping below.
The boot sequence (much simplified)
Your bios finds the Windows boot loader (usally on drive C:) which then sets up your operating system and hardware drivers. The booting program's final act is to start the designated Shell program. The shell then takes over, makes its Taskbar etc, starts all your startup programs and awaits your input.
The Operating System stays loaded all the time to provide functions for applications.
The Shell stays loaded all the time to provide functions for the user.
The default shell
By default (if like most users you don't specify a different program) you get a shell which is created by explorer.exe.
The file called explorer.exe has two totally separate functions:
-- Best known is Windows Explorer, the standard two-pane file manager and its simpler one-pane cousin you get when you open a folder (a "My Computer" window is just Windows Explorer without the tree panel).
?- But explorer.exe also gets fired up as the final step when Windows boots and it then provides "The Windows Shell" continuously throughout your Windows session. (Explorer.exe doesn't look big enough to do all that but it calls on a bunch of dlls.)
Explorer.exe as the Shell provides several familiar features:
- the Desktop (with its icons and what happens when you right click on, or drag-drop to, the desktop).
- the TaskBar.
- the Start Menu.
- the system tray; Note: systray.exe is NOT needed to create the tray. It just adds a few icons to the tray like a battery meter for laptops and the volume control. If you remove the entry for systray.exe from your registry "run" section you still get a fully working tray, created by explorer.exe as the shell.
- execution of startup programs from a few places in the registry, from the StartUp folder, and from any "load=" or "run=" lines in win.ini.
- user defined hotkeys, such as those you can set for your shortcuts in the Start Menu, Desktop, etc.
- a few DDE functions which only seem to be called by some apps' setup programs when they create desktop and/or StartMenu shortcuts. Without this function a few programs' installation routines might not complete.
Those functions are found in all of Microsoft's explorer.exe shells. Other gimmicks may also be added (for example when you upgrade Internet Explorer) such as Active Desktop features.
Some (but not all) of those jobs are inessential. All of them can be replaced and even improved upon by a good alt shell. The most essential shell jobs are application launching and task switching. Explorer.exe provides these with its StartMenu and TaskBar.
Replacement Shells:
The default shell can safely be replaced
because it is NOT the core of the system,
just part of the user interface.
Your applications don't know or care
what you are using as a shell.
Alt shells do the same basic jobs as explorer.exe, but they don't necessarily try to mimic the usual TaskBar and Start Menu with merely cosmetic changes. Instead they usually provide one or more toolbars, popup menus, hotkeys, an alternative Desktop, and maybe a "wharf" (like a big toolbar in which you can dock special wharf plugins such as a clock or a resource meter).
Their basic structure usually differs from the explorer shell which is installed as "all or nothing". Many alt shells, such as LiteStep and PureLS, have a tiny main exe file, written by a core development team. You add optional plugins (usually dll's) which may be written by other people. So you can make it as complicated or as simple as you like.
Thus one shell may offer a choice of Desktop plugins each with a slightly different set of features. There's also a choice of alternative popup menus, toolbars, trays, utilities, wharf gadgets, all written by different people for the same core shell.
In shells where the plugins are developed separately from the core, it can sometimes be a problem finding the right version of each plugin, compatible with the version of your chosen alt shell. You may need to spend time checking their forums and www help pages.
Other shells have a more commercial style of design. They can be easier to set up (no need to choose the ingredients) but they might be less flexible. For example the shareware Aston, shareware Talisman, or freeware Serenade, may be easier to setup if you find Litestep confusing. Forget about pride, we each have a different mix of skills :)
LiteShell is also very easy to setup - unlike LiteStep it is one package from one programmer. It is the most minimal but it does all the shell essentials like running your usual StartUp items. Having tried several others, I now use LiteShell myself. That's because I use PowerPro (a shell extension) to create most of my interface, such as a substitute TaskBar, so I don't need a complicated shell program.
The Tray
The hardest item to replace seems to be the tray. Some alt shells seem almost complete except they promise a tray will be available "real soon, we're working on it".
The best alt shells do have a fully working tray, often with the added advantage that it's not stuck to the taskbar. A tiny free floating tray can be placed over the unused area of a maximised application's title bar. So it can be always-on-top without taking up the space used by having the whole standard TaskBar on-top.
LiteShell doesn't provide a built-in tray but the recommended TrayModule by Anish Mistry works fine with it.
Setting the shell?
There is already a comprehensive explanation of swapping shells, especially with the use of a Shell Manager, in another article on Shell-Shocked: "Ghost in the Shell".
I shall only describe how to set the Shell without using a shell manager. It's important to know these basic procedures clearly for your own OS before messing with shells!
Whichever method your system uses, it is very important to spell out the full path correctly, like:
shell="c:\shells\purels\purels.exe" (The quotes are needed if it contains a space.)
? in Windows 95/98
You specify the shell with just one line in the [boot] section of system.ini, such as:
shell="c:\shells\LS\litestep.exe"
instead of the usual:
shell=explorer.exe
After you edit system.ini, the change will have no effect until the next bootup, or the next logon. If system.ini has no shell= line, you will get explorer.exe.
Emergency repairs in Windows 98
If the exe file you specify cannot be found, the boot process will halt with a horrible error message saying that Windows must be reinstalled!
DON'T PANIC :) It isn't true.
In Windows 95/98 this is very easy to fix: Just reboot into pure DOS (using F8 at boot time, or a bootable floppy) and type at the prompt:
c:\windows\command\edit.com c:\windows\system.ini
(edit.com might be in some other folder)
Change your shell= line in the [boot] section so it reads
shell=c:\windows\explorer.exe
;comment out (or delete) any other shell= lines
Then save, quit the editor, reboot and everything is back to normal.
? in Windows NT/2000/XP
These NT based systems use an entry in the registry instead of system.ini to define the shell program.
If you have an unavailable shell directive, you should be able to boot into Windows anyway and then use Regedit to correct your Shell setting back to explorer.exe.
Method 1
Use Regedit in Windows to edit this key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\
When the Winlogon key is selected in the left hand panel of regedit, there should be a string value in the right hand panel called Shell. You double click the Shell value name and enter either Explorer.exe or the full path to your chosen shell.
Method 2
If you don't want to use Regedit, here is a .reg file which should do the trick. Copy the text between the lines and paste it into a new file in notepad. Then save it as EXPSHELL.REG or ALTSHELL.REG.
NB: This .reg file is for Win 2000/XP not for Win98.
? ? ? ? ? ?start ? ? ? ? ? ? ?
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="Explorer.exe"
(OR alternatively:)
"Shell"="C:\\shells\\altshell\\altshell.exe"
? ? ? ? ? ?end ? ? ? ? ? ? ?
Note about the alternative Line 3: In .reg files a single backslash is used to separate registry keys. So for a literal backslash, like in paths, you need a double backslash in .reg files but only a single backslash if you are doing it in regedit.
So in Win 2000/XP, instead of using a shell manager you could create two .reg files, one for explorer and one for your alt shell (using the alternative Line 3 shown above). To switch shells, just Merge the chosen .reg file and reboot.
Also on Shell-Shocked, there is a much more detailed article about setting the shell in the registry: "Installing Litestep under Win2k/XP". It even tells you how to set different shells for different users!
Whichever Windows version you use, you can avoid trouble by being sure to specify the full path to your alt shell program correctly. Put it in quotes if it includes spaces (or better still avoid using spaces in folders containing software).
Shell swappers
While experimenting with different shells you can avoid frequently re-editing system.ini by using a tiny program called ShellSelect (shellsel.exe).
You put the line shell=c:\shells\shellsel.exe in system.ini and every time you boot or just relog into Windows, a window pops up allowing you to choose from a list of shells for this session, including the default explorer shell. You can easily add to and remove items from the list. Shellsel.exe hands the Shell role on to your choice and then drops out of memory.
There are other good shell swappers, aka shell managers. Some stay in memory and allow you to hot-swap your shell without a reboot. Unlike ShellSelect which hands over the Shell role and retires, some of these retain the official Shell status and kind of delegate the shell job to your actual alt shell. So if your shell crashes, the shell manager pops up to fix it.
Once you have settled on a favourite shell, you can finally change system.ini to your permanent choice instead of the shell swapper, so booting will be faster.
Shell managers are yet another thing to choose and setup. As a rough and ready alternative in Win98, you can have a whole bunch of ";shell=" lines in system.ini and just remove the semicolon from the one you want to use next. (In ini files, lines starting with a semicolon are ignored.)
"Ghost in the Shell" on Shell-Shocked.org tells you about some neat shell managers.
Shell Extension City has links to many shell managers.
Caution: some of the older shell swappers may not work with WinXP.
Now you know how to revert to the default shell, we can have some fun setting shell= to something other than explorer.exe...
Experimenting:
Replacing the shell with a "non-shell".
NB. These experiments are not recommended as your usual way to run Windows. They help you understand what the default shell does by removing it without installing a proper alternative.
Also, these experiences help you imagine how you can have useable alternative interfaces, which need not merely mimic the standard shell plus a few cosmetic improvements. They can help you decide which parts of a shell are essential for YOU.
These experiments are safe and "recommended but not essential"; you could just read about my results instead. Before trying them yourself, be sure you know how to restore the default shell from a floppy disk DOS boot, as described above.
The most essential function of a shell is something to talk to when all applications have been closed; otherwise (in Windows 95/98) the system would become inaccessable, with Windows still "running" but no way to start a program or do anything at all. All keypresses and mouse clicks would be ignored. You can only reboot.
(WindowsXP handles a missing shell better than that.)
When messing with shells you might like to keep Taskman open but minimised and you will never become locked out that way. Or you could use a simple application launcher such as RunIt as your failsafe application launcher.
So the first essential function is application launching. In the default shell, this is usually done via the StartMenu or Desktop icons.
You could replace the shell with a tiny and simple menu utility like "RunIt". There will be no taskbar or desktop and your Startup items won't be run, but all your apps continue to work just fine. I have even replaced it, experimentally, with taskman.exe. Not really convenient but it works. Taskman gives you access to Windows' Run dialog (along with its browse feature) from which you can start anything. If you try that, remember that you can minimise Taskman but don't ever close it.
I have successfully replaced the shell with all kinds of unlikely programs, which don't claim to be an alternative shell. For example UltraEdit has a commandline, so you can start TaskMan and any other app from it. Again, if you try that, remember you can minimise UltraEdit but don't close it.
In fact any program with a standard FileOpen or SaveAs dialog is usable (rather awkwardly I admit) as you can do simple filing tasks and use SendTo. In a FileOpen box you could right click a folder and use SendTo to open it in your favourite file manager, from which you can start anything. I trust you have a nice bunch of links in your SendTo folder, including Notepad or a better text editor.
It's a good idea to experiment with right clicks in a FileOpen dialog to find out all the possibilities. You can rename files, Copy or Cut and Paste them into different folders... It's almost a mini file manager!
If you didn't really want to SaveAs or Open a file, just Cancel when you have finished using the dialog. Cancel won't undo any filing operations you did in there.
The second most important job of the shell is task switching.
That is always covered, even without a proper shell:
When the Windows Desktop is removed it doesn't leave a hole in your screen :-) You get a plain background of the desktop color set in Display Properties, Appearance. No desktop icons, no response to a right click on your "non-desktop".
Minimised apps appear as mini-titles lined up neatly along the bottom of the screen, like they used to in Windows 3.x (remember?) rather like a window that has been rolled up to just a small title. If you right click one you get a control menu for the minimised program, so you can restore it.
So without any proper shell or Desktop or Taskbar you can still switch between apps by minimising and restoring, or by using the Task Manager or Alt-Tab.
Summary of those experiments
If you play with setting shell= to a non-shell program, some unnecessary fluff from the Windows interface goes missing but it only takes a little while to get used to having no Desktop or TaskBar.
You soon realise that the Taskbar is an inefficient way of controlling your system, starting apps and switching tasks. It wastes a lot of memory and screen area. Unlike a proper menu, the StartMenu uses a shortcut for every item. That's a whole file, a whole allocation unit on your hard disk, for every item. Clumsy.
Better menus (including those created by most alt shells) stash the info for all your menu items in just one configuration file.
A one application system:
OK, I admit setting shell= to any program which is not designed to be a shell can be inconvenient. Of course for general computing it's better to replace explorer.exe with a proper alt shell. The examples above are just to help the learning process and the confidence that can come from such play.
However, there can be a good reason for using a "non-shell" occasionally: when running a resource hungry application, such as a game or an image editor, on a machine with not much RAM.
With shell=c:\apps\someprog\someprog.exe Windows boots straight into the program. This is very different from simply putting the app in your StartUp folder. Your one-app session will provide the application with several megabytes more free memory than usual.
Some people like to do that occasionally with defrag.exe because in a non-shell session fewer files will have that "unmoveable" status so you may get a more complete defragmentation.
Of course a reboot just brings back the one-app system. To return to a normal system with a proper shell, see the "emergency repairs" section above. It's even easier if the application has a SaveAs or Open dialog: you can browse to c:\windows\ and send system.ini to notepad, to edit it in GUI luxury. Then your next boot will be normal.
Don't forget, when you set shell= to a non-shell, your usual startup items won't be run for you.
If you want them, you will have to launch them manually after your "non-shell" system has finished booting.
Back to the real alt shells:
A replacement shell is a program which is designed to be run as the Windows Shell instead of explorer.exe. Unlike those non-shell experiments, a good alt shell can do ALL the shell functions listed at the beginning.
By the way, for testing purposes, most shell programs can instead be run like a normal program; just fire up its exe after Windows has finished booting with the usual explorer.exe shell. Then LiteStep (for example) won't have that special Shell status. It's menus etc will still work but the system considers it to be a shell enhancement rather than The Shell.
It's not quite the same as setting it to be the actual Shell, but at least you can preview it, change some options, create some essential menu items (such as Taskman and your file manager) and check they work before setting it as the official shell.
A smaller MS shell:
One alternative is to use a simpler Microsoft explorer.exe shell:
Instead of replacing the Win98 shell with a non-Microsoft one, you could use the Win95 explorer shell. It's fully compatible with Win98, less buggy, faster, and uses less resources.
The easiest way to do that is with either "ROM2SE" or "98lite". They differ so check the documentation for both and then choose. You will need the Win98 CD and also a few Win95 files.
ROM2 and ROM2SE are getting harder to find. Last time I tried, the home page was not reachable. You can currently get them from here.
98lite has a new home page. They have a shareware Pro version and a free Preview version.
As well as installing the 95 shell, both of those special installers also offer to remove Internet Explorer and other stuff which MS insisted on integrating in Win98. If you wish, you can install IE later; that way you avoid some of the IE-to-shell integration. Also you are not left with all the surplus files you get from accepting the IE version which comes with Win98 and then upgrading to a more recent IE version.
The Win95 shell will be more familiar than a non MS shell. So this may be the best plan if you want to share the computer with other users.
Even if you are going to use a non MS shell, there are a few advantages to first installing Win98 with the Win95 explorer shell; then replace the Win95 shell with Litestep or whatever.
But you don't have to do all that. Even if you don't use 98lite or ROM2SE, and just go straight into replacing the Win98 shell with an alternative, you still get the added stability and most of the resource economies of using a non-MS shell.
With an alt shell, there may be times when it's wise to revert temporarily to explorer.exe. I suggest you play it safe when (for example) installing system upgrades and patches, upgrading IE and installing major software such as MS Office. The alt shell is great for everyday usage.
A classic setup
Here's my favourite setup on any machine with less than 128 Mb of RAM:
For a really lean and mean system, make a fresh install of Win98SE using ROM2SE or 98lite, choosing their Win95 shell option, rejecting any optional components you don't need.
Then do the usual customising which you do with a new system, like updating hardware drivers, etc. Also setup the Explorer shell before replacing it because you will want to revert to it occasionally.
Then replace the shell with LiteShell plus TrayModule. LiteShell suits me because I always add PowerPro (see my next article) as a shell extension. If you don't want to learn how to use PowerPro, you may prefer a bigger shell program such as LiteStep or Serenade.
As a graphic designer editing some huge images, I found that setup provided a very efficient and stable system. It lets you run Photoshop or PaintShopPro on a slow Pentium or even a fast 486DX4. With image editing, enough RAM is more important than processor speed.
The result is the best Windows setup I have ever used. Compared to a regular Win98 system it was faster, more stable (fewer crashes), more customisable and more memory available to applications. Before, the most common source of "invalid page faults" and other types of system failures in Win98 was explorer.exe (in its role as shell).
Only with 128 MB or more of RAM, on a fairly fast machine (Pentium II or better) would I consider using Windows XP Pro (if available and affordable) instead of Windows 98SE. In XP I still replace the explorer shell with LiteShell and use PowerPro.
As Confucius said:
"You spend far more time using applications than using the shell.
Therefore many alternate shell users prefer to create a clean and simple interface.
It's less burden on the system and less to go wrong."
File Managers
If you wish, even when you have replaced explorer.exe as the shell, you can still use the Windows Explorer FM. Personally I seldom use explorer.exe as a file manager, preferring shareware or freeware FMs. A coming article in this series will compare the best of the file managers out there.
NB: In Win2000/XP there is an option: from an Explorer window go to Tools, Folder Options, View and check "Launch folder windows in a separate process". This separates explorer.exe as the shell and explorer.exe as an FM into 2 separate threads. It uses slightly more memory but is more stable (if either crashes it doesn't bring down the other). It's always a good idea to check that option no matter what shell or file manager you will be using, but particularly before replacing the shell.
Finale ? finally!
Well I hope that gets you started safely. I suggest you start with something simple, no frills, just practical and reliable. Move on to skins and extras (IF you wish) much later, after the basics are familiar and stable.
For me, replacing the shell feels like an adventure in "owning" my own computer - making my workspace easy to use. Above all I want to focus on my product (maybe an image or this text) without any unnecessary distractions. Screen space is valuable and an alt shell can help you use it efficiently and your way so
"what you see is what you need to see"
Alan Martin
More "Affordable Power" articles by Alan Martin,
coming to Shell-Shocked:
- PowerPro for Shellers
- Using Regedit to really tame those file associations
- Improving on the standard FileOpen and SaveAs dialogs
- Choosing the right File Manager, with comparisons
- Powerful free or low cost software recommendations
- Miscellaneous tips and utilities for tweaking, customising and troubleshooting shells and Windows.
This series of articles is aimed at users with good basic or intermediate Windows competence who want to become more expert as "power users".
They particularly aim to encourage "effective but affordable computing" for the not-so-rich and for Third World users.
So come back to browse Shell-Shocked again in a few weeks time - or get onto our low volume mailing list for news about new Issues and articles as soon as they arrive here.
Coming Next: PowerPro for Shellers
"Windows PowerPro" (free) is the best program I ever met for making toolbars and menus, plus a whole bunch of other features.
It's a shell extension, so you use it to improve either the explorer shell or an alt shell. The result is a very customisable and powerful interface.
The article will mainly be about how PowerPro can help alt shellers, and how to get started without being overwhelmed by all of its features.
|
 |
 |
 
 |
 |
|
| |
 |
 |
 |
 |
 |
 |
ravi
Hi West - I did a while back, if it's a recent one - I haven't been checking regularly. My flat's been totally flooded from a burst pipe - so life is a bit disrutped at the moment.
03 Nov/14:18
West
Hey Ravi, did you get my email?
27 Oct/02:02
Ravi
PS Chatbox currently functional.
14 Oct/00:02
Ravi
Phew - that took a while, but all's well now. Sorry for the hiatus folks.
13 Oct/23:56
ravi
I think I'll implement a "keyword" for this site, so you'll have to start your comment with ... say "shells" ... I'll strip that and post your comment.
Hopefully that will keep the spammers at bay.
24 Mar/19:04
ravi
gv, you naughty boy you.
24 Mar/19:02
ravi
Ah, I see neither gv nor the spammers fell for it.
gv - you do realise that now I'm going to delete the spam and you'll look crazy don't you?
23 Mar/12:20
gv
spears naked what?
23 Mar/10:50
gv
Just testing ;)
22 Mar/10:37
ravi
I'm going to disable the chatbox and comments until I have some time to deal with the comment spam. Meanwhile contact me at: [ link] if you'd like to post a comment.
21 Mar/17:01
sheep
what is the best shell replacment to use if you want security for liek a public desktop e-mail me at [ email]
14 Mar/11:42
gv
It's called emerge desktop now and its available at [ link]
09 Mar/09:35
 |
 |
 |
 |
|