Skip to content

Conversation

@fede2cr
Copy link

@fede2cr fede2cr commented Nov 30, 2016

I added more groups to the serial device, to make it work with other distributions.
No need to reboot so I added the sg command instead.

</p>
<p class="code">
sudo usermod -a -G dialout $USER
sg dialout "npm start"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you download the binaries "npm start" won't be the executable. What does this command do exactly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a cousin of the newgrp(1) tool that logs into a new group. sg(1) let's you run a command as a different group, so you don't really need to log off or reboot in this case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should leave this line out then because there could be different groups and I'm unsure what command we would run... maybe "flasher.js" but I don't know to be precise. I guess people can log in and out quickly

if (groups.match(/(dialout|tty|uucp)/)) {
success();
} else {
const dialoutMissingError = new Error(ERROR_MESSAGES.USER_NOT_IN_DIALOUT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the Error message to match the tty and uucp groups too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

To add your user account to the group run the following command in your terminal:
</p>
<p class="code">
sudo usermod -a -G dialout $USER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other distros does it need to be tty or uucp instead of dialout?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I didn't want to make the message too long. Should I clarify it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can sniff the distros to get a sane message to give?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What distro are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants