Skip to content

Small linux changes #50

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ npm start
```
npm install
npm run pre-rebuild && npm run rebuild
sudo npm start
```
npm start
```
8 changes: 4 additions & 4 deletions back-end/checkDialout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function checkDialout(success, failure) {
if(err) {
failure(err);
} else {
const groups = stdout.split(" ");
if(groups.indexOf("dialout") != -1) {
success();
const groups = stdout;
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!

failure(dialoutMissingError);
Expand All @@ -26,4 +26,4 @@ function checkDialout(success, failure) {
}

module.exports = checkDialout;
module.exports.ERROR_MESSAGES = ERROR_MESSAGES;
module.exports.ERROR_MESSAGES = ERROR_MESSAGES;
3 changes: 2 additions & 1 deletion front-end/linux-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@
</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?

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

</p>
<p>
Then log out or reboot your machine.
To make it permanent log out and back in, or reboot your machine.
</p>
</div>
</div>
Expand Down