Monday, August 19, 2013

Disable the Touchpad and Trackpoint Pointer in Linux

The mouse pointer on my Arch Linux system was going crazy. It was drifting badly and my mouse was unusable most of the time. Very frustrating. I thought I narrowed the problem down to a hardware issue on the touchpad. I have a USB mouse, so I don't really need the touchpad. I came across this script to toggle the touchpad on and off.
#!/bin/bash
synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')
This does indeed toggle the touchpad, but my problem still remained. So, the touchpad wasn't the problem. Then I saw the Trackpoint pointer sitting in the middle of my keyboard (otherwise known as an eraser pointer or the colorfully nicknamed clit mouse). So I dug around and found I could disable it easily enough. First, get the name of the device by running:
xinput
In my case the name is "TPPS/2 IBM TrackPoint". Then disable it with this:
xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0
Problem solved. Hopefully someone else will find this useful.

Tuesday, August 13, 2013

Setting up a Gogo6 / Freenet6 IPv6 tunnel in Linux

It's 2013....where's my IPV6? IPv6 was introduced to alleviate some of the problems with IPv4. It's been available for well over 10 years, but the internet is slow to adopt the new format. I wanted to start using IPv6 to become familiar with it but, like most ISPs, mine doesn't offer native IPv6.

When native IPv6 isn't available, one option is to use a tunnel broker. Basically a broker sets up a tunnel between your device and an endpoint at the broker. IPv6 is encapsulated in an IPv4 packet, sent through the tunnel to the broker, then sent out from there as IPv6. I looked at three brokers: Hurricane Electric, SixXS, and Gogo6 (which owns Freenet6). I chose Gogo6 for several reasons: it allows NAT traversal, it allows anonymous connections (the other two require registration), and it is touted as the easiest to set up. One of the down sides of using Gogo6 is that it currently appears to only have two Points of Presence (PoP), Montreal Canada and Amsterdam Netherlands. This is the location of the broker server, so your IPv6 traffic will appear to come from one of these areas.

To install the Gogo6 client in Ubuntu, run the following:
sudo apt-get install gogoc
This will install both gogoc and radvd. The radvd package is only needed if you plan on routing IPv6 from your PC. All done! You should now have an anonymous tunnel up and running. Test it by running
ping6 -c 5 ipv6.google.com
The tunnel will start when the system starts. If you don't want this, run
sudo mv /etc/rc5.d/S20gogoc /etc/rc5.d/s20gogoc
Then you can start and stop the tunnel with
sudo /etc/init.d/gogoc start
sudo /etc/init.d/gogoc stop

To install the Gogo6 client in Arch, install it from the AUR. Since this is Arch, I'll assume you know how to install a package from the AUR. To create the tunnel and start using IPv6, run (as root)
systemctl start gogoc
Wait a few seconds for the tunnel to come up and try pinging ipv6.google.com as above. If there are no problems and you want to create a tunnel when the system starts, run
systemctl enable gogoc

Anonymous connections are fine to play with but the IPv6 address will change when your IPv4 address changes. I suggest registering for an authenticated tunnel at Gogo6. This will get you a static IPv6 address, a DNS entry (e.g. username.broker.freenet6.net), and a /56 prefix (so you can set up a router and give out IPv6 addresses to the devices on your network if you want). If you do register, you'll have to edit the /etc/gogoc/gogoc.conf file and enter your username and password, and change the server to the authenticated one.

A couple of notes: IPv6 addresses are globally accessible, so make sure you have a firewall and that it is properly configured. And since traffic is going through a tunnel, speed will be impacted somewhat. Here are some of my speedtest results. Top bar (green) is IPv4 and bottom bar is IPv6.


Finally, here are some sites that might be of interest.
ipv6test.google.com
ipv6-test.com
ip6.me/
www.subnetonline.com/pages/ipv6-network-tools/online-ipv6-traceroute.php

Wednesday, August 7, 2013

Boot Multiple OSes Using Your Android Device and DriveDroid

DriveDroid is a neat app that allows you to boot ISO and IMG files that are stored on your Android device, just like you are booting from a USB drive. You can download a lot of images from within the app. You can also create blank images, but I haven't used this feature.

Your device must be rooted to use this app, so if it's not then this app isn't for you.

The process is quite simple. Start DriveDroid and press the "+" button and select "Download image" to get a list of available images. Select a distribution and then select the file you want. For the first time, I suggest trying Slitaz, since it is only about 35MB. Once it is downloaded, it will show up on DriveDroid's main screen.



To boot from an image, select it in DriveDroid, and select the host mode (e.g. Writable USB, etc). Then, connect the Android device to a PC using a USB cable and boot the PC. The PC will boot the selected image. If the image doesn't boot, check the PC's BIOS settings and make sure "Boot from USB" is set as the first boot device.

To stop hosting, just tap the DriveDroid icon in the Android notification area.


One requirement for the ISO images is that they must be in hybrid format. To check an ISO, type
fdisk -l file.iso
If no partition table is found, the ISO is not in hybrid format. One of my favorite tools, SystemRescueCd, isn't in this format. To make it work, all I had to do was download the ISO and run
isohybrid file.iso
This changes the file to the correct format and then it works with DriveDroid just fine.

DriveDroid makes it easy to try out new distributions. And with the right tools, your Android device can be an invaluable recovery tool.