Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 27-02-2014, 10:10   #46
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: OpenCPN Beta Version 3.3.1419 Released

cagney, fulup, nohal, muttnik, oh, heck, everyone....

I am interested in comments re:
FS#1340 : O should check that a Linux user belongs to the "dialout" group.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 27-02-2014, 10:59   #47
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: OpenCPN Beta Version 3.3.1419 Released

Dave...
Well, it will help the "average Joe the new Linux user", at least on a recent Debian/Ubuntu/Fedora as this group exists there. But for example on RHEL/CentOS 5 the group owning the serial ports is uucp. Not sure about SuSE and others.
And it is not needed at all for anybody using gpsd or other network datasources.
My take is that if implement it at all, we have to look at the ownership of /dev/ttyS* to get the right group and then show something unobtrusive, maybe just once as the "not for navigation" message.

Pavel
nohal is offline   Reply With Quote
Old 27-02-2014, 14:30   #48
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN Beta Version 3.3.1419 Released

Dave

We can't do much more than Pavel says, in one form or another.
"dialout" should be replaced with the return of
Quote:
$stat -c %G /dev/ttyS0
or something like that, to cover all Linuxes.

Thomas
cagney is offline   Reply With Quote
Old 27-02-2014, 16:19   #49
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: OpenCPN Beta Version 3.3.1419 Released

cagney....

Do you think that showing "just once" is sufficient? It sure would be more convenient that trying to guess whether the user wants serial port access, or not....every time we start up....

Dave
bdbcat is offline   Reply With Quote
Old 27-02-2014, 17:24   #50
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: OpenCPN Beta Version 3.3.1419 Released

Dave...
I would sure not show it when not needed, perhaps show it just in case there is a configured serial connection we need to open and can't because of the access rights.

Pavel
nohal is offline   Reply With Quote
Old 27-02-2014, 18:23   #51
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: OpenCPN Beta Version 3.3.1419 Released

Pavel....

Just to be fussy...

If ports are not available due to non-membership in the correct group, the first-time noob user will see no available ports in the Connections dropdown list. I think this was Fulup's issue.

So, we can't configure, select, or even see anything unless the group membership is right to start with.

Maybe we show the dialog on the first access to Options->Connections->Add ? Still could get into a "nagware" cycle.


Dave
bdbcat is offline   Reply With Quote
Old 27-02-2014, 18:31   #52
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: OpenCPN Beta Version 3.3.1419 Released

Dave...
Yes, I know, in the perfect world everybody would read and perhaps even understand the installation instructions... The toolbox seems to be a good compromise. I really would like to avoid displaying it at the startup as there is a lot of use cases where it will be nothing but annoying...

Pavel
nohal is offline   Reply With Quote
Old 27-02-2014, 23:32   #53
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,742
Re: OpenCPN Beta Version 3.3.1419 Released

Quote:
Originally Posted by bdbcat View Post

So, we can't configure, select, or even see anything unless the group membership is right to start with.

Dave
And if this condition triggers a pop-up?
bcn is offline   Reply With Quote
Old 28-02-2014, 08:29   #54
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN Beta Version 3.3.1419 Released

Quote:
Originally Posted by bdbcat View Post
Pavel....

Just to be fussy...

If ports are not available due to non-membership in the correct group, the first-time noob user will see no available ports in the Connections dropdown list. I think this was Fulup's issue.

So, we can't configure, select, or even see anything unless the group membership is right to start with.

Maybe we show the dialog on the first access to Options->Connections->Add ? Still could get into a "nagware" cycle.


Dave
Show a dialog if a user tries to configure a serial connection, without belonging to the correct group.
Change, so that the network radio-button is on, by default.
When a Linux user changes to the serial radio-button and don't belong to the correct group => Show a popup dialog containing the necessary steps to make it work.
Reset the radio-buttons to the default state when pressing "Apply".
A user that don't get it then, needs to be nagged a bit.

