Team LiB
Previous Section Next Section

Hack 55. Reduce Startup Time might seem like it is composed of separate productivity applications, such as a word processor and spreadsheet, but it actually is closer to being a single large application with different faces, one being a word processor, another a presentation manager, etc. That's why it takes so long to start the first application you decide to use. When you launch the first application, such as the word processor, you can run out to the nearest Starbucks for coffee and get back in time to see the opening splash screen finish loading. OK, that's a bit of an exaggeration, but sometimes it seems like it takes that long to start an application.

Yet, did you ever notice that if you leave the word processor running, you can open a spreadsheet application very quickly? That's because the behemoth engine behind the spreadsheet was already loaded into memory when you started the word processor.

The obvious solution to providing quick launches of is to preload the bulk of when you first start your window manager or desktop, before you launch your first application.

8.2.1. OOOQS, I Did It Again

A utility is available for KDE that does just that. It preloads much of, and then makes it possible for applications to start up almost immediately. The utility is called Quickstarter, or oooqs, and it was created by Christian Nitschkowski.

Quickstarter places an icon on the KDE panel. You right-click the icon, and from a menu, select what you want to do with, such as start a new text document or open an existing document. Depending on the speed of your computer, the application can appear on-screen almost immediately.

Many Linux distributions make the Quickstarter package readily available. You can get the Debian version over the Internet by logging in as root and issuing this command:

# apt-get install oooqs-kde

An RPM package is available for Fedora Core, SUSE, and other RPM-based distributions and goes under the name oooqs. You can retrieve this package from a number of sites, including Chances are that if you are running apt or yum, you can simply install it with either of these two commands:

# apt-get install oooqs
# yum install oooqs

You can also download an RPM package of the latest version from Finally, if you prefer to roll your own software, you can download the source code from or from

Depending on how you or the package manager installed the program, either oooqs starts automatically and makes an icon appear in the KDE panel, or you might have to start it manually from the KDE menu the first time, after which it will start automatically from then on.

8.2.2. The OOQSTART-GNOME of Antiquity

A similar hack is available that preloads some of and then places an icon on your GNOME panel. It is called ooqstart-gnome, and it was written by Kumaran Santhanam. If it works at all for your Linux distribution, it works basically the same way oooqs works. You right-click the icon to launch any of the applications quickly, avoiding the typically long startup times.

The problem is that this utility has remained basically unchanged since 2002, which makes its usefulness and compatibility questionable. It seems to work well with Debian, even the unstable branch, which has the most up-to-date software (for Debian, anyway). Debian users can install the program with this command:

# apt-get install ooqstart-gnome

You can also find an RPM package of ooqstart-gnome at When I tried to install it in Fedora Core 2, the installer complained about unmet dependencies. I took the dangerous path and forced RPM to ignore package dependencies, using this command:

# rpm -i --nodeps ooqstart-gnome-0.8.3-1.i386.rpm

Surprisingly, it installed and worked fine. Then I tried the same thing with Fedora Core 3, the latest version. It didn't work at all. (What did work, mysteriously enough, was the KDE oooqs program. It appeared in the GNOME panel just as it would in the KDE panel.)

8.2.3. Alternative Methods to Quick-Start

GNOME problems aside, what about all the other window managers? If you're used to using WindowMaker or XFce 4, you're unlikely to benefit from a program such as oooqs.

It so happens that has a feature called quickstart, which works fine with any desktop or window manager. You activate it with this command:

$ ooffice -quickstart &

Once you issue this command, the bulk of the engine starts up invisibly in the background and remains theresort of (more about this in a moment). This makes it possible to start up Writer, Calc, or other applications very quickly. Of course, no pretty icon appears in the panel, so you have to use the regular KDE or GNOME menu icons, or another means of starting the word processor, spreadsheet, or other applications.

Now let's get back to the "sort of" part of the equation. First you start ooffice -quickstart manually, or have it launched automatically when you start your window manager or desktop [Hack #72] . Then you start up your productivity applications, do a little work, and then close the applications.

As soon as you close the last productivity application, the background quickstart process automatically exits, too. Unlike the methods employed by oooqs, quickstart interprets the closing of the last application as an indication that you're done with for the day. So, the next time you open the word processor, it's back to "trip to Starbucks" time again. (Well, not necessarily. If you ran the application recently, much of it might still be in memory, and it will start quickly.)

8.2.4. Respawn Trick to the Rescue

Here's where the respawn method I describe later in [Hack #73] comes in really handy. Log in as root, start up your favorite editor, and create a file called /usr/local/bin/oostay. Type the following text into the file:

# Restart ooffice -quickstart every time it exits
instances=`ps ax | grep -e -quickstart | grep -v grep | wc -l`
if [ $instances == 0 ]; then
while true; do ooffice -quickstart ; done
exit 1

Save your work and make the file executable with this command:

# chmod +x /usr/local/bin/oostay

Now execute oostay instead of ooffice -quickstart whenever you want's quickstart feature to keep running no matter how many times you open and close applications. Best of all, this trick is completely window manager- and desktop-agnostic. It doesn't work any better or worse for KDE, GNOME, WindowMaker, Fluxbox, or any other environment you like best. You can start up /usr/local/bin/oostay automatically when you start your window manager [Hack #72] .

    Team LiB
    Previous Section Next Section