Go Down

Topic: Arduino will not run on Linux (Read 850 times) previous topic - next topic

DavidSheffield

I have a PC running on Ubuntu Linux version 10.04.1 LTS. I have installed the Arduino software carefully following the Numpties guide. Everything seems to be correct but when I click on the Arduino icon and click on run nothing happens. How can I make this work.
Thanks David

pluggy

Where did you extract the software to ?

If you use terminal to start the IDE by hand, what does it report ?  The GUI tends to hide a lot of messages that are useful to debugging.
http://pluggy.is-a-geek.com/index.html

DavidSheffield

I followed the instructions and the software is in the home folder. I can't seem to start the program at all.

pluggy

Instead of running the arduino ide by double clicking it, run it from terminal. That will give some clues as to what is wrong.

in terminal, cd to the directory where the arduino program resides

in mine this is ~/arduino-1.0.1
Code: [Select]

cd ~/arduino-1.0.1


run the program using

Code: [Select]
./arduino

Posting what it says in the terminal window will be a big help.
http://pluggy.is-a-geek.com/index.html

MichaelMeissner

On Fedora, I had to add myself to the dialout group, and looking at the Ubuntu directions it says the same thing:

if you use the USB port to dialog, you should add yourself to the group 'dialout' in order to have write permissions on that port:
sudo usermod -aG dialout <myuser>


Note, when you add yourself to a group, you need to log out and re-log back into the system in order to be added to the group.  For the first few days after getting the UNO, I needed to run arduino specially so that I was in the right group, because I had other things going on in the login session that I didn't want to shutdown (work vpn sessions).  In my case, I ssh'ed into the same box to get the appropriate groups.

pluggy

The dialout group causes problems with communicating with the Arduino, the OP hasn't got that far, the software won't start in the first place.  You get the classic greyed out Serial box in the IDE if you don't have permissions to use the Serial ports. I never needed to bother with it with 10.04 Ubuntu but I needed it with 12.04.
http://pluggy.is-a-geek.com/index.html

DavidSheffield

I tried running the program from the terminal. The answer was "no such file or directory". Which is odd because when I double click on that icon I get all the other stuff I just can't open the program.
I even tried reloading but that made no difference.
Thanks for everyones help so far.
David

pastito

Please run the following command in the arduino directory and paste the results here.

ls -l
head arduino
hexdump arduino

Here is my output so you can compare:


Code: [Select]

pastito@T60:~/arduino$ ls -l arduino
-rwxr-xr-x 1 pastito pastito 435 2012-05-22 02:54 arduino
pastito@T60:~/arduino$ ls -l
total 72
-rwxr-xr-x  1 pastito pastito   435 2012-05-22 02:54 arduino
drwxr-xr-x 12 pastito pastito  4096 2012-05-22 02:54 examples
drwxr-xr-x  4 pastito pastito  4096 2012-05-22 02:54 hardware
drwxr-xr-x  3 pastito pastito  4096 2012-05-22 02:54 lib
drwxr-xr-x 14 pastito pastito  4096 2012-08-15 12:53 libraries
drwxr-xr-x  3 pastito pastito 12288 2012-05-22 02:54 reference
-rw-r--r--  1 pastito pastito 33205 2012-05-22 02:54 revisions.txt
drwxr-xr-x  3 pastito pastito  4096 2012-05-22 02:54 tools
pastito@T60:~/arduino$ head arduino
#!/bin/sh

APPDIR="$(dirname -- $(readlink -f -- "${0}") )"
                                                                                                                         
cd $APPDIR                                                                                                               
                                                                                                                         
for LIB in \
    java/lib/rt.jar \
    java/lib/tools.jar \
    lib/*.jar \
pastito@T60:~/arduino$
pastito@T60:~/arduino$ ls -l arduino
-rwxr-xr-x 1 pastito pastito 435 2012-05-22 02:54 arduino
pastito@T60:~/arduino$ ls -l
total 72
-rwxr-xr-x  1 pastito pastito   435 2012-05-22 02:54 arduino
drwxr-xr-x 12 pastito pastito  4096 2012-05-22 02:54 examples
drwxr-xr-x  4 pastito pastito  4096 2012-05-22 02:54 hardware
drwxr-xr-x  3 pastito pastito  4096 2012-05-22 02:54 lib
drwxr-xr-x 14 pastito pastito  4096 2012-08-15 12:53 libraries
drwxr-xr-x  3 pastito pastito 12288 2012-05-22 02:54 reference
-rw-r--r--  1 pastito pastito 33205 2012-05-22 02:54 revisions.txt
drwxr-xr-x  3 pastito pastito  4096 2012-05-22 02:54 tools
pastito@T60:~/arduino$ head arduino
#!/bin/sh

APPDIR="$(dirname -- $(readlink -f -- "${0}") )"
                                                                                                                         
cd $APPDIR                                                                                                               
                                                                                                                         
for LIB in \
    java/lib/rt.jar \
    java/lib/tools.jar \
    lib/*.jar \
pastito@T60:~/arduino$

pastito@T60:~/arduino$ hexdump arduino
0000000 2123 622f 6e69 732f 0a68 0a20 5041 4450
0000010 5249 223d 2824 6964 6e72 6d61 2065 2d2d



In short, make sure that:
1.- arduino script has 755 permissions
2.- make sure the arduino script starts with "#!/bin/sh"
3.- Make sure with hexdump that there are no DOS line endings in your script

Typically DOS line endings will produce that error: no such file or directory
Unix-like line endings need to be 0A in hex. DOS like line endings are
0A0D.

If you find this 0A0D sequence in the arduino script file I recommend that you completely erase this install,
and reinstall using linux only.


Regards





DavidSheffield

Thank you for your help. I am afraid that I am not getting anywhere so I shall just go back to the PIC which I don't have any trouble with. For everyone who had an input I am very grateful. Sorry for the delay in getting back but I have been trying everything to no avail.
Regards David 

pastito


Thank you for your help. I am afraid that I am not getting anywhere so I shall just go back to the PIC which I don't have any trouble with. For everyone who had an input I am very grateful. Sorry for the delay in getting back but I have been trying everything to no avail.
Regards David 


Sorry to hear that. For me it has been great to have both arduino and eagle layout working under linux. I finally have a robust and stable platform for my projects and everything I need.

Good luck!

Go Up