Exchanging files between Nexus 10 and Ubuntu

Nexus 10 does not attach itself as a USB storage card. Instead it uses the protocols PTP and MTP. The former is quite nicely supported on my Ubuntu 11.10.
-I know I should upgrade-.

So what happens? First of all nothing! If you attach the Nexus 10 via USB there is no notification on ubuntu. On the Nexus you get a little status hint (upper left corner a box with an arrow inside) that there are now some USB actions available. From the status you can directly jump into the USB settings where you find two possible connection modes. The ticked default mode is MTP.
If on your Nexus you now tick PTP, Ubuntu immediately detects a camera device and opens up the Nautilus explorer showing the DCIM folder and you can access the files.

But I just wanted to put some music on the new device and I don’t want to slingshot it from my PC to some internet server and then back to my device. After all they are just 10cm apart from each other right in front of me?!

So next thought is to look for an application that advertises MTP capabilities and the Ubuntu Software Center shows me gMTP.

After installing gMTP it works. Not automatically, you still have to fire up gMTP manually and at first you do not have access to any files but if you open the file menu of gMTP and select “Close devices” (hope this is the correct English translation) you get the content of your Nexus.

Transfering mp3 files is now possible but is a bit cumbersome. Every file requires to be OKed with an error message. But finally they end up on the Nexus and can be used and that’s what I wanted in the first place.

Creating folders is possible and while I am at it, I uploaded some pdf files to the Nexus, which were all uploaded without complaints and error messages in an instant.

A word of caution I also tried the application Qlix in my case version 0.2.6 on Ubuntu. Well and I failed, it just started shortly and stopped after a second and that’s it, no error no nothing. It might be a good and don’t forget free application and for other devices it might even work perfectly but what nagged me here is the fact that there is no hint from the GUI.

Starting it from the console reveals a bit more information. There you get the info that you should report the device ID to the libmtp team.

Device 0 (VID=18d1 and PID=4ee1) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Ouch! – Qlix received signal 11

So overall file transfer is possible but not yet perfect.


Syntax Highlighting for rhtml and erb with gedit

I like to use gedit for coding with ruby on rails and it features syntax highlighting for ruby and html but unfortunately not for rhtml and erb files.

So in this article I will show you how to get syntax highlighting for .rhtml and .erb files within the gedit editor as shown here.

Gedit Screen Shot with syntax highlighting

Gedit uses the GTK toolkit, which in turn has a configuration for language parsing and highlighting. The syntax files delivered with Ubuntu reside under


and the files can be extended or overruled by installing new files in your home directory under


This is a safer place for your changed files as the /user/share path might be changed with upgrades.

I have created based on the html.lang file an rhtml.lang file, which you find below.

So here are the two steps what you need to do:

First, create the following directory

Second, downdload this file and copy it into the just created directory.

If you now restart gedit and load a file with the .rhtml and .erb ending you should see a result similar to the example above.