Archive for the 'Linux' Category

Using ssh-agent in an elegant way

Logging into many a remote hosts and, or servers from my desktop and, or notebook is a routine job for me, hence I extensively use ssh and ssh-agent every day. I wanted to use the same ssh-agent instance from each and every terminal whether I’m on a virtual console or in front of x-window desktop running a terminal emulator. I created a tiny bash script say ssh-agent.sh in the /etc/profile.d as follows:

SSH_ENV="$HOME/.ssh/ssh-agent.env"

function start_agent {
    /usr/bin/ssh-agent |sed 's/^echo/#echo/' >"$SSH_ENV"
    chmod 600 "$SSH_ENV"
    . "$SSH_ENV" >/dev/null
}

# Source SSH settings, if applicable
if [ -f "$SSH_ENV" ]; then
    . "$SSH_ENV" >/dev/null
    ps -e |grep ^$SSH_AGENT_PID |grep -q ssh-agent$ || start_agent
else
    start_agent
fi

And the life now seems quite easier since then :)

The Beauty of Gazillian Linux Distributions

The beauty of a hundreds of thousands of GNU/Linux Distributions is that they provide endless options to end-users as well as developers and, or packagers. All you need to have is an appetite to learn, a patience to try, a curiosity to explore and a creativity to deploy un-imaginable possibilities.

You might be wandering what triggered me to write all this, when hundreds of other people are bashing the creepers, creators and, or all those inharmonious beaters of drums?

Well, I wanted to give the KDE 4.1 desktop a try without rebooting off of a LiveCD, installing a complete distro and, or compiling the sources locally on my live Debian rig. By searching a bit, I found that the ArchLinux is always ahead in making available latest stable builds and, or binaries for most of the popular software; so I downloaded the archlinux-2008.06-core-i686.iso and booted off of the image itself with QEMU, addtionally giving it a free partition say /dev/sda5 as a drive and installed the core and KDE 4.1 desktop including all dependencies in single shot. I did all this in kind of a virtual environment, but we know almost all the virtual environments and, or machines have some overheads which make the system somewhat slow.

To overcame and, or avoid all that overhead, I exited the QEMU and mounted the partition where I recently installed ArchLinux and KDE 4.1, mounted few parts from my existing /dev and chrooted in to that new partition from console:

mount -t ext3 /dev/sda5 /mnt/sda5
mount --bind /dev /mnt/sda5/dev
mount --bind /dev/pts /mnt/sda5/dev/pts
mount --bind /dev/shm /mnt/sda5/dev/shm
mount --bind /home /mnt/sda5/home
mount --bind /proc /mnt/sda5/proc
mount --bind /sys /mnt/sda5/sys
invoke-rc.d kdm stop
chroot /mnt/sda5 /etc/rc.d/esd start
chroot /mnt/sda5 /etc/rc.d/kdm start

Viola! Me, as expected was greeted and, or welcomed to login in to that KDE 4.1 desktop.

Although I needed to tweak around a few user and, or group id’s in the /etc/passwd and /etc/group and relevant shadow files in this ArchLinux partition, might be tedious job for newbies, but the things are working smoothly ever since with a zero or no downtime.

The experts might have guessed that we need to reverse execute all the above steps to come out from this chrooted environment or we may automate all these steps with the help of an init script.

Available distributions

I have a small collection of various CD’s and, or DVD’s for distributions of Linux and, or Unix which I would love to share with you. Please bring some extra blanks and get the media burned for your favorite distro only at the cost of a smile :)

I shall arrange to download other such images also, provided these are freely and legally available somewhere via Internet.

[ALERT] Google AdSense is a fraud

In its current incarnation the Google AdSense is definitely a fraud. IMHO, thousands if not millions of AdSense publishers have already been robbed by invalid click Google excuses till date. As and when an AdSense publisher site and, or blog starts earning a good amount or starts attracting visitors, the Google AdSense people usually come up with this standard excuse:

It has come to our attention that invalid clicks and/or impressions have been generated on the Google ads on your site(s). We have herefore disabled your Google AdSense account. Please understand that this was a necessary step to protect the interest of the AdWords advertisers.

And publishers disabled for invalid click activity are not allowed further participation in AdSense and do not receive any further payments. The earnings on your account will be properly returned to the affected advertisers, who knows?

On searching even at Google itself, you too may find:

Google AdSense—a scam?
How to Bring Google AdSense Down
Nonsense with Google’s AdSense?
Google, p2pnet: AdSense saga
Google’s adsense a Fraud
Google Adsense is a fraud
Wikipedia: AdSense#criticism

Google gets gruff over click fraud
Google Sued for AdSense Fraud
Obviously google adsense is a fraud
Don’t Get Caught With Google Adsense Click Fraud
Google Files Click-Fraud Suit
AdSense Has A Scam Side

Neither the publishers have enough of the skills and, or expertise to verify who has created the said invalid clicks nor the Google is fair enough to show you the records. Moreover, it is not that easy a job to prove that the records have not been doctored. I’m not lawyer, but I feel that the Google Adsense business in it present form is not transparent and they people are cheating their AdSense publishers in violation of common law.

I therefore, request all AdSense publishers to stop displaying Google advertisements with immediate effect and ask these Google people for some transparent method such as pay per thousand impressions excluding all page views from local network and, or the server itself.




Close
E-mail It