Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making sure the Linux installation registers the programmers to avoid using SUDO when burning a bootloader #1786

Open
dcuartielles opened this issue Jan 3, 2014 · 9 comments
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) OS: Linux Specific to the Linux version of the Arduino IDE

Comments

@dcuartielles
Copy link
Member

The current linux installer (not the Arduino one, but the one included in the software repository) includes a tool for registering the user in dialout, so that it is possible to upload without having to make that operation from command line.

I would suggest including that tool in the current linux installer as well as a script to do what is suggested at the following website:

http://academy.cba.mit.edu/content/tutorials/akf/embedded_programming_arduinoIDE.html

That registers usbtinyisp to work for the dialout group, what in turn, registers the user to be able of using it without SUDO. That should be done for all the programmers shipped by default with the IDE

@cmaglie
Copy link
Member

cmaglie commented Jan 5, 2014

@dcuartielles
I don't understand which "linux installer" you're referring to, may you be more specific?

@dcuartielles
Copy link
Member Author

You should run a fresh install of Ubuntu 13.xx and install Arduino from the
repository. After finishing the installation, a pop-up dialog informs that
the system can add you, at will, to the dialup group.

We need that same installer, but adding the option to include all the
programmers to the dev-rules.

Worst case, this could be solved using a tool in the IDE and letting the
users know they should run it once after installing.

This feature is crucial for Linux users not familiar to CLI, a growing
number among the educational institutions.

/d
El 05/01/2014 09:09, "Cristian Maglie" notifications@github.com escribió:

@dcuartielles https://github.com/dcuartielles
I don't understand which "linux installer" you're referring to, may you be
more specific?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1786#issuecomment-31598861
.

@matthijskooijman
Copy link
Collaborator

If you are saying that the Ubuntu installation process should add extra "dev-rules" (did you mean udev here?), then you should probably be talking to the Ubuntu folks, they'll be able to actually modify the Ubuntu package.

If you're saying that the stuff from the Ubuntu package should be included in the official Arduino Linux download, then this is the place to be. If so, can you be even more specific in what you want to be included?

@dcuartielles
Copy link
Member Author

Hej,

I'm obviously talking about the second case (running an equivalent action
in the official distribution to emulate the actions taken in the Ubuntu
installer). I also would like to see the udev rules added to that
installer, something the Ubuntu one is not including.

/d
Arduino Co-founder
El 05/01/2014 11:26, "Matthijs Kooijman" notifications@github.com
escribió:

If you are saying that the Ubuntu installation process should add extra
"dev-rules" (did you mean udev here?), then you should probably be talking
to the Ubuntu folks, they'll be able to actually modify the Ubuntu package.

If you're saying that the stuff from the Ubuntu package should be included
in the official Arduino Linux download, then this is the place to be. If
so, can you be even more specific in what you want to be included?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1786#issuecomment-31600825
.

@matthijskooijman
Copy link
Collaborator

Ok, thanks for clarifying.

However, looking at the download page, it seems there is no particular installer for Linux, just tarballs containing all the relevant binaries. So for including this in an install script, we should first build a Linux installer, which might not be the way to go? Additionally, the exact steps to take / udev rules to add might vary by distribution, so ideally a distribution would package Arduino themselves and take care of this.

Perhaps a useful middle-way would be to let Arduino do a permission check and offer advice to the user to help diagnose problems? e.g., when the avrdude call fails and /dev/ttysomething is not readable, report this fact to the user. If the owning group of the file is not "root" and the group-write bit is set, also suggest that adding the user to that group might help?

@dcuartielles
Copy link
Member Author

In an older Processing version, there was an IDE plugin for the Mac version that was actually adding the proper permissions to the users so that they could make use of the serial port.

At this point, I think this would be a very elegant solution, a tool that could be included in the Tools folder so that it would show up in the menu. It should be added only to the linux packages and it could call the CLI sending whatever commands were needed in each OS flavour to add the user to dialup as well as adding the different programmers to the udev ruleset.

The tool can be produced in the same way tools are produced for Processing (check: http://wiki.processing.org/w/Create_Tools ) and a bash script could be called depending on the actual OS. The different scripts could be contributions by users.

@Lauszus
Copy link
Contributor

Lauszus commented Jan 14, 2014

@dcuartielles maybe these are the files you are looking for: https://github.com/arduino/Arduino/pull/1572/files#diff-10?

@dcuartielles
Copy link
Member Author

that code i adding the user to dialup for sure, but it is still not
registering the programmers so that they can be used by the dialup users,
that is the other half of the problem.

Also, it is issuing a perl command, I am not sure perl comes by default
with all the linux distros, it does in Ubuntu though.

It is a beginning, but solves only 25% of the problem. Lacks:

  • udev registration of the programmers
  • being able of calling it from the IDE or when the IDE is being installed
  • working for different OS variations

Thanks for pointing it out, I hadn't seen it :-)

/d

On 14 January 2014 22:56, Kristian Sloth Lauszus
notifications@github.comwrote:

@dcuartielles https://github.com/dcuartielles maybe these are the files
you are looking for:
https://github.com/arduino/Arduino/pull/1572/files#diff-10?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1786#issuecomment-32311821
.

@ffissore ffissore added the IDE label Feb 27, 2014
@ffissore ffissore self-assigned this May 28, 2015
@Avamander
Copy link
Contributor

It wouldn't hurt to warn users that there are missing udev rules for different programmers. Though, this should really be something bundled with distributions.

@per1234 per1234 added feature request A request to make an enhancement (not a bug fix) OS: Linux Specific to the Linux version of the Arduino IDE labels Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) OS: Linux Specific to the Linux version of the Arduino IDE
Projects
None yet
Development

No branches or pull requests

7 participants