I think you have an old version from the repositories combined with a new downloaded version.
That is correct. Is this a problem?
The version I downloaded is self-contained (in in it's own folder: /home/.../arduino-1.0.3). In my opinion they should not conflict with each other.
The version from ubuntu repositories: arduino (1:1.0+dfsg-9)
The version I downloaded: http://arduino.googlecode.com/files/arduino-1.0.3-linux32.tgz
The Arduino board creates a new serial port for you. Mostly called /dev/ttyACM0
I understand. But like I said: I only have 2 USB ports, so ttys will be assigned in order, I suppose: first /dev/ttyACM0, then /dev/ttyACM1, but /dev/ttyACM2 will never be used (since I don't have a third physical USB port on this machine). Please correct me if I'm wrong here.
I have never seen /dev/ttyACM2 before. Also it doesn't work: when I upload to /dev/ttyACM2:
a. arduino IDE freezes and I must kill the process, or
b. it freezes my whole computer, so I have to do a hard reboot (this is a linux, so this should NOT happen), or
c. arduino crashes without any error messages, or
d. I get the standard failed to upload ... message.
What happens if you run the IDE ?
Are the the options available ?
Can you compile code ?
The IDE runs fine. Some issues with the menus (menu items rendered on top of each other, sometimes serial port is greyed out, sometimes whole menus are greyed out or missing, ..., same as in 1.0.0)
The options are available, apparently it uses the same options file as 1.0.0.
Compilation works.
If the Arduino IDE is running fine, but the Arduino board not, perhaps the USB voltage is less than 5V. That could explain the serial port randomly chaning.
I have an UNO and it works flawlessly.
Also both Leonardos work fine: I've been having this problem for a while, so what I did was: mess around in 1.0.3 untill I got the sketch uploaded, then switch to the 1.0.0 version bundled with ubuntu to check the serial output. A very tedious process.
What I did to resolve the problem:
tomas@tomas:~$ sudo apt-get purge arduino arduino-core
Things seem to work now. Still I don't like this. (Again) in my opinion an application should
a. just do it's thing
b. do the same thing every time, not randomly change it's behaviour.
c. Why can't I run (or even have installed) 2 versions of the same software? This is linux, so this should be possible.