Sunday, January 13, 2013

How to fix your locale settings for Mosh

Mosh is a great tool. It does require a UTF-8 environment.

The "locale" command will show your local locale settings:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


On Debian based systems like Ubuntu the LANG environment variable will be sent in the SSH session. (This is the SendEnv setting in /etc/ssh/ssh_config)

But for iSSH on the iPhone this won't do. This will pick the environment as defined in /etc/default/locale. To set the locale put the following line in /etc/default/locale and run sudo update-locale.
LANG="en_US.UTF-8"

For further troubleshooting:
1. Check your 'local' environment
2. Check if your SSH sends an environment variable
3. Check the contents of /etc/default/locale on the server

Wednesday, January 9, 2013

Solaris 11 as guest on KVM

To install Solaris 11 as a guest on KVM the following steps are needed.

I will use Ubuntu 12.10 (Quantal) with KVM (qemu-kvm package) and Virtal Machine Manager (virt-manager package). Ubuntu uses a 3.5 Linux kernel.

I will use the sol-11_1-text-x86.iso to install Solaris.

Create a new VM with:
OS Type: Solaris
Version: OpenSolaris
You will have to click "Show all OS options" before Solaris is available in the list. The list doesn't contain Solaris 11 yet, that's why I chose OpenSolaris.

After installing you will need to install slim_install to get a graphical environment:
pfexec pkg install slim_install
pfexec svcadm enable gdm
pfexec init 5

Now you need to remove the Tablet device which is used to keep the pointer of the host and the guest in sync, otherwise your mouse won't work.

Now you should be able to power-on your machine and use GNOME.

Have fun with SMF, ZFS and all other Solaris features!




Sunday, January 6, 2013

Raspberry Pi and the ISY USB Wireless Micro Adapter

I bought the "ISY USB Wireless Micro Adapter" for my Raspberry Pi's.
It's also called "IWL 2000" and supports the N150 standard. It is equipped with a blue led. It works with and without a powered USB HUB. It has a Belkin USB ID and a Realtek Chipset.

It doesn't work out of the box with Raspbian 2012-12-16 wheezy release.

But fortunately it's not hard to get it working:
The 8192cu driver included with raspbian does work, but is not linked with the USB ID of the device. The 8192cu is not the same as the rtl8192cu driver which is included in other releases. I'm using kernel 3.6.11+.

In the output of "lsusb" this is what's show for the device:
Bus 001 Device 006: ID 050d:11f2 Belkin Components

After an "sudo update-usbids" this is what's shown in "lsusb"
Bus 001 Device 004: ID 050d:11f2 Belkin Components ISY Wireless Micro Adapter IWL 2000 [RTL8188CUS]

To load the 8192cu kernel module:
echo 8192cu >> /etc/modules # this makes sure the driver gets loaded on startup
modprobe 8192cu # this loads the driver now

To add the USB ID to the driver:
echo "050d 11f2" > /sys/bus/usb/drivers/rtl8192cu/new_id

You should add this line to /etc/rc.local to make it persistent.

Now it should show up with "ifconfig"  and "iwconfig" and you could configure it just like any other wifi interface.