Related to my Lucid Dreaming Mask project, I needed to install the Arduino IDE on my home desktop.  I haven’t used my Arduino since switching to GNU/Linux, so I had not yet bothered installing the IDE.  The easiest way to get Arduino running on Arch Linux is through AUR, with the following command (assuming you already have yaourt installed):

$ yaourt -S arduino

I followed through the routine and it appeared to install correctly. I then added my user to the uucp group to give my user serial USB access. Upon launching the Arduino IDE, I found that the Tools > Serial Port menu was greyed out and I was therefore unable to select a port through which to communicate. This is clearly a permissions problem, since the Serial Port menu worked fine if I ran the IDE as root.

It turns out that the problem is with permissions on the /run/lock directory, which is owned by root:root with 755 permissions. That is, only root has permission to write to the directory, whereas the Arduino IDE requires that for whichever user is running the IDE. The quickest fix would be:

# chmod 777 /run/lock

That’s fine, but it also leaves the directory open to any user. In case there’s a good reason for having permissions locked up, here’s what I actually did:

# chown root:wheel /run/lock
# chmod 775 /run/lock

The first line changes the group to which the directory belongs, so that users which are in the wheel group can access it. The second line changes the group permissions to allow users from the wheel group to have full privileges in /run/lock. Everything seems to run perfectly now.