Jun 10 2010

I’ve been using Linux on servers for years, since before I started learning to code. Finally, after something like 7/8 years I am almost fully confident in severing the ties to my highly underused Windows installation on my personal laptop, but there are still a couple of exceptions. With the release of Ubuntu 10.04 LTS, I’ve finally settled down using day-to-day tools that are equivalent to their Windows counterparts. Much of the software I use already have Linux compatible versions such as Eclipse, Google Chrome, FileZilla, Skype etc., however not all software does. Some I am happy to use (and work quite well!) in Wine (Spotify, Adobe Photoshop). Here’s what I’ve had to switch though:

  • Windows Live Messenger > Pidgin or Empathy
  • Microsoft Office > Google Docs
  • Pinnacle Studio > OpenShot (although I am testing other packages still)
  • Microsoft Money > Same, but in Virtualbox
  • Winamp > Rhythmbox

Read the rest of this entry »

Jul 4 2009

UbuntuOneScreenshotI opened Google Mail on my HTC Magic this morning to find a lovely invitation to the Ubuntu One beta, woot. So I grabbed my shiny Sony Vaio laptop and fired it up, and got straight on with it. Essentially, Ubuntu One is just a sync to a remote network storage, so there shouldn’t be anything too complex about it. The login process is fairly straightforward. First you download their PPA, then the packages themselves; if you use Firefox this is made remarkably simple by just clicking the buttons on the installation web page. Once installed, you start the client, and this should bring up a web page to “Add your computer”. It didn’t do this first time on mine, and I had to manually do:

apt-get install ubuntuone-client ubuntuone-client-tools

to get it to work. Still, after that, it ran pretty smoothly and I’ve just synced up my first few files. As of yet I don’t really have a use for this sort of thing, but I expect backups of certain things would be useful. The free tier is a 2GB plan, or there’s a paid 10GB plan. Personally I’d prefer more storage if I were to use it but the 10GB is USD $10 so the amount of storage I’d need would I guess cost around $50 a month going on $1/GB.

Still, it’s a cool little feature and a welcome addition to my laptop, although as of yet I have no-one to share files with… I’ll figure out how to invite people if someone requests ;)

May 13 2009

If you’ve recently done an upgrade or dist-upgrade (as I did) on your Ubuntu server and it broke Trac with 500 errors, then this might be the solution for you…

If you’re seeing something like this in your Apache error.log:

No module named trac.web.modpython_frontend

Then what has probably happened is Python was upgraded to a more recent version. I install Trac in python 2.4, therefore the Trac egg was in the /usr/lib/python2.4/site-packages directory. After the upgrade to python 2.6, the location would’ve changed. Thankfully, a very quick and simple solution fixed it for me:

sudo easy_install Trac

It worked like a charm for me, but if you have to install manually then I expect you’ll have to follow the TracInstall instructions over again…

May 7 2009

Whenever I tried to get CollabNet for Eclipse plugin working in Eclipse PDT, it always failed, yielding the error “Unable to load SVN client” upon any SVN activity. I did endless amounts of Googling to try to solve the problem, but always came to a brick wall.

The big problem here is that Eclipse is just too new for Ubuntu – even Jaunty. An apt-get install subversion on Jaunty Jackalope will install subversion 1.5.4, which just doesn’t work, and thats where the big problem lies. CollabNet for Eclipse categorically requires Subversion 1.6. Unfortunately the only solution I’ve come up with is to compile subversion and it’s javahl bindings yourself. I’ll try and remember all the steps I took to make it work.

First, download the latest subversion and subversion-deps tgz from http://subversion.tigris.org/. At time of writing they are here and here. Extract them both:

$ tar zxvf subversion-1.6.1.tar.gz
$ tar zxvf subversion-deps-1.6.1.tar.gz
$ cd subversion-1.6.1

You’ll need to install a couple of extra packages (this assumes you’re using Sun’s JRE), and assuming you already had subversion and libsvn-javahl already installed, uninstall a couple:

$ sudo apt-get install libssl-dev sun-java6-jdk g++
$ sudo apt-get remove subversion libsvn-javahl

Configure, make and install subversion. You can check it’s the right version too:

$ ./configure --disable-nls --enable-javahl --with-jdk=/usr/lib/jvm/java-6-sun-1.6.0.13
$ make
$ sudo make install
$ svn --version

Once that’s done, you’ll want to compile the javahl binding. Once installed, check it’s installed correctly too. It’s fairly likely the .so file will be in /usr/local/lib.

$ make javahl
$ sudo make install-javahl
$ sudo updatedb
$ locate libsvnjavahl-1.so
$ sudo ldconfig

Open your eclipse.ini, and after the -vmargs line, add:

-Djava.library.path=/usr/local/lib

replacing the path with the path where the libsvnjavahl-1.so with your correct path.

Now fire up Eclipse, go to Window > Preferences > Team > SVN. The SVN Interface should now say JavaHL (JNI) 1.6.1 and a revision, depending on the particular version of SVN you installed.

I think that’s all the steps I took, so I apologise if I missed something out – if I remember something I’ll add it in!

Update: Compiling javahl requires g++, so I added that into the apt-get install line.

Update 2: Missed out ldconfig after libraries creation.

Update 3: If you still have issues getting it to work, I recommend looking at http://subclipse.tigris.org/wiki/JavaHL, reading it carefully, especially the Troubleshooting on Linux section. The javahltests.jar JUnit tests that are provided on the page may be very handy when debugging problems!

Apr 10 2009

On Ubuntu 8.10 (Intrepid Ibex) I always get an error something like this when I shut down:

CIFS VFS: server not responding
CIFS VFS: no response for cmd 50 mid 0

This started happening when I added a CIFS mount to our NAS box at home in /etc/fstab. Basically what is happening is that the wireless network interfaces (set up by NetworkManager in Gnome) are being shut down prior to the CIFS mount being unmounted, which causes a timeout trying to unmount… because there’s no network connection.

Turns out this is a very well-known issue, but won’t be fixed for Jaunty Jackalope (the next Ubuntu version). Read more here.

There are some proposed workarounds, some of which aren’t suitable in all cases (hence why the Ubuntu team haven’t got a fix for it yet):

  1. Do not use system-wide CIFS mounts but use Gnome VFS pseudomounts like typing smb://foo/bar in nautilus
  2. Define your network in /etc/network/interfaces rather than in NetworkManager
  3. Hacking the shutdown sequence to make it unmount network filesystems earlier (for example moving S31umountnfs.sh to S14umountnfs.sh in /etc/rc[06].d) : will fix it if you aren’t executing anything on those network filesystems

Method 2 and 3 require a little technical knowledge, and method 1 (pseudomounts) aren’t really suitable as they’re not permanent. Another solution not listed here is to add a kill script to the shutdown sequence that runs pretty much immediately to unmount the directory you want unmounted. Again though, that requires a little Linux knowledge.

So for those of you who aren’t Linux savvy, unfortunately there isn’t a simple solution out there yet. I haven’t got around to fixing it on my own laptop yet, but when I do, I’ll probably post a quick tutorial!