Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-12-2013, 08:22   #1
Registered User

Join Date: Dec 2013
Posts: 2
Shutdown Button

Hi All,

I have spent quite a bit of time and effort getting opencpn
+ charts onto the Raspberry Pi and it looks good so far.

One really annoying problem I cant find an immediate solution for
is how to turn off the Pi. Im running opencpn in full screen and Id
like to be able to present the user with an off button. I dont want
then simply turning the power off to the unit avoiding a clean shutdown.

Is there some way of customising the toolbar? Anyway of running a shutdown
script from somewhere in opencpn?

Is there a "off" plugin?

Thanks in advance

jono
__________________

__________________
jono_howlett is offline   Reply With Quote
Old 12-12-2013, 09:39   #2
Registered User
 
AISEAG's Avatar

Join Date: May 2012
Location: Dahouet (Brittany)
Boat: BENETEAU
Posts: 407
Re: Shutdown button

Jono,

There is a set of Shortcut into OpenCPN.

"Ctrl + Q" allows you to quit.


Serge
__________________

__________________
AISEAG is offline   Reply With Quote
Old 12-12-2013, 10:06   #3
Moderator Emeritus
 
GordMay's Avatar

Join Date: Mar 2003
Location: Thunder Bay, Ontario - 48-29N x 89-20W
Boat: (Cruiser Living On Dirt)
Posts: 31,572
Images: 240
Re: Shutdown button

Greetings and welcome aboard the CF, Jono.
__________________
Gord May
"If you didn't have the time or money to do it right in the first place, when will you get the time/$ to fix it?"



GordMay is online now   Reply With Quote
Old 12-12-2013, 19:57   #4
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
Re: Shutdown Button

Quote:
Originally Posted by jono_howlett View Post
Hi All,

I have spent quite a bit of time and effort getting opencpn
+ charts onto the Raspberry Pi and it looks good so far.

One really annoying problem I cant find an immediate solution for
is how to turn off the Pi. Im running opencpn in full screen and Id
like to be able to present the user with an off button. I dont want
then simply turning the power off to the unit avoiding a clean shutdown.

Is there some way of customising the toolbar? Anyway of running a shutdown
script from somewhere in opencpn?

Is there a "off" plugin?

Thanks in advance

jono
create a wish on the tracker

I, too, For the End of the menu!
himself confronted with such a problem when working in full screen

Here the concept of menu ideas with submenus where she could be such a button Computer Shutdown
Attached Thumbnails
Click image for larger version

Name:	UI_Touch_Concept.jpg
Views:	127
Size:	118.2 KB
ID:	72015  
__________________
Baikal is offline   Reply With Quote
Old 13-12-2013, 02:30   #5
Registered User

Join Date: Dec 2013
Posts: 2
Re: Shutdown Button

Quote:
Originally Posted by Baikal View Post
create a wish on the tracker

I, too, For the End of the menu!
himself confronted with such a problem when working in full screen

Here the concept of menu ideas with submenus where she could be such a button Computer Shutdown
Looks very nice! I love opencpn but its UI could do with a bit of an update. A customisable toolbar would be a really great feature. Users would be able to easily add URLs, scripts etc easily without getting into writing plugins.

jono
__________________
jono_howlett is offline   Reply With Quote
Old 14-12-2013, 16:29   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,314
Re: Shutdown Button

Quote:
Looks very nice! I love opencpn but its UI could do with a bit of an update.
OpenCPN had a complete rework of the UI recently, see all the work Jesper did!! This interface is pretty good I think, I may be prejudiced because one of the first things I did was to help him by compiling for windows and testing.....of course there is always room for improvement, so perhaps you should participate in this thread with some more specific thoughts and suggestions? Shortcut Keys List

User definable Keyboard macros will take an additional programmer, however bdcat is ready to improve the shortcuts if we can all agree and come up with a plan! Your help would be good.
__________________
rgleason is offline   Reply With Quote
Old 14-12-2013, 18:29   #7
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Re: Shutdown Button

There are already existing "shutdown" commands in linux/os-x and windows. These can be used to write trivial scripts that start O and then shutdown the computer upon exiting from O.

I definitely don't think that a button that shuts down the computer belongs in an application. It makes no more sense to put it into O then it would to but it into Firefox or Word.
__________________
Viking Sailor is offline   Reply With Quote
Old 14-12-2013, 19:27   #8
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Shutdown Button

Quote:
Originally Posted by jono_howlett View Post
Looks very nice! I love opencpn but its UI could do with a bit of an update. A customisable toolbar would be a really great feature. Users would be able to easily add URLs, scripts etc easily without getting into writing plugins.

jono
OK, while that "off plugin" idea was a bit too simple, this one is a bit better, so I wrote a plugin saving you the work with writing a plugin.
Introducing the Launcher:
It's a very simple dialog you can equip with as many configurable buttons as you like. To make it a bit more useful than what it would be when done completely outside OpenCPN, it does a pretty simple variable substitution, so you can use it to point other apps at your boat's location, send position report e-mails to your mom or kids etc.
Clone the source from https://github.com/nohal/launcher_pi to the plugin subdir of your source tree and cmake/make/install as you normally would.
No binaries for now and tested just on Linux...

