You are currently browsing the archives for the Linux category.

Ubisense calibration checklist

Having spent a long night calibrating Ubisense, here is a checklist to make it faster next time. This is with version 2.0.4 of the software. Many thanks to our resident surveying expert Yukang for staying very late to help me out with this.

Doublecheck offsets to apply to surveyed points. Get signs right. Remember which points were surveyed with the reflector pointing up or down, take into account the height of the totalstation.

Take into account the height of the antenna inside the tag. This may add 1-2 centimetres to the height of surveyed points.

Check that the antenna boards inside the sensors haven’t come loose. If they have you need to open the case and clip them back into place.

Check that the sensors are horizontal, roll should be zero.

Optimal pitch of the sensors is 45 degrees downwards. I seem to not point them down enough so should try to emphasise this in future.
Read more…

Installing Ubisense server software on Ubuntu Linux

Ubisense is a real-time location system based on ultra-wide band. Their software has 2 parts, the server which can run on Windows or Linux, and the configuration UI which can only run on Windows. The server is provided as RPMs for installation on Suse or RedHat, but it’s possible to install it on Ubuntu. These instructions are for version 2.0.4 of the Ubisense server software.
Read more…

Fix missing index in avi videos with mencoder

Some avi files generated from Matlab are missing indexes and can’t be opened by avidemux. Use mencoder to fix.

mencoder -idx -oac copy -ovc copy infile.avi -o outfile.avi

Selecting PDF version for LaTeX documents

Uploading a recent paper to EDAS for an IEEE conference gave the warning The PDF file uses PDF version 1.4, however only 1.5, 1.6, 1.7 is allowed.

Add the line \pdfminorversion=5 at the top of the latex document and recompile. Minor versions up to 9 seem to work.

VPN in Ubuntu

Finally managed to re-connect to the Lancaster University VPN. It used to work, then didn’t, now works again. Maybe due to some combination of regression and bug fixes in Ubuntu, and my tinkering with the options. One Ubuntu forums post in particular was helpful.

Install the network-manager-pptp package to enable VPN connections in the network manager GUI.
Right now I’ve only set the gateway and user name on the VPN tab. Don’t set the password, there is a bug related to this. In the advanced options uncheck PAP and EAP authentication, check CHAP, MSCHAP and MSCHAPv2. Check MPPE and allow stateful encryption. Uncheck all the compression options. Check ’send PPP echo packets’.
Under the IPv4 Settings tab set the method to Automatic (VPN). Uncheck everything in Routes and delete all routes.

After applying these settings restart the network manager with sudo /etc/init.d/NetworkManager restart.

I’m sure the routes can be modified without breaking the connection but I’m not sure about the rest. This works for me as of today.

EeePC out of disk space

More trouble with the EeePC 901. Applying the recommended updates will rapidly fill all the available disk space. Removing packages doesn’t help because the underlying partition is read only and something called unionfs or aufs ensures that all user changes are only applied to a very small partition mounted on top of the read only partition.

A post at the Eee User wiki explains how to make the main system partition read-write and how to merge both system partitions. Unfortunately an EeePC 901 will break if you run the fsck command as explained in that post. And there doesn’t seem to be a way to recover without completely reinstalling the system from DVD/USB stick. In other words it also breaks the recovery partition so pressing F9 at startup and doing a system restore won’t help. The error message is /init: /init: 65 cannot open /mnt/dev/console: No such file.

I’ve decided to install Ubuntu Netbook Remix from a USB stick. I’ll repartition the system disk during the installation and hope that this will solve all my problems including lack of space, no support for WPA Enterprise, out of date packages and unused packages.

[Later...] Ubuntu Netbook Remix works very well. I’m running it on the full 4GB disk. Only 671MB left but that’s after installing my C, Python and Java programming environments and I still have the option to really remove the extra software such as games that Ubuntu installs by default.

EeePC BIOS update

Trouble updating the BIOS on my EeePC 901 because the /usr/sbin/biosupdate.pl script wouldn’t use the proxy settings. There’s a way to use a USB stick. I think you download the zip archive from Asus, unzip it and copy the image to a USB stick formatted with FAT16, the image must be named 901.rom.

But you can do it without a USB stick. The biosupdate.pl script just copies the image file to a special partition and changes a proc file. Run the following as root. Best to run line by line. For me the image was called 1703.ROM and the partcode was 901.

cd /tmp
mkdir mnt
chmod 0755 mnt
mount -L BIOS mnt
rom=`find -name \*.[Rr][Oo][Mm] | head -n1`
partcode=`/usr/sbin/dmidecode -s baseboard-product-name`
cp $rom mnt/$partcode.rom
umount mnt
echo 0x030c > /proc/acpi/asus/hdps

When you reboot the EeePC will update itself, play a few notes and reboot. Make sure it’s connected to the mains.

The full script is available on the Eee User forums if you’ve overwritten yours.

Breaking sentences into separate lines with Vim

I just read somewhere that when writing LaTeX documents it’s useful to have each sentence on a new line. My current document only has (double) line breaks between paragraphs. Here is how to use Vim to insert line breaks after each full stop.

In command mode press ‘:’ then enter s/\.\s\+/\.^M/. The ^M character represents a line break and must be inserted with CTRL-V Enter. Press enter to run the substitution on the current line. Add a percent character to run the substitution on the whole file: %s/\.\s\+/\.^M/.

Some more useful commands in a SunWorld article from 1997.

Problematic keyboard layouts in Ubuntu

I use the Dvorak keyboard layout but ran into some problems after upgrading to Ubuntu Jaunty. After logging in to X I got an error popup saying

Error activating XKB configuration.
It can happen under various circumstances:
- a bug in libxklavier library
- a bug in X server (xkbcomp, xmodmap utilities)
- X server with incompatible libxkbfile implementation

X server version data:
The X.Org Foundation
70000000

If you report this situation as a bug, please include:
- The result of xprop -root | grep XKB
- The result of gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd

Read more…

External harddrive with MacOSX partition

I’d backed up some files from a friend’s MacBook harddrive (onto an NTFS partition mounted in Ubuntu Linux). He then provided me with an external harddrive to copy them back onto. This wouldn’t work because many of the filenames weren’t supported by the FAT32 partition of the external HDD. This is the solution I chose.

Use gparted to resize the FAT32 partition on the external drive to a few hundred megabytes so I keep the software that was on there (probably not very useful).

Create a new partition in the free space, still using gparted. This partition will need to be reformatted with MacOSX so it doesn’t matter what format you create. I first created an HFS+ partition with gparted but it wasn’t recognised by MacOSX and although Ubuntu could mount it it wasn’t automagically mounted as external drives usually are.

This is solved by reformatting the partition as an unjournaled MacOS partition with MacOS via Applications -> Utilities -> Disk Utility.

Then both partitions (the resized FAT32 and the new unjournaled HFS+) should be mounted automatically in MacOSX and Linux systems. It is important for the filesystem to be unjournaled or Linux will mount it read-only.

To read MacOS partitions with Ubuntu you will need to install packages hfsplus, hfsprogs and hfsutils (maybe they are not all necessary).