Tips & Tricks


General matters go here...
See "General Notes" before applying the answers in this chapter.

How to restart KDE without rebooting computer?

  1. Log-out of KDE (get to main -KDM- login screen),
  2. Press '([Ctrl]+[Alt])+[Backspace]', i.e. while holding [Ctrl] and [Alt] keys down, press the [Backspace] key, just like the way you would press Ctrl+Alt+Delete to logout/reboot.


How to turn Num Lock On or Off, upon KDE startup?

  1. Click through...



How to run programs automatically upon KDE startup?

Kubuntu is already saving your session status upon logout, and restoring your previous programs on the next login, by default. All you need to do is, logging out from KDE while the applications you want to be auto-restored are still open (make sure their contents are saved).

But if you want to start each KDE session always with the same set of programs, regardless of how you logged out from the previous session:

  1. Click through...

  2. Select in KDE Session Manager. This will cause a button appear on the K-Menu. Other choices are:
    • Restore previous session: Will save all applications running on exit and restore them on the next start up. This is default Kubuntu behavior.
    • Restore manually saved session: Allows the session to be saved at any time via "Save Session" in the K-Menu. This means the currently started applications will reappear on the next start up.
    • Start with an empty session: Do not save anything. Will come up with an empty desktop on the next start.
  3. Open the applications you want to be auto-restored at each KDE start up. Close others.
Note: The default Kubuntu behavior of automatically restoring previous session status may also restore residual "run away" processes from the previous session. Moreover, some of these run away processes may never die off, so they may continually inherit from one session to the next, creating an unnecessary burden on system resources, without you being aware of it. For this reason, I would suggest either using or adding the "Runaway Process Catcher" applet to the panel (right click on panel -> Add to Panel -> Applet -> Runaway Process Catcher)

How to switch to Console mode in KDE?



How to open each folder in a separate window in Konqueror?

  1. Click through to "Konqueror Behavior" tab via either one of the routes below,
    • :: __

    • Or,
    • Konqueror ::



How to show all hidden files/folders in Konqueror?

While Konqueror in a directory tree (i.e. not displaying a file content),

Konqueror ::



How to show Trash icon on Desktop?

  1. Right-click on (trash.desktop) icon, select "Open with..." from the pop-up menu, and open it with "kwrite" as below:
  2. Find the line,

    Hidden=true

  3. And change it to,

    Hidden=false

  4. Exit from kwrite, saving the file.


How to change default file type "Open with" program?



How to edit text files as root user?

Throughout this document occasionally we need to edit a file as root user. Here is the summary of several ways of how to do this. It's assumed that you need to edit "/etc/foo/bar.conf" file.

How to disable beep sound in Konsole?

Konsole ::



How to load programs faster (prelink)?

  1. Install package: prelink
  2. sudo cp /etc/default/prelink /etc/default/prelink.`date +%y%m%d-%H%M%S`
  3. Edit "/etc/default/prelink" as root, and find this line:
    PRELINKING=unknown
  4. Change it to:
    PRELINKING=yes
  5. Exit from kwrite, saving the file.
  6. sudo prelink -avmR
    sudo /etc/cron.daily/prelink


How to load web sites faster in Konqueror?

sudo -i
cp -a /etc/environment /etc/environment.`date +%y%m%d-%H%M%S`
echo "KDE_NO_IPV6=true" >> /etc/environment
logout


How to load web sites faster in Firefox?

  1. Firefox address (URL) bar: [about:config ]
  2. Filter : [network. ]
    ... ... ... ...
    network.dns.disableIPv6 true
    network.http.pipelining true
    network.http.pipelining.maxrequests 8
    network.http.proxy.pipelining true
  3. Right click anywhere and select "New" then "Integer". Name it "nglayout.initialpaint.delay" and make its value "0" (zero).


How to import Firefox plug-ins into Konqueror?

Konqueror :: :: __ ::



How to disable beep sound for link find function in Firefox?

  1. Firefox address (URL) bar: [about:config ]
  2. Filter : [access ]
    ... ... ... ...
    accessibility.typeaheadfind.enablesound false


How to rename all files in directory at once?

