KNOW-HOW Ask Klaus! ASK KLAUS!

and even with its very reduced features, linking of KDE or Gnome programs is it has always been sufficient for me. more likely fail because of this modular There were quarrels between develop- structure than for any other reason.) ers and users about KDE being “non- This can get you into some problems. Klaus Knopper is the creator of free” in the old days, because of the qt li- If you use KDE regularly, and you want Knoppix and co-founder of the cense (for the library KDE is based on); to install a single Gnome program such that it was more memory-consuming as Gnopernicus, you end up installing LinuxTag expo. He currently than Gnome; or that its graphics were the entire Gnome software suite because poorer. None of these are genuine prob- you won’t be able to to get the program works as a teacher, program- lems today, and I don’t know if the ru- to run otherwise. In very bad cases, mer, and consultant. If you have mors about graphics and memory con- Gnome dependencies try to deinstall sumption ever were true, or whether parts of KDE (or vice versa) because of a configuration problem, or if they were just part of the creative com- conflicting services that are present in petition between different groups and both (a very rare case, though). you just want to learn more philosophies. OK, I cheated a little in this example. about how Linux works, send Nowadays, Gnome consumes the Gnopernicus is more like a suite of pl- same amount of system resources as ugins and addons for Gnome than like a your questions to: KDE (if not more), performance bench- standalone application. (It is a graphical marks are equal, graphics are excellent screenreader and enhance- klaus@linux-magazine. com. for both, and their features (at least ment for Gnome.) But the same thing those that you will most likely ever use) can also happen with smaller applica- are more or less identical. tions, such as the great GnomeMeeting Gnome and KDE do, however, use an video conferencing client, , and Are Gnome and KDE equal? entirely different set of dependencies in others that I surely would like to have Gnome and KDE are always pre- the form of dae- sented as equal alternatives. Are mons, services, they really equal, or are there and libraries. I situations where one is better than the have seen Gnome other? Can I configure my Linux system programs that re- so that it will run BOTH KDE apps and quire 40 library Gnome apps? dependencies or more. It some- Technically speaking, both times seems im- Gnome and KDE are highly con- possible to use a figurable desktop systems with Gnome or KDE object-oriented internal design, and even program that for non-technical users, these desktops doesn’t require (if configured appropriately) are very additional compo- easy to use. nents that are I’m trying to be neutral about which about 10 times the desktop system is “better” in general. I size of the actual have been using Xfce 3 for quite a while, program. (Static Figure 1: Xfce is a fast and simple alternative to Gnome and KDE.

50 ISSUE 63 FEBRUARY 2006 WWW.LINUX- MAGAZINE.COM Ask Klaus! KNOW-HOW

available on the KDE-based Knoppix CD you just want to do everyday work or tion program, and other potentially edition, but they just won’t fit with all play, you don't usually have to worry memory-hungry programs, you are al- their library dependencies. It’s the same about “expert” options and can just go ready at about 500-1000 MB that need to thing the other way round if you want to with the defaults. be kept somewhere. install a KDE application on a plain Manual configuration is preferable if If you manually calculate the required Gnome system. But at least KDE 3.x pro- you plan to do some more advanced swapspace, try to estimate the memory grams try to avoid unnecessary depen- tasks with your computer, like realtime used by programs. (The free command is dencies if possible. streaming, video processing, or other helpful for this, but watch the values In any case, when using KDE with heavy duty data processing that requires WITHOUT file system buffers), and add Gnome applications, or KDE applications a more sophisticated setup. It also mat- another third of this number just to be on Gnome, you will always end up with ters whether or not the system will be a safe. If your system runs out of memory, a lot of libraries and background ser- home to a lot of different users, or everything starts being very slow and re- vices, object brokers, or preloaders from whether it will be a single user system. sponsiveness goes one or the other system. Luckily, both I usually use a lot of partitions in order down to a point Desktop systems try not to fight each to have some separate test installations, where you want other (on the runtime level) or keep the encrypted partitions, and additional to leave the room other desktop system from running its swapspace areas whenever I need them. to get some coffee own stuff. So yes, it’s possible to freely A GNU/Linux system can fit on a sin- or tea. Running mix Gnome and KDE applications, ex- gle partition (which can even be a vir- applications may cept in a few cases when both insist on tual partition located inside a file). also be terminated starting their very own (sometimes de- Swapspace is not required in order to if there is no way vice-blocking) sound daemon, and you run GNU/Linux at all (though some they can get the end up wondering why your sound card installers insist on having a swap par- memory they suddenly fails to respond until you kill a tition). need. But usually, few running processes launched by the So, let’s discuss swap first. before this hap- “other” desktop system. If you encoun- Swap adds space to the “virtual mem- ter such problems, you can check who’s ory” management of the Linux kernel. “...it is good to think blocking your sound by entering This means, you can run more and big- ger applications than would fit into your fuser -v /dev/dsp computers RAM. The question of how about swapsize in much swap space you need depends on which will identify the offending sound what you plan to do. Real RAM is always advance” daemon process in most cases. better, of course, but in most cases, swap will also work by temporarily storing pens, you are already considering using Partitioning for Experts running programs and data that are not the reset button to restart the system, Linux installers have gotten currently needed. knowing that this is not the preferred much better over the years, but A fine Linux performance-boosting way to free memory. So, it is good to the section on partitions is just feature is the fact that unused RAM will think about swapsize in advance. as confusing as it always was. Now, at be used as a dynamic (self-adjusting) file If you notice later that your swap par- least, the wizard “suggests” a partition system buffer. Files that have been read tition is unsufficient, there is an easy configuration, but it still asks me once will stay in the fast RAM cache way to add more swap. Just create a file, whether I approve of the settings, and (and just be read from there) until the mark it as swap, and add it to the virtual I have no idea what I am approving. RAM is needed more urgently by some- memory like a partition. The following There is usually an “Experts Only” but- thing else (such as a running program example shows this with a 100MB file on ton, which leads to a new page where that requests memory for graphics, for /var: everything is expressed in terms of parti- example). tion names and locations on the disk. As an example of how memory usage dd if=/dev/zero of=/var/swap U Why would an expert want to use a dif- works, OpenOffice will need about 100 bs=1024k count=100 ferent partition configuration, and if so, megs of RAM when you start it for the mkswap /var/swap is there a reason why I would want to do first time. As your working document swapon /var/swap so? Is there an advantage to changing grows and contains elements from differ- the size of the swap file or the location ent parts of OpenOffice, other compo- and now, you have 100MB more swap. of the partitions on the disk? nents will be needed, like a spreadsheet To make this permanent, put this line or drawing or presentation component. into /etc/fstab: It is an advantage to create par- You can end up using 300 megs or more titions in a way that is optimal by just running OpenOffice for a while. /var/swap none swap sw 0 0 for the desired purpose of the The KDE desktop also needs about 100 specific GNU/Linux installation. If this is MB for itself, and if you open the Firefox Dedicated swap partitions are much your first-time Linux installation, and browser, the Gimp graphics manipula- faster than swap files, since there is less

WWW.LINUX- MAGAZINE.COM ISSUE 63 FEBRUARY 2006 51 KNOW-HOW Ask Klaus!

filesystem overhead. (The kernel writes vertise Linux compatibility, but I was gives you an overview of printers which directly to the partition, instead of call- able to set up the printer easily in my have been shown to work extremely ing file system functions.) KDE-based Linux system using a PPD well. For file system partitions, separating file I downloaded from the web. The In some cases, the printer vendor has “often written” data from “mostly static” printer works fine for printing docu- a special status monitor program, such data can be useful. This precaution en- ments. The one problem is that I don’t as a “Printer LCD display monitor” for sures that one overflowing partition get the usual messages from the printer Linux, which works independently of (with logfiles, for instance) won’t affect if something goes wrong (paper jam, out CUPS and fetches information (read- others, and you will still be able to login of ink, etc.). I just get a standard mes- only) directly from the printer connector. and solve the problem (at least, in most sage saying something like “Printer Especially for printer/scanner combina- cases) without having to switch to an Error.” Is there any way to receive the tions, third-party add-on programs like administrative runlevel. Having every- same feedback messages from the this sometimes let you access or at least thing on a single partition, on the other printer that (according to the manual) view the “hidden features” of the printer. hand, has the advantage that the avail- Windows users receive? I personally don’t like them much if they able space is shared by everything and come only in binary form and without you don’t have to worry about resizing CUPS messages usually go to a license that allows me to analyze or partitions when one of them is running /var/log/cups/error_log and modify them. out of space. /var/log/cups/access_log. Their Just check the driver CD that comes I usually use one partition for the “in- verbosity depends on the setting of Log- with the printer for any native Linux us- stalled system files” (containing the root Level in /etc/cups/cupsd.conf (see the de- erspace programs, or again, you can file system and /usr), one partition for scription of log levels in Listing 1). check linuxprinting.org, which some- the frequently written-to /var file system So, you may get more information times has links to third-party or vendor- (also containing logfiles and /tmp), one about the driver internals if you set the supplied addon programs for specific encrypted partition for authentication LogLevel to debug or even debug2 in / printer models. keys, passwords, and backups of cus- etc/cups/cupsd.conf. (Don’t forget to re- For your HP 1200 printer, linuxprint- tomer data, one partition for my /home start CUPS using /etc/init.d/cupsys re- ing.org recommends checking out the directory, and one partition for experi- load in Debian.) hplip driver on sourceforce http:// ments and “unimportant data” like test The kind and visibility of information hpinkjet.sourceforge. net/ for extended installations. given by a PPD file really depends on its features such as status and maintenance Something like this: structure and configuration, so it may reports. I well be that certain features of that /dev/hda1 5GB / printer cannot be accessed directly from Listing 1: CUPS Log Levels /dev/hda5 2GB /var within CUPS. 01 # Log level (LogLevel) /dev/hda6 1GB /crypt For a table of supported printers and 02 # /dev/hda7 8GB /home capabilities, http:// www. linuxprinting. /dev/hda8 20GB /mnt/scratch org/ is a good address for research. 03 # Controls the number of messages logged to the Of course, this setup is very individual, ErrorLog and you will have to repartition and re- 04 # file and can be one of the configure every once in a while when following: one or the other partition is filled up, or 05 # whenever a disk upgrade is planned. 06 # debug2: Log If you have several disks, it also makes everything. sense to distribute partitions that contain frequently used data across different 07 # debug: Log almost controllers (for example, /dev/hda1 con- everything. tains the system files, and /dev/hdc1 the 08 # info: Log all home directory, /tmp or /var). This re- More specifically for the printer we requests and state changes. duces disk head movement in parallel have been discussing, linuxprinting.org 09 # warn: Log errors and read/write operations. For video data says at http:// www. linuxprinting. org/ warnings. processing, spreading the partitions show_printer. cgi?recnum=HP-Business_ 10 # error: Log only across different controllers can be essen- Inkjet_1200 that this printer works per- errors. tial to achieve the throughput necessary fectly with Linux/CUPS, therefore you to encode videos in real time. should not need a custom PPD, but only 11 # none: Log nothing. the installed hpijs driver (and a current 12 # Printer Problems CUPS version). 13 # ex: info I have an HP 1200 Business Ink- If you are searching for a new printer 14 # jet printer. The box for the that is well supported by CUPS, http:// printer did not specifically ad- www. linuxprinting. org/ suggested. html 15 # Default: LogLevel info

52 ISSUE 63 FEBRUARY 2006 WWW.LINUX- MAGAZINE.COM