Monday, December 1, 2008

Use mouse to cut and paste text in Mac OSX Terminal

Whoa, happy days are here again! I have, accidentally I have to admit, got cut and paste using the mouse to work in Mac OSX Terminal app.
I has always been a little annoyed over the fact that I need to do a command-c + command-v to copy and paste text in Terminal App. When working on Unix, or using PuTTY under windows, cut and paste is handled by mouse clicks, and this is so much more convenient than using the finger-streching command keys. However, I have never got this to work under OSX - until now. It turned out that the Terminal App has always been able to do cut-n-paste using the mouse but since I use a Microsoft keyboard-mouse combo, and have installed the Microsoft Intellipoint drivers, the middle key is remapped by default to "Next Application". Changing this to "Handled by Mac OS" re-enables the cut-n-paste functionality. Shame on you Microsoft.

Tuesday, November 18, 2008

Headless Debian install

This is how I did a headless Debian install on my Fujitsu-Siemens Futuro S400 thin terminal. It runs as a disk server and has no monitor, mouse, or keyboard. Thus, I had to do the install via the serial port.

1. Prepared a USB stick to boot from. For this I followed the path given by the Debian install manual. This included:
1.1. Re-formatted it with fdisk and made it bootable. (1 WIN95 FAT partition)
1.2. Downloaded a Debian boot image. (boot.img.gz)
1.3. Wrote it to the first partition. In my case the USB stick was mounted as /dev/sdc. 
Note: the Debian install instructions tells you to write the boot.img directly to /dev/sdc not /dev/sdc1. However, this did not work for me so I has to put the image on the 1st partition instead.
# zcat boot.img.gz > /dev/sdc1
1.4. Unplugged the stick and inserted it again to get it mounted.
1.5. Copied the debian-40r5-i386-netinst.iso to the root directory of the USB stick.

So far I was following the normal Debian install. Howerver, to get it running over the serial line I needed to change the following:

1. Edit syslinux.cfg and add the following at the top to get SYSLINUX to run over the serial line. The configuration below is for 115200 baud, no parity, 8 data bits.
serial 0 115200
Also, add serial console commads to the linux command line:
DEFAULT install

LABEL install
kernel linux
append vga=normal initrd=initrd.gz console=ttyS0,115200n8 -- 
2. All done.