Serial port is off on Debian squeezy

Hi! This is my first topic.
I have un ArduinoUNO and squeeze Debian 64bit
I followed the instructions:
http://arduino.cc/playground/Linux/Debian

Serial port is ever grey and if I type:
su (passwd)
sh arduino
from terminal this is the result:

No protocol specified
Exception in thread “main” java.lang.InternalError: Can’t connect to X11 window server using ‘:0.0’ as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:62)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:142)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at sun.awt.X11.XToolkit.(XToolkit.java:112)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at java.awt.Toolkit$2.run(Toolkit.java:849)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841)
at processing.core.PApplet.(Unknown Source)
at processing.app.Base.main(Base.java:112)

can you help me?
Thank you in advance

What about Step #5 ?

supermax:
Hi! This is my first topic.
I have un ArduinoUNO and squeeze Debian 64bit
I followed the instructions:
http://arduino.cc/playground/Linux/Debian

Serial port is ever grey and if I type:
su (passwd)
sh arduino
from terminal this is the result:

No protocol specified

Exception in thread “main” java.lang.InternalError: Can’t connect to X11 window server using ‘:0.0’ as the value of the DISPLAY variable.
       at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
       at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:62)
       at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:166)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:142)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:186)
       at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
       at sun.awt.X11.XToolkit.(XToolkit.java:112)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:186)
       at java.awt.Toolkit$2.run(Toolkit.java:849)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841)
       at processing.core.PApplet.(Unknown Source)
       at processing.app.Base.main(Base.java:112)




can you help me?
Thank you in advance

I’m not sure why you are running Arduino as root (unless you do so to get access to the serial port) but this error is a system problem. You are trying to launch a GUI app in an X11 environment, but there is no X11 server listening on localhost:0.0

Unless you can launch a command like “oclock” or “xclock” in the same shell, and have it come up w/o error, you will not be able to run Arduino app, either. Are you running in pure command-line mode, without a windowing environment? If so, the Arduino IDE will not work in that environment. You need a graphical UI for it to launch in.

Can’t you just double-click on the Arduino app and have it launch. The JVM should know how to launch itself. Otherwise, you need to make sure you can run X11 apps from the command line at all before you try launching Arduino.

supermax: I have un ArduinoUNO and squeeze Debian 64bit I followed the instructions: http://arduino.cc/playground/Linux/Debian

Serial port is ever grey and if I type: su (passwd) sh arduino from terminal this is the result:

Looks like the root user can't run X11 apps but don't bother about that right now. Focus on the problem with the serial port instead. Greyed out serial means the IDE can't access a supported serial port.

  1. Does the Arduino show up when you plug it in? It should be identified as /dev/ttyACM0 or some other number (/dev/ttyACMx)

  2. Verify that you have permissions on the device /dev/ttyACMx

  3. Check that nothing else is blocking the port

oclock and xclock run good. Very nice, I didn't know. The problem should be elsewhere.

supermax: oclock and xclock run good. Very nice, I didn't know. The problem should be elsewhere.

The problem you report is 100% related to the local X server not being found. Nothing in your report has anything to do with serial ports, or the Arduino IDE at all.

You are going to have to explain your problem more clearly and accurately for anyone to help you.

[Later]

Ok, if I try to decode your previous comments, it appears that:

  • You cannot run X11 applications as root. As suggested elsewhere, let's ignore this for now, as it has nothing to do with Arduino IDE.

  • It looks like you can run Arduino IDE as a non-root user, but you seem to have some problems with access to the serial port.

If w concentrate on the last point, you should read supermax's comments. Work from the known to the unknown, describing what you see.

I would add that you probably want to use the /dev/cuATMx version of the serial port, if it is there.