Category: Open Source

Some stuff about git you should know

Git rocks, and after two days of using I can confirm it.

I was a user of bazar, but with the switching of GNOME to git and the big trouble that bazar was giving me to commit on the svn of the EBI I decided to give to git a go.

Also on bioinfoblog the match between git and bazar it’s a though one, but I right now the svn support from git just works out of the box, so I started to use it.

I want also to point out that with the last git (ATMOW) is possible to create a remote branch on the svn server with:

git svn branch mybranch

and this was one of the killer feature that made me switch.

This is not a tutorial on git but I will provide you some quick and dirty pointers to other posts that I found interesting for a quick introduction to git.

Stuff to keep in mind about git:

  • You always work in a local branch.
  • You commit locally
  • You push (or dcommit if using a remote svn repository) to the remote branch.
  • The name of a remote branch is remote/foobar and you need to put the remote prefix also if it doesn’t show up with the remote prefix not optional. You need this if you create a local branch and you want to track a remote branch.

Some pointers here:

I’ve customized my bash prompt to show my current branch on a git repository. This is the code (based on some code found on the net that I can’t track anymore.. I’m sorry….) looks like this:

#git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/'
}
#grey
PS1='[33[0;32m]u[33[1;32m]@[33[0;32m]h[33[00m]:[33[01;34m]W[33[1;30m]$(parse_git_branch)[33[00m]$ '

The terminal looks like this
git prompt

GMail offline available

It was a long time that I was wondering when the offline service will be available….

Gears is out for a while, so the technology was there….

gmail offline
Today I discovered gmail offline becomes available from the lab.

Well, it’s the same idea of the readers offline… It’s really good stuff. Give it a go. You need gears and lab installed 😛

Ubuntu: Black screen at the login

Today I’ve got a black (sad) screen after restarting the computer. The boot process was fine but everything seems to hang when the nvidia drivers was supposed to kick in and Xorg start.

It was impossible to fall back to any console text login type.

I’ve searched the internet here and there, but I was not able to find any solution or bug report, so I come up with an workaround.

I think the problem is due to the new kernel that I’ve installed following one of the suggested update and the incompatibility with the nvidia drivers. I don’t know if it is the true problem, but I have an hint that this can be true.

As the matter of fact I’ve changed the kernel at the boot time  (Push Esc when GRUB is showing the timeout for the default choice) and I choose the previous version (i.e. Ubuntu 8.10, kernel 2.6.27-12-generic).

With this one I was able to login and my system seems to be completely functional, up and running again.

For the time being I decided to stick with this kernel.  I edited the grub menu list (/boot/grub/menu.lst) changing the default 0 (Ubuntu 8.10, kernel 2.6.27-13-generic) with the second option (Ubuntu 8.10, kernel 2.6.27-12-generic).

Here my current menu.lst


# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 2

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

...
TRIM
...

## ## End Default Options ##

title Ubuntu 8.10, kernel 2.6.27-13-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-13-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro quiet splash
initrd /boot/initrd.img-2.6.27-13-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-13-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-13-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro single
initrd /boot/initrd.img-2.6.27-13-generic

title Ubuntu 8.10, kernel 2.6.27-12-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro quiet splash
initrd /boot/initrd.img-2.6.27-12-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-12-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro single
initrd /boot/initrd.img-2.6.27-12-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

Note that default 0 takes always the latest.
HIH.

Update: Found the BUG https://bugs.launchpad.net/ubuntu/+source/linux/+bug/337019/

Nemo and tracker. To find stuff. Really

I’m always managing a lot of files on my computer and especially I always download a lot of new scientific papers.
I use referencer to manage my collections and i save the paper using the first name of the author and the year.

However I never remember the name of the author, but I only remember when I hit that paper and saved. So here where Nemo comes handy.

Nemo “is a cross between a calendar and a file browser with labels.” The index of your file is done using tracker as back end so you don’t need to install anything else on your linux box.

Here the screenshot to give you a better understanding

Nemo Screenshot

Nemo Screenshot

So I just have to select PDF and look what I have saved yesterday and “et voilà” I found the stuff I was looking for.

If I select all the files of course it will find all the files.

Nemo All the files

Nemo All the files

Note the first screenshot that I made few minutes ago it’s already indexed by tracker and displayed by nemo.

Of course this will not replace the Nautilus o tracker GUI search, but it has its own ecological niche of use.

Python 3.0 . Here it comes…

Python 3.0 is out. Has been released yesterday and the first production stable release is ready to be grabbed. This release breaks the compabilities with the 2.x series. Nothing will work anymore 🙂

Things that I would like to to underline:

  • The print statment becomes a function (so you need the brackets) print "Hello World" becomes print("Hello Wolrd")
  • dict.keys() or dict.values() give a view that is a “lazy” list read-only. It’s an iterator and you cannot pop stuff out of it. If you need a proper list you have to force it with list(dict.values())

So take a look on the documentation to have a proper idea of what’s going on, read this small paper to know why there was the need to do this change and before start screaming around check this blog post too that give a clear answer to the question: “What to do about the python 3.0?”

Have fun with the new python….
I mean HH 🙂

TuxGuitar rock!

Long time ago, when I was still a user of windows (yeah… the original sin …) I was really happy with a music program powertab.
Now a lot of things has changed, first of all I don’t use windows anymore (my last win sys was win 2000 NT …) but I use Linux (ehm.. GNU/Linux), in Ubuntu flavor with GNOME as my main Desktop Enviroment.

Guess what… Powertab editor is a windows only program.

Today one of my friend sent me a two ptb (Powertab original format) files and I was already wondering how to retrieve the program and if it will work emulated with wine..

Then I thought it was impossible nobody has written a cool tab editor for linux. And Indeed I was right!

tuxguitar smoke on the water

tuxguitar smoke on the water

TuxGuitar is able to import the .ptb files, it has a midi player and it’s pretty amazing!

So, if you enjoy music and need a professional tab editor with a lot of features, give it a shoot!

Keep on rockin…

P.S.: Rock midi file are horrible to listen 🙂

Skype and Ubuntu 8.10

If you wondering why Skype is not anymore working with your new shiny Intrepid Ibex 8.10 you’re not alone.

It seems pulseaudio is somehow responsible for this bad behaviour. To bring back everything to the normal situation:

killall pulseaudio
sudo apt-get remove pulseaudio
sudo apt-get install pulseaudio ubuntu-desktop

This should solve the problem. It worked here at least. 🙂

Update: I found out that only the command
killall pulseaudio
is enough.
After that you have to launch skype and it should work.

The annoying bit is that you required to do that every time you want to use skype…

OpenEverything London – Live Blogging

9.35: Ok, I’m at the OpenEverything in London. I’ll try to do some live blogging.

Let’s see how it goes.

10:16: First presentation from Glynn Moody. Everything was Open and we lost it. Intelectual Property is a monopoly that stop innovations

11:15: Speed GeeK:

Late night: So it turns out the live blogging was impossible, too much stuff to follow, a lot of really interesting conversation.

Just pointing two projects that are really interesting:

  • www.open.ac.uk/openlearn – Open University. Well establish running and alive.
  • themis project — How to run a community and which way is the best to take collective decision. (Pre- alpha. No site yet, I will keep you informed)