Re: Minimizing X to load faster
From: Ben Measures (saint_abroadremove_at_removehotmail.com)
Date: Tue, 03 Feb 2004 21:18:24 +0000
> I have the following task to accomplish and I want to hear ideas of
> the people on what can be done (or what else can I read to accomplish
> what I want):
> A company I'm working for is building a device which will run linux
> with an lcd display and there several requirements:
> 1. Device should boot as fast as possible
> 2. X should load and operate very fast
> 3. The only application without any window managers that will be run
> will be Borland Kylix3 (Delphi) developed, Qt based.
> 4. The graphics chip be a version of Via Savage chip.
> 5. Whole system should fit if possible on 1 256Mb bootable USB Key/CF
> What has been accomplished so far and what I want to improve:
> 0. A Linux system has been built based on Linux From Scratch 5.0 +
> some BLFS
Mmmm, LFS. Only way to go, even with my Athlon 2.4+ ;-D
> 1. X 184.108.40.206 was compiled with support of fontconfig/freetype -
> however since Qt2.3.0 that Kylix uses doesn't support anti-aliasing I
> wonder if it will make any difference if I don't include any of this?
> Will it make X faster if it is run without Freetype/Fontconfig?
I think that freetype renders fonts faster but adds to startup time.
Doesn't matter if you see below though.
> 2. Current space taken by X is 128Mb which unacceptable what can be
> deleted from it? I can't understand how people were able to fit X in
> less then 5Mb in the past.
Have a search for kdrive:
You can get a tiny X server in around 700KB! The source should be
included with 4.3.x packages, see the second link for howto.
There are other (GPL) tiny X servers if that one is not suitable.
> 3. X takes 5+ seconds to start - absolutely unacceptable
> 4. How to hide the "X" cursor and change the grey grid image to some
> bitmap or just plain color right from the start/permanently?
C'mon, you should do more research - you're being paid for this! :D
The grey grid is caused by twm (default small but ugly window manager),
and the mouse issue is all over the web/usenet.
> 5. Is it possible (and how?) to strip different parts of X like
> Networking functionality support, multiple display support, etc, etc.
> X will run only 1 application with 1 window nothing more. If it was
> possible I would have tried DirectFB as it is a better choice for our
> platform but because of the Kylix Qt application limitation - it is
See point 2.
> Other then this other questions that I'm researching right now are:
> 1. possiblity to statically compile all loaded applications... Will
> this improve boot/operation speed?
Yes on both counts. You can also prelink dynamically linked applications
resulting in (virtually) the same speed increase. There are plenty
prelinking tuts on www and usenet.
As for kdrive, it has all configuration and drivers compiled in. This
results in a good speed boost.
> 2. compressing some part of the distribution and loading it into RAM
> memory at boot (we have plenty (256Mb of RAM)) - I was unable to find
> any way to do this yet
initrd can decompress gzip compressed boot images into ram as the kernel
boots. This can be the whole root filesystem AFAIK. Other mount points
might be more challenging. You know where to find more info about initrd
> Any comments, links, book referrals are really appreciated.
For a working example of a small Linux distribution have a look at:
Its features include:
* Full featured graphical web browser with ssl support
* File manager
* Rdesktop remote client
* vncviewer vnc client
* ssh client
* X scripting system
* Text editor
* Desktop system
* X terminal emulator
* Gnome/KDE compliant wm
* many other linux utilities...
but the best part is, wait for it...:
It all fits on 1 floppy disk! That right, its a *one* floppy disk linux
dstribution. Now thats what I call "super-amazing-fantastic-glorious",
or cool for short.
> Thank you in advance,
-- Ben M. ---------------- What are Software Patents for? To protect the small enterprise from bigger companies. What do Software Patents do? In its current form, they protect only companies with big legal departments as they: a.) Patent everything no matter how general b.) Sue everybody. Even if the patent can be argued invalid, small companies can ill-afford the typical $500k cost of a law-suit (not to mention years of harassment). Don't let them take away your right to program whatever you like. Make a stand on Software Patents before its too late. Read about the ongoing battle at http://swpat.ffii.org/ ----------------