Linux use without being superuser

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Linux use without being superuser

Post by AnneBarela »

Note: Due to USB kernel driver variations on Linux, Adafruit does not currently provide support for Linux for Trinket. This aside, many users have had success using Linux/Unix for Trinket.

The utility that loads the program onto the Trinket (avrdude) normally uses superuser (root) privileges. You can configure Linux to not need these privileges. You'll need to make the following edits to permit this, but the actual location of files varies from one Linux distribution (distro) to another.

Create the following udev rule, in a new rule file (named whatever you like), in +/etc/udev/rules.d/+ (you may want to double-check where your distro places udev rules). This should set the permissions for the USBtinyISP device correctly:

Code: Select all

SUBSYSTEM=="usb", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0c9f", GROUP="users", MODE="0666"
If the users group does not have sufficient privileges, the adm group may:

Code: Select all

SUBSYSTEM=="usb", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0c9f", GROUP="adm", MODE="0666"
Be sure to place the command on one line.

If your distro deprecates the use of the SYSFS parameter, then you may need a variation. The following rule works on recent Ubuntu systems and may work on other, newer Linux systems:

Code: Select all

SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout"
It has been reported that variations of BSD Unix have been used successfully with Trinket. Information is at viewtopic.php?f=52&t=52368&hilit=BSD.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”