Let me know if you want some more features or something does not work as expected.

Pavel
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2013-12-14 20:26:11.png
Views:	123
Size:	41.0 KB
ID:	72122   Click image for larger version

Name:	Screenshot from 2013-12-14 20:24:13.png
Views:	128
Size:	59.2 KB
ID:	72123  

__________________
nohal is online now   Reply With Quote
Old 14-12-2013, 21:16   #9
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
Re: Shutdown Button

Quote:
Originally Posted by nohal View Post
OK, while that "off plugin" idea was a bit too simple, this one is a bit better, so I wrote a plugin saving you the work with writing a plugin.
Introducing the Launcher:
It's a very simple dialog you can equip with as many configurable buttons as you like. To make it a bit more useful than what it would be when done completely outside OpenCPN, it does a pretty simple variable substitution, so you can use it to point other apps at your boat's location, send position report e-mails to your mom or kids etc.
Clone the source from https://github.com/nohal/launcher_pi to the plugin subdir of your source tree and cmake/make/install as you normally would.
No binaries for now and tested just on Linux...

Let me know if you want some more features or something does not work as expected.

Pavel
but as is the case with customer support Windows
what commands to shut down the computer
not enough to specify the path to the application executable
it would be good to display shortcuts to these applications in the launcher.
settings
opportunity for each team to specify the icon. Display Options - Only icon, text and icon, only text.

Please tell me how to do the build plugin windows in which commands which prescribe. I'm not a developer, not familiar with it.
__________________
Baikal is offline   Reply With Quote
Old 15-12-2013, 03:01   #10
Registered User

Join Date: May 2013
Location: Netherlands
Boat: Matthiesen & Paulsen, 40' Seefahrtkreuzer 50m2, 1935
Posts: 12
Shutting down the machine for a application to me feels like the wrong order.
Why not create a script that starts opencpn, waits for it to finish and then issue a shutdown?
On linux the script should be in /etc/init.d and have a logical link to it in the correct /etc/rc.x (x being most likely 2)
On windows a opencpn.cmd script can be made that starts opencpn and when finished it runs "shutdown -s"

On linux you can even create a script that just starts X, the window manager and opencpn. That way X is only run for the application and no other stuff is launched that is not needed
__________________
Verezano is offline   Reply With Quote
Old 15-12-2013, 09:12   #11
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Shutdown Button

Quote:
Originally Posted by Baikal View Post
but as is the case with customer support Windows
what commands to shut down the computer
not enough to specify the path to the application executable
it would be good to display shortcuts to these applications in the launcher.
settings
opportunity for each team to specify the icon. Display Options - Only icon, text and icon, only text.

Please tell me how to do the build plugin windows in which commands which prescribe. I'm not a developer, not familiar with it.
I uploaded a precompiled Windows binary to Download opencpnplugins from SourceForge.net - I didn't even try to run it, so let me know if there are any glitches.

Pavel
__________________
nohal is online now   Reply With Quote
Old 15-12-2013, 09:23   #12
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
Re: Shutdown Button

Quote:
Originally Posted by nohal View Post
I uploaded a precompiled Windows binary to Download opencpnplugins from SourceForge.net - I didn't even try to run it, so let me know if there are any glitches.

Pavel
Thank you!
But still I would like to compile from source yourself.
Please tell me how?

Makes the assembly CPN I've been doing, but does not work with plug-ins
possible in PM
__________________
Baikal is offline   Reply With Quote
Old 15-12-2013, 09:32   #13
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Shutdown Button

I suppose you still don't have the source on your machine...
Code:
cd c:\POENCPNSRC\plugins
git clone https://github.com/nohal/launcher_pi.git
cd ..\build
cmake ..
cmake --build . --config release
copy plugins\launcher_pi\Release\launcher_pi.dll "C:\Program files\OpenCPN\plugins\"
Pavel
__________________
nohal is online now   Reply With Quote
Old 15-12-2013, 10:15   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,314
Re: Shutdown Button

cmake --build . --config release <-- Thanks for the shortcut tip!
__________________
rgleason is offline   Reply With Quote
Old 15-12-2013, 22:56   #15
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
Re: Shutdown Button

Quote:
Originally Posted by nohal View Post
I suppose you still don't have the source on your machine...
Code:
cd c:\POENCPNSRC\plugins
git clone https://github.com/nohal/launcher_pi.git
cd ..\build
cmake ..
cmake --build . --config release
copy plugins\launcher_pi\Release\launcher_pi.dll "C:\Program files\OpenCPN\plugins\"
Pavel
that prescribe to (..)?
cd .. \ build
cmake ..
__________________

__________________
Baikal is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Routing Software. qtVlm fblc Navigation 614 21-11-2017 07:28
Govt Shutdown Impact on Boaters Richard5 General Sailing Forum 254 07-10-2013 22:48
how to change the size of the Toolbar Button? manuprenlair OpenCPN 2 16-12-2011 03:13



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 04:53.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.