Install Keepass2 on Kubuntu 13.04

Install mono:

sudo apt-get install mono-complete -y

Download the zip version of Keepass2. Note it contains .exe file.

Extract it to ~/Keepass

unzip KeePass-2.23.zip -d ~/Keepass

Create a directory ~/Keepass/plugins

mkdir ~/Keepass/plugins

Download the two main plugins for Keepass:

KeePassRPC.plgx is available locally once Keefox for Firefox is installed. Mine was at [email protected]nson/deps
The location is suggested by Firefox itself on restarting it after installing Keefox.

Copy it to ~/Keepass/plugins

cp [email protected]ris.tomlinson/deps/KeePassRPC.plgx ~/Keepass/plugins/

KeepassHttp.pglx is available at https://raw.github.com/pfn/keepasshttp/master/KeePassHttp.plgx

Copy it to ~/Keepass/plugins

wget https://raw.github.com/pfn/keepasshttp/master/KeePassHttp.plgx
mv KeePassHttp.plgx ~/Keepass/plugins/

Now, run Keepass by running:

/usr/bin/mono ~/Keepass/KeePass.exe

For ease of use, create a shortcut in K Menu and add this command there.

It will compile the two plugins and start up. You need to install Chromipass and Keefox for Browser integration

For Autotype:

SystemSettings>Shortcuts and Gestures>Custom Shortcuts>New Global Shortcut

Command: /usr/bin/mono ~/Keepass/KeePass.exe

Key: Win+A

Resources:

http://keepass.info/help/v2/setup.html#mono


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to set up private nameservers (DNS servers)

Requirements:

  • A VPS with Debian 6 64 bit minimal (Any distro should do, but the example uses Debian 6)

Steps:

Install bind9:

apt-get update
apt-get install bind9

Now, edit this file:

#cat /etc/bind/named.conf.options
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

And:

# cat /etc/bind/named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

// Domain Management drjoel.in

zone "drjoel.in" {
     type master;
     file "/var/lib/bind/db.drjoel.in";
     allow-update { key rndc-key; };
};
# This is the zone definition for reverse DNS. replace 31.167.199 with your network address in reverse notation - e.g my network address is 199.167.31
zone "31.167.199.in-addr.arpa" {
     type master;
     file "/etc/bind/zones/rev.14.31.167.199.in-addr.arpa";
};

You can check /etc/bind/named.conf.local for errors with:

#named-checkconf

If it finds errors, it will report like this:

 #named-checkconf
/etc/bind/named.conf.local:15: missing ';' before '}'

Now edit the master zone file for drjoel.in. This is the main zone record file (resource record file). No blank lines are permitted, except for a newline at the bottom. The latter is compulsory.

#cat "/var/lib/bind/db.drjoel.in"
drjoel.in.       IN      SOA     ns1.joel.co.in. admin.drjoel.in. (
                   2007010401           ; Serial
                         3600           ; Refresh [1h]
                          600           ; Retry   [10m]
                        86400           ; Expire  [1d]
                          600 )         ; Negative Cache TTL [1h]
;
drjoel.in.      IN      NS      ns1.joel.co.in.
drjoel.in.      IN      NS      ns2.joel.co.in.
drjoel.in.      IN      MX      10 aspmx.l.google.com.
drjoel.in.      IN      MX      20 alt1.aspmx.l.google.com.
drjoel.in.      IN      MX      20 alt2.aspmx.l.google.com.
drjoel.in.      IN      MX      30 aspmx2.googlemail.com.
drjoel.in.      IN      MX      30 aspmx3.googlemail.com.
drjoel.in.      IN      MX      30 aspmx4.googlemail.
drjoel.in.      IN      A       198.23.228.223
ns1.            IN      A       199.167.31.14
ns2.            IN      A       38.114.103.106
*.drjoel.in.    3600    IN      CNAME   drjoel.in.

The main records to note are the first line:

