“Never memorize something that you can look up.”

This page was created to be a one stop reference for common but infrequent tasks in PC. It is therefore more like a web-log than a post, and will continuously be updated.


Adding to PATH:

Open /home/[user]/.bashrc and add to the end:


PATH=$PATH:/home/[user]/bin:/home/[user]/jdk1.6.0_23/bin
export PATH

(In this example we are adding /home/[user]/bin and /home/[user]/jdk1.6.0_23/bin).
From a terminal, source the above file to make it active:


#source ~/.bashrc

Checking Package Version (Debian):


dpkg -s
v

Link Mozilla to use custom Java

$ mkdir ~/.mozilla/plugins
$ cd $JDK_HOME
$ ln -s jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Deleting Flash Cookies (Linux):

Delete the directory ~/.macromedia

Changing order of “Open in New Tab” in Right-Click Contextual Menu of Firefox:
(An annoying change in the order w.e.f. Firefox 4)

Add the lines below the first executable line in [%APPDATA%\Firefox\Profiles\default\chrome\userChrome-example.css] and rename the file to userChrome.css:


#contentAreaContextMenu > * { -moz-box-ordinal-group: 2; }
#context-openlink { -moz-box-ordinal-group: 1 !important; }

List the installed packages
This is very useful if you want to check before installing/ upgrading a package or its dependencies. Write to a file with date, so that it is easier to refer and find. The console output can further be searched for a package string using grep.


SUSE-prompt# rpm -qa > filename_date.txt
Debian-prompt# dpkg --list > filename_date.txt

Change KDM theme
The KDM theme needs some manual tweak to work, as selecting a theme from the Control Center does not actually work even though it asks for root password to apply. This is a known issue in KDE4.

To ensure the theme gets selected, manually add its name (usually same as name of the folder containing its files, found in /usr/share/kde4/apps/kdm/themes/) to the file /etc/sysconfig/displaymanager in the line DISPLAYMANAGER_KDM_THEME=”SUSE”. Replace SUSE with name of the folder/ theme.

Force-disable KDE autostart applications
The KDE autostart applications are located at /usr/share/autostart. To disable an application from starting at boot if it does not work through the KDE control center, simply rename the file to something else such that it has a different extension than desktop. Renaming is better than deleting as it can be recovered in case of emergency. For example, disable nepomuk desktop search engine thus:


SUSE-root# mv nepomukserver.desktop nepomukserver.desktop.temp

Unmount USB drives manually
1. Check the drive by label that is mounted (assuming it auto-mounts when plugged-in):

Linux-prompt# mount

2. Unmount the drive partitions:

Linux-prompt# sudo umount /dev/sdb1

3. If the drive partition still shows up in File Manager, right-click and “Safely Remove”.

Reduce Firefox and Thunderbird memory consumption when minimized
Open about:config (Firefox), Tools > Options > Advanced > Config Editor (Thunderbird)
Add new key (Right click > New)

Type: Boolean
Key Name: config.trim_on_minimize
Key Value: true