----------------------------------------------------------------------------------
Before you read this: this has been tested with KDEBASE only, and this how-to was actually for low end systems with lower memory and slow processors so users could benefit from kde apps in the way i did this. Now i re-wrote the how-to and all users can benefit :)

Oh and: this how-to seems difficult but its actually very easy, just a little much explanations.
----------------------------------------------------------------------------------

(READ THE IMPORTANT NOTE AT THE END OF THE HOWTO!)

I really like kde(base) and some stuff of it, but for example kdebase still seems to much bloated, what i mean with that is that some things dont actually belong in the core or 'base' of kde, i mean...

is ksplashml required to start kde? no way.
Is konsole mandatory? cerainly not. (xterm is sufficient :)
What about kscreensaver? what is there to save?
Do we need kpersonalizer? where the heck is kcontrol for?

etc etc and so on...

Now i found a good way to shrink kde's packages, especially for low-end systems or just if you dont want all the unnecessary stuff, and it would be good to settle this once and for all with a how-to.

There are several ways to check what programs can be excluded from certain packages.

As you can see, there are many directories that are actually named after the packages from kde. in these directories you can find a 'README'.
Open it and you will follow a hyperlink, here are the available versions of README's, ofcourse i assume you take the lastest version, click on download.
Most browsers will open the readme by then, in the readme you should see a full list of available 'programs' you can exclude from the package/ebuild directory you went into.

2. Go and emerge for example 'kdebase' and wait until its done ./configure 'ing.
You should also see a list of what will be compiled, they are default specified as 'yes'
Ok, now go and ctrl+c the emerge to break off the emerge and now you will also know what programs you can exclude.

Before we emerge, we need to specify the DO_NOT_COMPILE="prog1 prog2 prog3" variable before the emerge 'package' command in the command line.

For kdebase (thats the only package i use for my kde :) i used the following:

- a less then half the original kdebase size (8~Mb instead of 20~Mb both tbz2'ed)

Since i use xfwm4 (which is much faster then kwin imho) and since i use gnome's panels and toolbars i excluded kwin and kicker :)

Now i use a bunch of this and that to get my desktop look nice, to run this all i use the .xinitrc file in ~/.xinitrc, you might have to create it:

Code:

gnome-panel &
kdesktop &
exec xfwm4

Please be warned that some programs can cause compile errors and eventually stop compiling if they are excluded, from my experience these packages may not be excluded from kdebase:

- ksmserver
- konqlib (even if you are not gonna use konqueror and put it in DO_NOT_COMPILE)
- applnk (for some reasons dont use it, kde's icons will do weird everywhere)
- kcontrol
- kioslave (i'm not sure but it looks to me its mandatory, please let me know if it isnt and what the results are)

You should experiment if you get compile errors, probably you used a program in DO_NOT_COMPILE that is needed, please be kind and tell me so i can edit the how-to.

This all has been tested on a Toshiba Satellite Pro 480CDT with the above example of mine.
CFLAGS="-march=pentium-mmx -O2 -fomit-frame-pointer -ftracer -ffast-math -pipe"

-----------------------
IMPORTANT NOTE
-----------------------

We discovered that you must WAIT with appying the DO_NOT_COMPILE variable to ebuilds until all depencencies,ghostscript,openmotif,arts,qt,kdelibs are emerged.

Since if you use it (for example) with kdebase and you never had something from kde emerged before, it will apply on ALL depencencies like kdelibs. (kdelibs has some package names that kdebase also has)

This also means you must not put the DO_NOT_COMPILE variable in make.conf, because that will also effect ALL kde packages.
The best way is to:

Code:

emerge kdebase

and if it finally emerges kdebase, ctrl+c to abort the compilation, and at THIS point use the DO_NOT_COMPILE="xxx xxx xxx" flag to apply them on kdebase. and further packages after kdebase._________________MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.

Last edited by Marctraider on Thu Oct 21, 2004 11:13 pm; edited 12 times in total

It sure is great!
I tried to slim down kdelibs but there is not much to slim down there, and this package leads to errors in no-time.
I didnt try other packages so you have to try them yourself!
If you encounter a message you can most probably see what is bugging it.
From there you can conclude what program is mandatory and must be removed from the DO_NOT_COMPILE line.

This is an awesome tip! to tell you the truth i hate kde as a dm but its prgrams are great (tho i only use a select few of them). This will allow me to install only the kde stuff i want and not take up all the space that it used to. =) thanks a lot

The Mac OS bar can be applied with kcontrol, the little filemanager is rox.
just emerge it, now i dont have konqueror anymore, and it doesnt know how to open things anymore.
For example 'trash', it asks where to open it with, well if you specify 'rox' as executable and check 'Remember application associations for this file of type' or something equivalent it will always open such things with Rox instead of konqueror!_________________MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.

Mine work :) but you must use it for kdebase only. if you want something that i have in my DO_NOT_COMPILE flags just delete it._________________MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.

Well almost everything for kdebase, but as showen in the how-to, you can figure out your own things you dont want, not only with kdebase, but also with other mutimedia packages._________________MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.

Mhh thats most unusual though, because after the ; a new command executes.
For most people the normal method will work :)_________________MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.

Thank you for a great HOWTO._________________
... Leaving ground, destination is unknown,
into the darkness and far away from home,
Will your dream come true and what will you find,
when fate is your guide ...

Last edited by dmitrio on Wed Jun 30, 2004 3:38 pm; edited 1 time in total

An easier way of finding out which programs to include in the DO_NOT_COMPILE is going to http://docs.kde.org and look at what is included in the packages. The downside is that you might miss some smaller programs, but on the other hand you have direct access to the documentation and can go through the programs and see what they actually do.

DO_NOT_COMPILE has cropped up on these forums a number of times, but it's great to see that someone finally had the sense to post it in the Documentation, Tips & Tricks forum.

Of course, it is a bit of a hassle, and when this was discussed about a year ago, subpackages for kde were promised, but I guess they never happened._________________"Do you hear that sound your Highness?"
"Those are the shrieking eels, they always grow louder when they are about to feed on human flesh."

this creates variable DO_NOT_COMPILE in current shell and hence echo displays it. This variable won't be seen by child shells. Only way for child shells to see this variable is without the ';' in the middle or if you explicitly export it with "export". Try this:

Code:

cat > /tmp/tmper.sh << EOF
#!/bin/bash
echo \$DO_NOT_COMPILE
EOF

chmod +x /tmp/tmper.sh
#execute script in its own shell
DO_NOT_COMPILE="test" /tmp/tmper.sh
#execute script in its own shell
DO_NOT_COMPILE="test"; /tmp/tmper.sh
# by now set in current shell
echo $DO_NOT_COMPILE
# excute script in current shell
. /tmp/tmper.sh
DO_NOT_COMPILE="test" /tmp/tmper.sh

second one doesn't print it, rest do.

emerge uses python and has a different way of handling env. vars, but essentially the same mechanism works.

well it did work with both the ; thing and the export command, but not without the ;
unless i didn't do something wrong.

however, i still wish the kde team would publish their brilliant konqueror as a stand-alone packet. there's still too much extra-stuff installed (who needs startkde?)
i like my wm (xfce4), and if i change it, certainly not for kde or gnome or any of those. just too bloated for me. but trying out all the filemanagers out there (including rox & nautilus), konqueror proved to be the best.