drjoel.in.       IN      SOA     ns1.joel.co.in. admin.drjoel.in. (

Here, the first word is “drjoel.in.”. Note the period at the end. Note that all domain names have a period at the end. The fourth coloumn has the primary nameserver. The last coloumn “admin.drjoel.in.” actually denotes the email address “[email protected]”.

Now edit the file for reverse records:

#cat "/etc/bind/zones/rev.14.31.167.199.in-addr.arpa"
//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 1, as my IP address is 192.168.0.1.
@ IN SOA ns1.drjoel.in. admin.drjoel.in. (
                        2006081401;
                        28800;
                        604800;
                        604800;
                        86400
)

                     IN    NS     ns1.drjoel.in
14                   IN    PTR    drjoel.in

Here, my server’s ipv4 address is 199.167.31.14. The last number 14 is what is typed in the last line on the file.

The resource record file too can be checked for errors. This is with:

named-checkzone

It is invoked as follows. A sample error message is shown:

#named-checkzone relsoft.in /var/lib/bind/db.relsoft.in
/var/lib/bind/db.relsoft.in:1: no TTL specified; using SOA MINTTL instead
/var/lib/bind/db.relsoft.in:17: ignoring out-of-zone data (www)
/var/lib/bind/db.relsoft.in:18: ignoring out-of-zone data (ns1)
/var/lib/bind/db.relsoft.in:19: ignoring out-of-zone data (ns2)
zone relsoft.in/IN: NS 'ns1.relsoft.in' is a CNAME (illegal)
zone relsoft.in/IN: NS 'ns2.relsoft.in' is a CNAME (illegal)
zone relsoft.in/IN: not loaded due to errors.

 

Now, I need to edit /etc/resolv.conf:

#cat /etc/resolv.conf
search drjoel.in
nameserver 199.167.31.14

Here, the nameserver is the ip of this server

Once done, restart bind9:

service bind9 restart

Adding a second domain to use the same nameserver. The zone files etc are created just like previously. The only difference is in the resolv.conf file, which now looks like:

cat /etc/resolv.conf
search drjoel.in relsoft.in
nameserver 199.167.31.14

Note that relsoft.in has been added.

Adding a vanity DNS server:

#cat /var/lib/bind/db.relsoft.in
relsoft.in.       IN      SOA     ns1.joel.co.in. admin.relsoft.in. (
                   2007010401           ; Serial
                         3600           ; Refresh [1h]
                          600           ; Retry   [10m]
                        86400           ; Expire  [1d]
                          600 )         ; Negative Cache TTL [1h]
;
relsoft.in.     IN      NS      ns1.relsoft.in.
relsoft.in.      IN      NS      ns2.relsoft.in.
relsoft.in.      IN      MX      10 aspmx.l.google.com.
relsoft.in.      IN     MX      20 alt1.aspmx.l.google.com.
relsoft.in.      IN      MX      20 alt2.aspmx.l.google.com.
relsoft.in.      IN     MX      30 aspmx2.googlemail.com.
relsoft.in.      IN     MX      30 aspmx3.googlemail.com.
relsoft.in.      IN     MX      30 aspmx4.googlemail.com.
relsoft.in.     IN      A       198.23.228.223
www.            IN      A       198.23.228.223
ns1.relsoft.in.         IN      A       199.167.31.14
ns2.relsoft.in.         IN      A       38.114.103.106
mail.relsoft.in.        3600    IN      CNAME   ghs.google.com
*.relsoft.in.   3600    IN      CNAME   relsoft.in.

 

zone "relsoft.in" {
     type master;
     file "/var/lib/bind/db.drjoel.in";
     allow-update { key rndc-key; };
     allow-transfer { 199.167.31.14; };
};

Note the line:

allow-transfer { 199.167.31.14; };

Also note that the zone record for relsoft.in now has A records of ns1 and ns2 pointing to the ips of the actual nameservers (at ns1.joel.co.in, and ns2.joel.co.in), as did drjoel.in. But in addition, note that ns records now point to ns1.relsoft.in instead of ns1.joel.co.in. That’s a vanity DNS server. It looks like relsoft.in has its own nameserver, while in reality it is using the ns1.joel.co.in nameserver.

Before adding a Vanity server:

#dig ANY relsoft.in

; <<>> DiG 9.9.2-P1 <<>> ANY relsoft.in
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20966
;; flags: qr rd ra; QUERY: 1, ANSWER: 10, AUTHORITY: 2, ADDITIONAL: 6

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;relsoft.in.                    IN      ANY

;; ANSWER SECTION:
relsoft.in.             600     IN      A       198.23.228.223
relsoft.in.             600     IN      MX      30 aspmx3.googlemail.com.
relsoft.in.             600     IN      MX      20 alt1.aspmx.l.google.com.
relsoft.in.             600     IN      MX      30 aspmx4.googlemail.
relsoft.in.             600     IN      MX      10 aspmx.l.google.com.
relsoft.in.             600     IN      MX      30 aspmx2.googlemail.com.
relsoft.in.             600     IN      MX      20 alt2.aspmx.l.google.com.
relsoft.in.             600     IN      SOA     ns1.joel.co.in. admin.relsoft.in. 2007010401 3600 600 86400 600
relsoft.in.             600     IN      NS      ns2.joel.co.in.
relsoft.in.             600     IN      NS      ns1.joel.co.in.

;; AUTHORITY SECTION:
relsoft.in.             600     IN      NS      ns1.joel.co.in.
relsoft.in.             600     IN      NS      ns2.joel.co.in.

;; ADDITIONAL SECTION:
alt2.aspmx.l.google.com. 42     IN      A       173.194.64.27
alt2.aspmx.l.google.com. 70     IN      AAAA    2607:f8b0:4003:c02::1a
aspmx3.googlemail.com.  100     IN      A       173.194.64.27
ns1.joel.co.in.         85648   IN      A       199.167.31.14
ns2.joel.co.in.         920     IN      A       38.114.103.106

;; Query time: 163 msec
;; SERVER: 89.233.43.71#53(89.233.43.71)
;; WHEN: Sun May  5 07:26:17 2013
;; MSG SIZE  rcvd: 427

After:

#dig ANY relsoft.in

; <<>> DiG 9.9.2-P1 <<>> ANY relsoft.in
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55308
;; flags: qr rd ra; QUERY: 1, ANSWER: 10, AUTHORITY: 2, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;relsoft.in.                    IN      ANY

;; ANSWER SECTION:
relsoft.in.             600     IN      A       198.23.228.223
relsoft.in.             600     IN      MX      30 aspmx3.googlemail.com.
relsoft.in.             600     IN      MX      20 alt2.aspmx.l.google.com.
relsoft.in.             600     IN      MX      20 alt1.aspmx.l.google.com.
relsoft.in.             600     IN      MX      30 aspmx2.googlemail.com.
relsoft.in.             600     IN      MX      10 aspmx.l.google.com.
relsoft.in.             600     IN      MX      30 aspmx4.googlemail.com.
relsoft.in.             600     IN      SOA     ns1.joel.co.in. admin.relsoft.in. 2007010401 3600 600 86400 600
relsoft.in.             600     IN      NS      ns1.relsoft.in.
relsoft.in.             600     IN      NS      ns2.relsoft.in.

;; AUTHORITY SECTION:
relsoft.in.             600     IN      NS      ns2.relsoft.in.
relsoft.in.             600     IN      NS      ns1.relsoft.in.

;; ADDITIONAL SECTION:
alt2.aspmx.l.google.com. 115    IN      AAAA    2607:f8b0:4003:c02::1a

;; Query time: 353 msec
;; SERVER: 89.233.43.71#53(89.233.43.71)
;; WHEN: Sun May  5 07:45:14 2013
;; MSG SIZE  rcvd: 357

Note that:

relsoft.in.             600     IN      NS      ns1.joel.co.in.
relsoft.in.             600     IN      NS      ns2.joel.co.in.

has been replaced by:

relsoft.in.             600     IN      NS      ns2.relsoft.in.
relsoft.in.             600     IN      NS      ns1.relsoft.in.

Troubleshooting

Immediately after editing records, you have to check for syntax errors with:

named-checkconf
named-checkzone kgimoa.com /var/lib/bind/db.kgimoa.com

 

Checking error logs:

Bind9 error logs on Debian are stored in /var/log/daemon.log

#tail -n 10 /var/log/daemon.log
May  5 07:41:21 ns1 named[5846]: zone drjoel.in/IN: loaded serial 2007010401
May  5 07:41:21 ns1 named[5846]: /var/lib/bind/db.relsoft.in:1: no TTL specified; using SOA MINTTL instead
May  5 07:41:21 ns1 named[5846]: /var/lib/bind/db.relsoft.in:17: ignoring out-of-zone data (www)
May  5 07:41:21 ns1 named[5846]: zone relsoft.in/IN: loaded serial 2007010401
May  5 07:41:21 ns1 named[5846]: zone localhost/IN: loaded serial 2
May  5 07:41:21 ns1 named[5846]: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found
May  5 07:41:21 ns1 named[5846]: managed-keys-zone ./IN: loaded serial 0
May  5 07:41:21 ns1 named[5846]: running
May  5 07:41:21 ns1 named[5846]: zone drjoel.in/IN: sending notifies (serial 2007010401)
May  5 07:41:21 ns1 named[5846]: zone relsoft.in/IN: sending notifies (serial 2007010401)

 Automating nameserver synchronization

You can use an rsync in cron:

Example on my primary nameserver:

#crontab -l
# m h  dom mon dow   command
*/5 * * * * /usr/bin/rsync -az /var/lib/bind [email protected]:/var/lib/bind
*/5 * * * * /usr/bin/rsync -az /etc/bind/named.conf.local [email protected]:/etc/bind/named.conf.local

Those two lines are enough to sync DNS entries between the two nameservers. In terms of redundancy, I’m not sure how right I am, since if one of the servers has wrong entries, both entries get corrupt. However, since nameserver records are supposed to be identical, this is the only way I can assure that they are in sync perfectly.

Summary of Creation of a new zonefile (Checklist)

  1. Create the zone file from scratch or a template
  2. Edit the zone file and add proper entries
  3. Check the zone file with named-checkzone
  4. Create the entries for the zone file in /etc/bind/named.conf.local
  5. Restart bind9 manually, or optionally create a cron job that restarts the job every x mins
  6. Optionally create a symbolic link to /home.

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to install php-clamav

First download, build and install clamav. I found that Debian Squeeze’s clamav in the apt package was not detected by the php-clamav installation script.

So:

wget http://downloads.sourceforge.net/clamav/clamav-0.97.6.tar.gz
tar -xvvf clamav-0.97.6.tar.gz
cd clamav-0.97.6
./configure
make
make install

Now download , build and install php-clamav

wget http://nchc.dl.sourceforge.net/project/php-clamav/0.15/php-clamav_0.15.7.tar.gz
tar -xvvf php-clamav_0.15.7.tar.gz
cd php-clamav-0.15.7/
phpize
./configure --with-clamav
make
make install

Once installed, you need to enable php-clamav.

First edit the clamav configuration file:

emacs /usr/local/etc/clamd.conf

Read the file and set your options. At the bare minimum, you need to comment out this line:

Example

So it reads this:

#Example

Now run clamscan and test that it works:

[[email protected]] /etc/php5/conf.d #clamdscan -V
ClamAV 0.97.6

If there’s an issue with the configuration, at this point it will notify you to correct it. If everything is alright, it will report the version.

Now you need to setup so that clamav php extension loads up whenever the web server is loaded.

Create a new text file in /etc/php5/conf.d/clamav.ini with the following content:

extension=clamav.so

Now restart apache2 on the webserver and load a php file with the function phpinfo (assuming it is enabled on your server of course). You can confirm that the extension is loaded by the fact that phpinfo reports a whole new section for clamav (Just use the search option on the page).


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Make sudo use current user’s $PATH

To do this, setup an alias for sudo in ~/.bashrc:

alias sudo='sudo env PATH=$PATH'

Credits to pixelbeat at Stackoverflow


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Setting up adb on Linux for Android

If you install adb somewhere and try to run it, you get the an error stating “Insufficent permissions”. So we need to setup a couple of steps to get adb ready to work on Linux with our device.

1. Install Android SDK (Instructions found elsewhere)
First install Android SDK to someplace and set its path in ~/,bashrc

2. Setup path to adb
Edit bashrc and add the following line after the normal PATH statement:

PATH=$PATH:/pathto_adb

Set paths like this:

kate ~/.bashrc

Eg:

PATH=$PATH:~/android/sdk:~/android/android-ndk-r6b:~/android/sdk/tools:~/android/sdk/platform-tools:~/android/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin:~/android/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/bin[/code]
3. set up permissions

On Android Lollipop, you need to enable adb from Developer options:
First enable developer mode, by clicking on build version in About menu multiple times.

Next, under Debugging>Android debugging, toggle it on.
[email protected]:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 004 Device 002: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 001 Device 004: ID 0bb4:0c87 High Tech Computer Corp. Desire (debug)
Bus 001 Device 005: ID 0781:5406 SanDisk Corp. Cruzer Micro U3

The important part is this: Bus 001 Device 004: ID 0bb4:0c87 High Tech Computer Corp. Desire (debug)

Note: ID 0bb4:0c87

Or it might be:

[[email protected] ~]$ lsusb | grep -i 'desire'
Bus 001 Device 007: ID 0bb4:0ff9 High Tech Computer Corp. Desire / Desire HD / Hero (Charge Mode)

Here, note

0bb4:0ff9[/code]
N.B: The ID 0bb4:0c87 (or 0bb4:0ff9 depending on the PC) is unique for the Desire. So you can just as well copy and paste into the permissions file.

For a Samsung Galaxy Note 2, it is:
[[email protected] ~]$ lsusb
Bus 001 Device 009: ID 04e8:6860 Samsung Electronics Co., Ltd 

For one plus one, it is:
Bus 002 Device 008: ID 05c6:6764 Qualcomm, Inc. A0001 Phone [OnePlus One]

For Oneplus 3, locating it was slightly more difficult:
First you have to enable Developer mode (Clicking on Build version 5 times), and then toggle USB debugging to On.

lsusb showed:

[email protected]:~$ lsusb
Bus 002 Device 014: ID 2a70:9011
Bus 002 Device 004: ID 1058:0820 Western Digital Technologies, Inc. My Passport Ultra (WDBMWV, WDBZFP)
Bus 002 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I couldnt get any clue as to which one was OnePlus 3.
So I disconnected and reconnected the device, and took a look at dmesg logs:
dmesg:

[email protected]:~$ dmesg
[22373.685139] usb 2-1.4: USB disconnect, device number 13
[22377.722778] usb 2-1.4: new high-speed USB device number 14 using ehci-pci
[22377.816588] usb 2-1.4: New USB device found, idVendor=2a70, idProduct=9011
[22377.816598] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[22377.816603] usb 2-1.4: Product: Android
[22377.816607] usb 2-1.4: Manufacturer: Android
[22377.816611] usb 2-1.4: SerialNumber: 87a9854a
[22377.820830] usb-storage 2-1.4:1.1: USB Mass Storage device detected
[22377.821088] scsi host15: usb-storage 2-1.4:1.1
[22378.819918] scsi 15:0:0:0: CD-ROM            OnePlus  Device Driver    0318 PQ: 0 ANSI: 2
[22378.829944] sr 15:0:0:0: [sr1] scsi-1 drive
[22378.830294] sr 15:0:0:0: Attached scsi CD-ROM sr1
[22378.830507] sr 15:0:0:0: Attached scsi generic sg4 type 5

Thus from idVendor=2a70, idProduct=9011, I found out that the line ID 2a70:9011 referred to Oneplus 3

Create/Edit /etc/udev/rules.d/99-android.rules

gksu gedit /etc/udev/rules.d/99-android.rules (Gnome)
kdesudo kate /etc/udev/rules.d/99-android.rules (KDE)

 

Or use your favorite editor.

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4:0c87", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", 
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

For OnePlus one:

ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
sudo service udev restart

Now unplug and then reinsert the Device to the usb connection.

Now, adb devices shows my device

On Ubuntu 16.04, and my Oneplus One all of this is no longer necessary. The steps are:
sudo apt install android-tools-adb
OPO:
Connect phone in MTP mode.
Developer options (enable it by multi-tapping About:Android version) > Android debugging: On
Accept the “Trust computer” dialog
Test with

adb devices

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Adding KDE after a basic Gentoo install

First install Xorg. You should have compiled your kernel and the nvidia module keeping in mind the need to run Xorg.

http://www.gentoo.org/doc/en/xorg-config.xml

emacs /etc/make.conf

Changes to make.conf:
VIDEO_CARDS="nvidia"
[/code]

emerge -pv xorg-drivers
emerge xorg-server
env-update
source /etc/profile

Finally try a startx
If you momentarily get a blank screen, X may be setup correctly. Can test with emerge twm (but remeber to unmerge them)

emerge -av kde-meta

If there are use changed you need to write:

emerge -av kde-meta --autounmask-write

(Watch for another command which writes merges the changes to config files)

After installing and compiling packages of KDE, we can try to start kdm

kdm[/code]

If all went well, KDE should start. I got a few errors with dbus and consolekit, which caused KDM to show windows without the resize/min/max buttons, and a few error message popups.

Consolekit session failed to connect to socket.

Solved by:
First see if dbus starts fine:
/etc/init.d/dbus restart

If it does, then:
rc-update add dbus default
rc-update add consolekit default

To make KDM start automatically at boot:
sudo emacs /etc/rc.conf

Add the line:
DISPLAYMANAGER="kdm"

Then add xdm to default runlevel:

rc-update add xdm default


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Gentoo installation

Step 1 – Setup network

Gentoo-2012 gentoo # ifconfig
eth0: flags=4099 mtu 1500
ether 00:11:95:fc:cd:93 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 base 0x4000

eth1: flags=4163 mtu 1500
inet6 fe80::21c:c0ff:fee5:5f06 prefixlen 64 scopeid 0x20
ether 00:1c:c0:e5:5f:06 txqueuelen 1000 (Ethernet)
RX packets 1156 bytes 72735 (71.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1458 (1.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40 base 0x2000

lo: flags=73 mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback)
RX packets 848 bytes 74584 (72.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 848 bytes 74584 (72.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ifconfig shows that network was not auto setup.
Confirmed by a ping:

Gentoo-2012 gentoo # ping -c 3 www.gentoo.org
ping: unknown host www.gentoo.org

Gentoo-2012 gentoo # net-setup eth1

Gentoo-2012 gentoo # ifconfig
eth0: flags=4099 mtu 1500
ether 00:11:95:fc:cd:93 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 base 0x4000

eth1: flags=4163 mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::21c:c0ff:fee5:5f06 prefixlen 64 scopeid 0x20
ether 00:1c:c0:e5:5f:06 txqueuelen 1000 (Ethernet)
RX packets 1234 bytes 78021 (76.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 3148 (3.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40 base 0x2000

lo: flags=73 mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback)
RX packets 856 bytes 75176 (73.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 856 bytes 75176 (73.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Gentoo-2012 gentoo # ping -c 3 www.gentoo.org
PING www-bytemark-v4v6.gentoo.org (89.16.167.134) 56(84) bytes of data.
64 bytes from www.gentoo.org (89.16.167.134): icmp_req=1 ttl=53 time=257 ms
64 bytes from www.gentoo.org (89.16.167.134): icmp_req=2 ttl=53 time=256 ms
64 bytes from www.gentoo.org (89.16.167.134): icmp_req=3 ttl=53 time=257 ms

— www-bytemark-v4v6.gentoo.org ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 256.315/257.110/257.850/0.858 ms

Yes! Now it’s been setup


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Bash command line default shortcut keys

These can be inspected with:

bind -P | grep 'can be found'[/code]

Enter or Ctrl+J or Ctrl-M

Backspace or Ctrl-H

Delete previous word: Esc+Ctrl-H

Delete word forward: Esc+d

Undo Last action: Ctrl-?

 

My current setup:
abort can be found on "C-g", "C-xC-g", "eC-g".
accept-line can be found on "C-j", "C-m".
backward-char can be found on "C-b", "eOD", "e[D".
backward-delete-char can be found on "C-h", "C-?".
backward-kill-line can be found on "C-xC-?".
backward-kill-word can be found on "eC-h", "eC-?".
backward-word can be found on "ee[D", "e[1;5D", "e[5D", "eb".
beginning-of-history can be found on "e end-of-line can be found on "C-e", "eOF", "e[4~", "e[F".
exchange-point-and-mark can be found on "C-xC-x".
forward-char can be found on "C-f", "eOC", "e[C".
forward-search-history can be found on "C-s".
forward-word can be found on "ee[C", "e[1;5C", "e[5C", "ef".
glob-complete-word can be found on "eg".
glob-expand-word can be found on "C-x*".
glob-list-expansions can be found on "C-xg".
history-expand-line can be found on "e^".
insert-comment can be found on "e#".
insert-completions can be found on "e*".
insert-last-argument can be found on "e.", "e_".
kill-line can be found on "C-k".
kill-word can be found on "ed".
next-history can be found on "C-n", "eOB", "e[B".
non-incremental-forward-search-history can be found on "en".
non-incremental-reverse-search-history can be found on "ep".
operate-and-get-next can be found on "C-o".
possible-command-completions can be found on "C-x!".
possible-completions can be found on "e=", "e?".
possible-filename-completions can be found on "C-x/".
possible-hostname-completions can be found on "C-x@".
possible-username-completions can be found on "C-x~".
possible-variable-completions can be found on "C-x$".
previous-history can be found on "C-p", "eOA", "e[A".
quoted-insert can be found on "C-q", "C-v", "e[2~".
re-read-init-file can be found on "C-xC-r".
reverse-search-history can be found on "C-r".
revert-line can be found on "eC-r", "er".
self-insert can be found on " ", "!", """, "#", "$", ...
set-mark can be found on "C-@", "e ".
shell-expand-line can be found on "eC-e".
start-kbd-macro can be found on "C-x(".
tilde-expand can be found on "e&".
transpose-chars can be found on "C-t".
transpose-words can be found on "et".
undo can be found on "C-xC-u", "C-_".
unix-line-discard can be found on "C-u".
unix-word-rubout can be found on "C-w".
upcase-word can be found on "eu".
yank can be found on "C-y".
yank-last-arg can be found on "e.", "e_".
yank-nth-arg can be found on "eC-y".
yank-pop can be found on "ey".


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Sourceforge developer environment setup

PATH=$PATH:/home/users/d/dr/droidzone/hostusr
alias m=make
alias mi=”make install”

autoconf
./configure –prefix=/home/users/d/dr/droidzone/hostusr

automake
./configure –prefix=/home/users/d/dr/droidzone/hostusr

LD_LIBRARY_PATH=/home/users/d/dr/droidzone/hostusr/lib:$LD_LIBRARY_PATH

libtool
./configure –prefix=/home/users/d/dr/droidzone/hostusr
make
make install

libffi
./configure –prefix=/home/users/d/dr/droidzone/hostusr
make
make install

m4
./configure –prefix=/home/users/d/dr/droidzone/hostusr
make
make install

gmp
./configure –prefix=/home/users/d/dr/droidzone/hostusr –enable-cxx
make
make install

export LD_LIBRARY_PATH=/home/users/d/dr/droidzone/hostusr/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=/home/users/d/dr/droidzone/hostusr/lib:$LD_RUN_PATH

ppl
./configure –prefix=/home/users/d/dr/droidzone/hostusr –with-gmp-prefix=/home/users/d/dr/droidzone/hostusr

make ; make install

Install MPFR
============

./configure –prefix=/home/users/d/dr/droidzone/hostusr –with-gmp=/home/users/d/dr/droidzone/hostusr
make ; make install

Now, Install MPC
================
Install MPFR and GMP first

, and then specify their path for MPC!

./configure –prefix=/home/users/d/dr/droidzone/hostusr –with-gmp=/home/users/d/dr/droidzone/hostusr –with-mpfr=/home/users/d/dr/droidzone/hostusr
make ; make install


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.