Thursday, July 09, 2009

Install local .deb packages

Ususally, apt-get is used to install/update/remove packages. It is preferred because it can automatically resolve package dependency.

However, sometimes you must download a .deb package file and install it from local disk. dpkg can do this task.
dpkg -i package_name_here
However, dpkg does NOT resolve package dependency. So it is likely that the installed program won't work.
You can fix it by using command
apt-get -f install

Another solution is documented here:
http://www.debian.org/doc/manuals/apt-howto/ch-basico.en.html#s-dpkg-scanpackages.
The idea is to build a tarball (Packages.gz) that can be recognized by apt tools. Then you can install the program by using apt-get command. (In other words, .deb does not contain enough information which is required by apt tools).

Resources
APT HOWTO: http://www.debian.org/doc/manuals/apt-howto/

Some linux notes about hardware inspection

PCI (Peripheral Component Interconnec)

PCI is the dominant bus standard. In linux, its device files are located at /proc/bus/pci.
Command lspci can be used to list your PCI devices. It can display <[domain id]:bus id:device id.function number> in addition to device type. You can use -v switch to get verbose information. Switch -k is useful to get corresponding kernel modules.
Resource: http://tldp.org/LDP/tlk/dd/pci.html

DMI (Desktop Management Interface)

From wiki

"Essentially, to the user, it is a table provided by the personal computer BIOS which can be parsed and which gives information about the BIOS and the computer system in a standardized way."

dmidecode is a tool on linux that can be used to get computer information (motherboard, BIOS, ...)via DMI.
DMI is part of SMBIOS.
Resources: http://en.wikipedia.org/wiki/Desktop_Management_Interface

USB

Command lsusb can be used to list your USB devices.

Resources

TLDP (The linux document project: http://en.tldp.org/)
This web site contains a lots of useful HOWTO articles. Also it has in-depth articiles to introduce internal knowledge of linux kernel. Almost every aspect of linux is included.
A great PCI article: http://tldp.org/LDP/tlk/dd/pci.html
RedHat enterprise linux 5 Release Notes
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Release_Notes/singles/relnotesU2-x86.html
RedHat linux deployment guide
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/index.html
Although it contains some RedHat linux specific stuff, you still can find lots of common knowledge that is shared by other linux distros.
Linux devide list
http://www.lanana.org/docs/device-list/
Linux Foundation
Its publication includes some interesting papers which can be accessed http://www.linuxfoundation.org/collaborate/publications/.

Synergy bugs - left and down keys don't repeat

I am using Synergy to share keyboard and mouse between two machines.

However, the left and down keys don't repeat. Here is the reported bug:
https://bugs.launchpad.net/ubuntu/+source/synergy/+bug/281546
Also a workaround is given (https://bugs.launchpad.net/ubuntu/+source/synergy/+bug/281546/comments/5).
The idea is basically to set the two keys 'autorepeat' using following commands:

xset r 116 #for down key
xset r 113 #for left key

You should replace with keycodes of your keyboard.
Some information about this bug is included in http://ubuntuforums.org/showthread.php?t=965393.