Download and install "krename" program. (http://www.krename.net/)

How to read "man" and "info" documents in Konqueror?



How to save "man" outputs into file?



How to generate MD5 checksum of a file?

md5sum file.iso > file.iso.md5


How to check MD5 checksum of files?

The "file.iso.md5" file contains one or more pairs of file names and their md5 values. At least one (usually all) of the files mentioned in "file.iso.md5" should also exist in the current directory, along with "file.iso.md5" file.
md5sum -cv file.iso.md5


How to mount/unmount Image (ISO) files without burning?

  1. Mount image (ISO) file,
    sudo mkdir -p /mnt/iso
    sudo modprobe loop
    sudo mount file.iso /mnt/iso -t iso9660 -o loop
  2. Unmount Image (ISO) file,
    sudo umount -d /mnt/iso


How to hide GRUB menu on boot-up?

  1. sudo cp -a /boot/grub/menu.lst /boot/grub/menu.lst.`date +%y%m%d-%H%M%S`
  2. Edit "/boot/grub/menu.lst" as root, find this line:
    #hiddenmenu
  3. Uncomment it, i.e. change it to:
    hiddenmenu
  4. Exit from kwrite, saving the changes.


How to change the timeout seconds for GRUB menu on boot-up?

To chage the timeout from 3 to 10 seconds:
  1. sudo cp -a /boot/grub/menu.lst /boot/grub/menu.lst.`date +%y%m%d-%H%M%S`
  2. Edit "/boot/grub/menu.lst" as root, find this line:
    timeout 3
  3. Change it to:
    timeout 10
  4. Exit from kwrite, saving the changes.


How to change default Operating System boot-up for GRUB menu?

To chage the default OS from the first entry in GRUB menu to the 5th (note that counting starts from 0):
  1. sudo cp -a /boot/grub/menu.lst /boot/grub/menu.lst.`date +%y%m%d-%H%M%S`
  2. Edit "/boot/grub/menu.lst" as root, find this line:
    default 0
  3. Change it to:
    default 4
  4. Exit from kwrite, saving the changes.


How to temporarily skip boot-up services?

Press '[Ctrl]+[C]'

How to permanently disable/enable boot-up services?

Kubuntu inherits the Debian policy of disregarding non-executable scripts in initialization sequences, cron jobs, etc. (system triggered tasks). So, you can disable/re-enable a given script (of which, execution is controlled by Kubuntu) without removing it.

Which KDE config files change by a given Control Center setting?

This only works for settings that don't need root privileges, i.e. settings only affecting the user, which are kept in '$HOME/.kde/' directory hierarchy. That being said, if you want to know which parameter in which file in the '~/.kde/' hierarchy is deciding a particular behavior:
  1. cd
    rm -rf dot.kde
    cp -a .kde dot.kde
  2. ...do your settings, modifications, etc. in Control Center (kcontrol).
  3. diff -r dot.kde .kde | less
    This gives you the laundry list of precisely what has been changed in what way by the modifications you've just done in Control Center.
As an exception,

...settings are kept in '$HOME/.kderc' file.

How to run custom startup scripts upon base system boot?

  1. sudo mkdir /etc/rc.boot
  2. Copy your boot scripts to /etc/rc.boot directory and make sure they are executable. Assuming that they're in a hypotethical ${MY_BOOT_SCRIPTS} directory:
    sudo cp ${MY_BOOT_SCRIPTS}/* /etc/rc.boot
    sudo chmod +x /etc/rc.boot/*
They will be executed in alphanumerical collating order, after '/etc/init.d/rcS' script is run, and before any script in /etc/rc2.d/* (which are just symbolic links -shortcuts- to actual scripts in /etc/init.d/*) is run, i.e. just before "Entering run level 2..." boot message.

How to run custom startup/shutdown script upon full system boot?

  1. Name your post-boot script as -e.g.- "zzboot" or something similar which sorts last. If you need to run several scripts, then call them all from within "zzboot".
  2. Copy it to /etc/init.d directory, make sure that it is executable, then make it part of boot process so as to run it last while booting up, and first while shutting down:
    sudo cp zzboot /etc/init.d
    sudo chmod +x /etc/init.d/zzboot
    sudo update-rc.d zzboot defaults 99 01
  3. Also see "How to permanently disable/enable boot-up services"
Note that,

How to print?

How to fax "anything printable"?

How to convert "anything printable" into PDF format?



A trade-off to improve graphics performance.

Use 16-bit color depth (64K colors), instead of 24-bit (16M colors). This may affect color quality a bit, but usually almost doubles graphics performance, depending on driver specifics.
  1. sudo cp -a /etc/X11/xorg.conf /etc/X11/xorg.conf.`date +%y%m%d-%H%M%S`
  2. Edit'/etc/X11/xorg.conf' as root, and change this line,
    Section "Screen"
    ... ...
    DefaultDepth 24
    to this one:
    Section "Screen"
    ... ...
    DefaultDepth 16
  3. Restart X by logging out of KDE and pressing ([Ctrl]+[Alt])+[Backspace]
Run glxgears before and after the change, to see the effect on graphics performance (the higher FPS the better):
glxgears