Arduino will not run on Linux

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:

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