Cruisers Forum
 


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 22-02-2020, 14:58   #1
Registered User

Join Date: Jul 2015
Posts: 13
Change navobj.xml location

In my new navigation computer setup, I have 3 partitions:
2 system partitions (1 begin Windows 10 and the second one being Ubuntu).
1 Data partition, readable by both OS.

I want to be able to use openCPN with both OS. My charts and tides data are placed in the DATA partition. However, I would like to keep my tracks, waypoints, etc. when I switch from one OS to the other.
Is there a way to tell OpenCPN to move the navobj.xml file ?

I know that there is already a thread about sharing navobj.xml over a network but this is far more basic.

Thanks
lillu is offline   Reply With Quote
Old 23-02-2020, 10:40   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,139
Re: Change navobj.xml location

lillu...
No there's no way to change location of where to read navobj.xml file(s). At least not without to hack the OCPN code for your own use.
Another way would be to run OCPN by a small script in each OP. In Win use a batch file, sh-script in Linux, to start OCPN and when it returns after closing copy the navobj.xml file to the common partition, where I suppose your charts are located.
Also in that batch file you've to copy the navobj.xml file saved on the common partition to respective OCPN data folder before OCPN is starting. But copy ONLY if the file date-time is later than the one to overwrite.

And please make a backup of the files before you start to play.
Hakan is offline   Reply With Quote
Old 23-02-2020, 14:21   #3
Registered User

Join Date: Mar 2011
Posts: 650
Re: Change navobj.xml location

I would have thought soft/symbolic links could be used ?

If the data partition is accessible to both the Ubuntu & Windows operating systems when either is running, just create a soft/symbolic link.

Copy the populated navobj.xml file to the data partition and then when either operating system is running create a link referencing the navobj.xml file.

From Ubuntu, assuming the data partition is named data and its mount point is /mnt/data and you have created a opencpn directory in it.
Code:
ln -s /mnt/data/opencpn/navobj.xml ~/.opencpn/navobj.xml
and conversely from Windows, assuming the data partition is assigned drive letter z:
Code:
mklink c:\ProgramData\opencpn\navobj.xml z:\opencpn\navobj.xml
Untested, but just a suggestion....
stevead is offline   Reply With Quote
Old 24-02-2020, 10:46   #4
Registered User

Join Date: Jun 2015
Posts: 379
Re: Change navobj.xml location

Quote:
Originally Posted by stevead View Post
I would have thought soft/symbolic links could be used ?

]Untested, but just a suggestion....
Unlikely to work, for backup purpose O is doing rename and re-create this file.

Maybe running 0 in portable mode from the same directory?

IIRC window and linux don't use the same name for the configuration file so it could work even if pathnames stored aren't the same.
did-g is offline   Reply With Quote
Old 25-02-2020, 02:23   #5
Registered User

Join Date: Jul 2015
Posts: 13
Re: Change navobj.xml location

Quote:
Originally Posted by Hakan View Post
lillu...
No there's no way to change location of where to read navobj.xml file(s). At least not without to hack the OCPN code for your own use.
Another way would be to run OCPN by a small script in each OP. In Win use a batch file, sh-script in Linux, to start OCPN and when it returns after closing copy the navobj.xml file to the common partition, where I suppose your charts are located.
Also in that batch file you've to copy the navobj.xml file saved on the common partition to respective OCPN data folder before OCPN is starting. But copy ONLY if the file date-time is later than the one to overwrite.

And please make a backup of the files before you start to play.
It was my fallback plan....so, I'll go with this solution. No worries about the backups and polishing the scripts, I was an IT consultant before sailing (and will have, unfortunately, to get back to it in a few years ;-)).
I was actually considering sorting the script in Python, so I would have to do it only once.
lillu is offline   Reply With Quote
Old 25-02-2020, 03:07   #6
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,139
Re: Change navobj.xml location

illu..
Python is nowadays of course the most convenient solution. My old fashion notes to be left out.


And running dual boot where Win10 is one part you've probably detected the W10 nasty behavior to not release the common partition until you close it while key "shift" is pressed?
Hakan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
navobj.xml.changes still broken seandepagnier OpenCPN 2 06-08-2017 11:41
navobj Error Parsing Johna1 OpenCPN 8 20-10-2016 02:10
How to merge two navobj.xml? myocean OpenCPN 5 24-05-2015 09:00
Are you an XML expert? Tropical Storm Layer bbalan OpenCPN 7 28-08-2014 04:33

Advertise Here


All times are GMT -7. The time now is 15:59.


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.