Category Archives: Uncategorized

Dell XPS M1530 Ubuntu Trackpad

On Dell XPS M11530 with BiosĀ  A08, The following line to the kernel in
/boot/grub/menu.lst needs to be set for the trackpad to not go Bersek

i8042.nomux=1

Also, to enable scrolling, edit /etc/X11/xorg.conf, under “Input Device” section,

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "on"
Option "SHMConfig" "on"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
Option "LeftEdge" "85"
Option "RightEdge" "910"
Option "TopEdge" "85"
Option "BottomEdge" "715"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
EndSection

Installing PHP with Oracle support

Oracle 10g Instant Client (free download available) is
the easiest way for PHP to connect to a remote Oracle database, requiring
installation of only three libraries.

The Instant Client libraries used by PHP
access Oracle’s current API, called OCI8. (This C interface takes its
name from being first introduced in Oracle8.)
PHP Oracle 8
Functions
can call Oracle 8.1.7, 9.x, or 10.x directly, or optional
abstraction classes like PEAR MDB2 and ADOdb can be used for
convenience.

Download the instantclient-basic and instantclient-devel packages from the download page:

1. http://download.oracle.com/otn/linux/instantclient/11106/oracle-instantclient-basiclite-11.1.0.1-1.i386.rpm

2.  http://download.oracle.com/otn/linux/instantclient/11106/oracle-instantclient-devel-11.1.0.1-1.i386.rpm

Install the RPMs and use the following to compile and install PHP

./configure –with-apxs2=/usr/local/apache/bin/apxs –with-mysql –with-zlib –with-gd –prefix=/usr/local/php5 –with-gd –with-curl –enable-sockets –with-mysqli –with-jpeg –with-zlib –with-png –with-gd –with-curl=/usr/local/curl7  –with-oci8=instantclient,/usr/lib/oracle/11.1.0.1/client/lib/

make
make install

Deleting files with special characters

You can delete a file with strange characters (especially hidden characters) by it’s inode number.

To find the inode number of a file, list the directory with the -i option:

ram# ls -i
2064227 test

2064227 is the inode number of the file ‘test’.

Use the find command to delete the file by it’s inode number:

find . -inum 2064227 -exec rm {} ;

T-Mobile Hotspot & Parallels on OS X

If you are using T-Mobile hotspot and would like to use the Guest OS also to get access to the net, do the following:

  1. Use host only networking with DHCP on the guest OS (Windows XP, in my case).
  2. On the native OS (OS X), configure internet sharing of airport with en2 (this is the Parallels Host-Guest Adapter). You would now see that the connectivity on XP goes out and then is re-established. Now, XP would have connectivity to the net.

Technorati Tags: , ,

Creating a Swap File

If you don’t have a partition free to allocate additional swap space, you can create a swapfile on an existing file system.

The following example creates and enables a 16 MB swapfile called /var/swapfile:

dd if=/dev/zero of=/var/swapfile bs=1024 count=16384
mkswap /var/swapfile
swapon /var/swapfile

rndc: the key is invalid

———
Issue:
———
While starting named, or when running /etc/rc.d/init.d/named status, you get the following error:
rndc: connection to remote host closed This may indicate that the remote server is using an older version of the command protocol, this host is not authorized to connect, or the key is invalid.
——-
Fix:
——-

Run rndc-confgen.
running rndc-confgen would ouput something like this:
# Start of rndc.conf
key “rndc-key” {
algorithm hmac-md5;
secret “lYzcmf255w8BC6PHTSYCQA==”;
};

options {
default-key “rndc-key”;
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:
# key “rndc-key” {
# algorithm hmac-md5;
# secret “lYzcmf255w8BC6PHTSYCQA==”;
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { “rndc-key”; };
# };
# End of named.conf

do as mentioned in the output, that is, copy the rndc.conf part to /etc/rndc.conf (of course, remove all the existing entries)
in /etc/named.conf, remove the existing key and controls section, and paste the one from the output of rndc-confgen.
restart named (/etc/rc.d/init.d/named restart).
This fixes the issue