Thomas
cagney is offline   Reply With Quote
Old 28-02-2014, 12:13   #55
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 983
Re: OpenCPN Beta Version 3.3.1419 Released

Being one of those new Linux users Pavel mentioned I found the instructions in the manual on adding myself to the dialout group quite clear. Where I had a problem was not knowing which package to download. I don't understand the dialout group issue, but wouldn't it be enough to explain in the connections dialogue that "if you're using Linux and don't see any ports the problem may be that you are not a member of the group that owns the device--see the installation instructions for more details"?

Fabbian
fgd3 is offline   Reply With Quote
Old 28-02-2014, 15:49   #56
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: OpenCPN Beta Version 3.3.1419 Released

Here is the proposed language:

The user and group name are dynamically adjusted to the current OCPN user, and to the group owning /dev/ttyS0.

Edits solicited.

Dave
Attached Thumbnails
Click image for larger version

Name:	group.jpeg
Views:	158
Size:	30.6 KB
ID:	76949  
bdbcat is offline   Reply With Quote
Old 28-02-2014, 16:21   #57
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 983
Re: OpenCPN Beta Version 3.3.1419 Released

I thought the dialout group was associated with Ubuntu. For RHEL/CentOS 5 it is uucp. Is there a way to determine the group that owns the serial devices so you can use a variable text instead of "dialout"? Would anything other than the group name need to be changed in the "sudo usermod" command?

Other than those issues I think your warning is just fine. I assume that prompt would be presented only if the user attempted to add a connection and lacked the necessary permission. If the user doesn't attempt to establish a connection for NMEA data it doesn't matter that he doesn't have permission. Perhaps he's just looking at his charts in the office, dreaming of a cruise when he should be working.

One question: can OpenCPN distinguish between the case where no serial devices are attached to the computer and the case where there are serial devices attached but the user does not have permission to access them?

Fabbian
fgd3 is offline   Reply With Quote
Old 28-02-2014, 16:33   #58
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: OpenCPN Beta Version 3.3.1419 Released

Fabbian...

I think you missed my later edit:

Code:
The user and group name are dynamically adjusted to the current OCPN user, and to the group owning /dev/ttyS0.
So, the group may be dialout, or uucp, as determined at runtime.

To answer your question:
linux security is thorough. In userspace, "non-membership in the correct group" looks exactly like "no serial ports at all".

Dave
bdbcat is offline   Reply With Quote
Old 28-02-2014, 16:50   #59
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: OpenCPN Beta Version 3.3.1419 Released

Folks...

I sort of liked cagney's proposal, and have implemented that in the github master.

Take a look, if you like.

btw, I found, on Ubuntu, that if you remove yourself from a specific group, then you need to logout and back in to have the removal take effect....this was unexpected.


Thanks
Dave
bdbcat is offline   Reply With Quote
Old 01-03-2014, 02:39   #60
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN Beta Version 3.3.1419 Released

Quote:
Originally Posted by bdbcat View Post
Folks...

I sort of liked cagney's proposal, and have implemented that in the github master.

Take a look, if you like.

btw, I found, on Ubuntu, that if you remove yourself from a specific group, then you need to logout and back in to have the removal take effect....this was unexpected.


Thanks
Dave
Dave

I also had to log out and back in for adding myself to a group, to take effect. I suppose it boils down to that it's easier to have the user doing this than implementing all necessary changes in a running GUI session.
Not what I expect from a Linux distro.

Your popup works. No nags at all. The popup only comes up once in a session. If a user ignores it or press cancel, and tries again, a serial connection can be configured, that will never work. Once the default radio button is changed from "Network" to "Serial", it is never reset to default during the current session.
Is this intentional to avoid "nagging"?
Should we cover a case where there is a serial connection defined, but the user doesn’t belong to the correct group? This could be done when starting O.
I don't know. Where do we draw the line?

Thomas
cagney is offline   Reply With Quote
Reply

Tags
enc, lease, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 19:00.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.