Archive for November, 2008

SSH Tab completion!

Saturday, November 29th, 2008

So I was using stuble upon and I found a cool one.  Adding tab completion to SSH/SCP!

The original code is at http://drawohara.com/post/6584031/life-changing-shell-function

But I propose a slightly different egrep line, which helps me at work (as our hostnames have numbers in them)

Basically, edit your .bash_profile or .bashrc files ( I prefer .bash_profile ), and add in the following lines:

SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | \
sed -e 's/ .*//g' -e 's/,.*//g' | \
uniq | egrep -v "^([0-9]{1,3}.){4}$") )
complete -o default -W "${SSH_COMPLETE[*]}" ssh
complete -o default -W "${SSH_COMPLETE[*]}" scp

Once added, type source ~/.bash_profile (or ~/.bashrc)

This will parse the ~/.ssh/known_hosts file on login, and find any hostnames (but not IPs) and store them in a temporary variable.  This variable is parsed to add tab completion to the ssh and scp commands.

To use, type ssh dan-[tab] and it will auto complete the domain (if it was previously listed in the known_hosts file!)

Bronchitis

Friday, November 21st, 2008

..Effing sucks

Up all night caughing because the anti caughing medicine dehydrated you, then going to bed and having work call you a few hours later because some stupid thing couldnt wait for someone else to be in the office.

Fun times.

VMware Dual booting?

Sunday, November 16th, 2008

So, there is this interesting youtube video which explains how to use VMware Workstation to boot a Dual boot system into a virtual machine.

For those who are unaware, Dual booting allows you to boot either Windows or Linux.  You have to choose one or the other when you turn the system on.

With this setup, you can boot linux (my preferred OS) and use VMware, software used to emulate hardware of a computer, to run your Windows install just like you booted it normally.

Though you don’t get full functionality out of it, you get the basics, which allows me to do what I would normally do in windows (download and play games).

Also, while working with this, I ran into a problem with the current kernel in Fedora 9 (2.6.27.5-37.fc9.i686) and VMware Server 1.0.8.  I had to use the vmware-update-2.6.27-5.5.7-2.tar.gz file from this post to get the drivers to compile.  Though I did not get the Perl API libraries installed (I think its related to the drivers update, I did not look into it further yet), everything seems to be working fine.

Gentoo, sys-libs/com_err, sys-libs/ss, and e2fsprogs blockings

Saturday, November 15th, 2008

This is a repost of a new common topic, but its an important one.  There have been a few blocked packages in the gentoo portage tree recently which causes problems.  You all know what I mean…


[ebuild     U ] sys-fs/e2fsprogs-1.41.2 [1.40.9] USE="nls (-static%)" 4,263 kB
[ebuild  N    ] sys-libs/e2fsprogs-libs-1.41.2  USE="nls" 479 kB
[ebuild     U ] app-crypt/mit-krb5-1.6.3-r4 [1.6.3-r1] USE="-doc -krb4 (-ipv6%*) (-tcl%)" 11,636 kB
[blocks B     ] sys-libs/ss (is blocking sys-libs/e2fsprogs-libs-1.41.2)
[blocks B     ] <sys-fs/e2fsprogs-1.41 (is blocking sys-libs/e2fsprogs-libs-1.41.2)
[blocks B     ] sys-libs/e2fsprogs-libs (is blocking sys-libs/ss-1.40.9, sys-libs/com_err-1.40.9)
[blocks B     ] sys-libs/com_err (is blocking sys-libs/e2fsprogs-libs-1.41.2)

The problem lies in if you remove sys-libs/ss or sys-libs/com_err, you have a HUGE problem.  You cant do anything online, you cant download new updates, and if you reboot, you cant mount filesystems.  Sounds like a huge bug, and I am supprised it hasnt been fixed via portage yet.

Anyways, there is a workaround for it (not that we should have to use it), and here it is.

# First, grab the files with the fetch command
emerge -DufvN system
# Next, Make a backup of com_err and ss
quickpkg com_err ss e2fsprogs
# Remove offending packages
emerge -aC com_err ss e2fsprogs
# Compile the correct and updated packages
emerge -DuavN system
# And check for broken packages
revdep-rebuild

# Alternatively if you do not wish to use system, you can use:
emerge -avf =sys-libs/e2fsprogs-libs-1.41.2 =sys-fs/e2fsprogs-1.41.2
quickpkg com_err ss e2fsprogs
emerge -aC com_err ss e2fsprogs
emerge -av sys-libs/e2fsprogs-libs sys-fs/e2fsprogs
revdep-rebuild

NOTE:  If you dont have revdep-rebuild, then install app-portage/gentoolkit
NOTE:  If you have to re-install your previous com_err and ss, then use:
emerge -av /usr/portage/packages/All/com_err-1.40.9.tbz2 /usr/portage/packages/All/ss-1.40.9.tbz2 /usr/portage/packages/All/e2fsprogs-1.40.9.tbz2 && revdep-rebuild
Making sure to match your version if not the same, and running revdep-rebuild afterwards.

Zelda!

Wednesday, November 12th, 2008

I got a new kitty today.  Ive been wanting one for a while now, and finally had time to go get one and such.

So here is Adorabell, who I got from Animal House Shelter, in Huntley, IL.

I have decided to call her Zelda (Based on the legend of zelda video games) and not keep her shelter name.

Here is a link to pics for everyone to enjoy!

http://dan-delaney.com/gallery/main.php/v/cat