Running Arduino IDE in a Debian Live session

The Arduino IDE requires access to the serial port (/dev/ttyUSB0 on my machine) to upload a sketch to the Arduino. In a Debian Live session, the default user (“user”) doesn’t have permission to access the serial port. Possible solutions include:

  1. Run the Arduino IDE as root – e.g. “sudo Downloads/arduino-1.8.19/arduino”.
  2. Add “user” to the “dialout” group, using the “usermod” command, so that access to the serial port is granted.

Routinely running applications as “root” isn’t good practice, but method 1 also has the downside that all sketch files end up owned by “root”, which is inconvenient.

Method 2 would typically only take effect after logging out and logging back in again. However, the “su” command can be used to launch the Arduino IDE with the new group membership in effect, as shown below:

sudo usermod -a -G dialout $USER
su -m $USER -c Downloads/arduino-1.8.19/arduino

Note that you will be asked to type the password (default password on Debian Live is “live”).

Advertisement
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s