Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'd like to migrate to Thunderbird 11 from Thunderbird 3. I installed Thunderbird 3 using apt-get (the newer versions are not available in binary form, unfortunately, at least not in main, universe or multiverse repositories, don't like PPA's when not really necessary). So I downloaded tar.bz2 of the newest version and uncompressed into /usr/lib, next to where the old version lives. Now, I'd like the system to find thunderbird inside Thunderbird 11 folder rather than the old one. How to I achieve that? I know there must be some sort of a PATH to /usr/lib/thunderbird-3.1.20 set on my system, but just cannot find where it is. Checked all common places already, like:

  • /etc/environment
  • /etc/profile
  • /etc/profile.d/*
  • ~/.profile
  • ~/.bashrc (though it shouldn't be here as PATH is also visible by GNOME)
  • probably some other places I don't recall now.

Any clues?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Thunderbird's particular directory is not in your path, and it does not need to be there.

You have a symbolic link in /usr/bin of name thunderbird pointing to the real executable/script launching Thunderbird. On my machine it is the following:

$ ls -l /usr/bin/thunderbird
lrwxrwxrwx 1 root root 40 2012-03-29 09:08 /usr/bin/thunderbird -> ../lib/thunderbird-11.0.1/thunderbird.sh

I think you can change this with

$ sudo ln -sf /usr/lib/thunderbird-11/thunderbird.sh /usr/bin/thunderbird

or something similar.

share|improve this answer
    
Thank you, didn't think of that possibility. BTW, is there a way to check which executable is being called when a command is executed in terminal? –  mmm Apr 4 '12 at 8:46
1  
@mmm: with bash, that on most Linux distros is the default shell, you can use type -P name. –  enzotib Apr 4 '12 at 8:54
    
Thanks again, knowing this would have probably solved my problem in the first place :). –  mmm Apr 4 '12 at 9:17
    
@mmm: there's also which, which exists as both a binary and often a shell built-in, so is more portable: which gimp tells me /usr/bin/gimp. –  Ulrich Schwarz Apr 4 '12 at 10:11
    
@mmm No, do not change anything in /usr/bin. Put the symbolic link in /usr/local/bin instead. Otherwise, the next time you upgrade the Thunderbird package of your distribution, the symbolic link will be overwritten. –  Gilles Apr 5 '12 at 1:28
show 2 more comments

It recommend using a PPA. It's easier than managing a manual installation. Don't install a program from a simple archive when not really necessary.

If you prefer to install a binary separately (the only good reason would be if there's no PPA with the version you want), the easiest way to make it accessible is to create a symbolic link in /usr/local/bin. This directory is for executables that are intended for anyone on the system to run and that do not come with the distribution. It is normally before /usr/bin in the PATH, so if you have both /usr/bin/thunderbird and /usr/local/bin/thunderbird and you type thunderbird, then the one in /usr/local/bin is executed.

Do not unpack the .tar.bz2 in /usr/lib. Generally speaking, never manually modify a file in /bin, /lib, /sbin or /usr, except under /usr/local. These places are reserved for the package manager. The usual place to put programs installed by unpacking an archive is /opt or /usr/local/opt. You should therefore unpack the archive under opt. Then create a symbolic link to the executable:

ln -s /opt/thunderbird-3.1.20/thunderbird /usr/local/bin/thunderbird

If you want to invoke Thunderbird from a shell that you started before creating the symbolic link, you may need to tell the shell to clear its path cache with the command hash -r.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.