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 23-05-2019, 15:50   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
O5 Linux in Ubuntu 18.04LTS for Windows10

TransmitterDan wrote in Post 2392 of the Beta Test Thread:
http://www.cruisersforum.com/forums/...ml#post2858431


Quote:
In an earlier beta thread I talked about running a native Linux version of OpenCPN V5 on native Windows (no virtual machine). At first it seemed there was no way to display graphics in a stable manner. But after some trial and error I have a stable version of O5 for Linux running on Windows. Below is a screen shot. This is using the WSL app (Ubuntu for Windows or previously known as Bash for Windows).

The "trick" is to install a window manager (xfce) and an rdp server (xrdp). So in this respect it is a lot like a headless mode. In fact, it's exactly like headless mode. It will also run within ddd so debugging is possible. So far the overall system seems very stable, responsive and usable. It's a pretty good development platform IMO.
This thread is an attempt to summarize the steps needed to accomplish this installation.
rgleason is offline   Reply With Quote
Old 23-05-2019, 16:10   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Dan wrote in another thread:
Quote:
Windows 10 now runs native Linux apps. Look up Windows System for Linux or Bash for Windows.
Quote:
Get started here: https://docs.microsoft.com/en-us/win.../install-win10

There are two distros in the Windows Store that you can install. I suggest the 18.0x version. You use git and cmake just like regular Linux (it is real Linux). Use the Linux build instructions from the O developer manual to download and build.

To run O you need to install xrdp on the Linux system then connect using the windows Remote Desktop application. It then runs the Linux version of O. You can also use RDP from an iPad and interact with O on the iPad. I like RDP over VNC because it creates a custom screen matching the remote display. And you can’t use VNC with the Windows Linux anyway.
Follow instructins in this link "Install Windows 10 subsystem for Linux", using "Windows Store" as TDan says.

1. Enable certain Windows 10 settings. Reboot.
2. Search for and install "Windows 10 Ubuntu 18.04LTS for Windows" terminal version with Bash.

To install OpenCPN for Linux -From the Terminal screen, follow the instructions in Getting Started > Install Ubuntu PPA
sudo apt-get install software-properties-common sudo add-apt-repository ppapencpn/opencpn sudo apt-get update sudo apt-get install opencpn
If there are messages "Error: Retrieving gpg Key timed out." just wait for the server to right itself or ping
ping ppa.launchpad.net
sudo apt install openssh-server openssh-client
Then try adding the PPA again.
sudo apt-get install opencpn
When it downloads, check where the files are with:
$ which opencpn
/usr/bin/opencpn

Then try executing opencpn
$opencpn

There are some errors executing the last command which have to be worked out.

Desktop Environment - XFCD 14mb compressed
rgleason is offline   Reply With Quote
Old 23-05-2019, 16:42   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

TransmitterDan also wrote:

Quote:
I like RDP over VNC because it creates a custom screen matching the remote display. And you can’t use VNC with the Windows Linux anyway.
rgleason is offline   Reply With Quote
Old 23-05-2019, 17:04   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

1. Download tarball for XFCD 4.12 Stable Release
2. You will have to build XFCD but first check for dependencies
3. Look for Dependencies here. Use your distributions package manager to install those packages.
4. A working GNU toolchain
5. Gtk+ and Glib headers, in some distributions called the -devel packages
  • Xfce 4.12 requires Gtk+ 2.24 and Glib 2.30
6. pkgconfig
7. Coffee


See Xfce's dependency chain
and Package specific dependencies
on the same page
https://docs.xfce.org/xfce/building


Then follow the Build and Installing directions on the same page.


TDan is this right? Is there a shortcut?
rgleason is offline   Reply With Quote
Old 23-05-2019, 17:27   #5
Registered User

Join Date: Dec 2012
Posts: 180
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

I can know your in good hands Rick,
RonSouthworth is offline   Reply With Quote
Old 23-05-2019, 17:56   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Dan, how did you solve this problem?
Bdbcat wrote:

"This port of Ubuntu terminal to W10 will not support GTK, as I see it."
rgleason is offline   Reply With Quote
Old 23-05-2019, 20:41   #7
Registered User

Join Date: Dec 2012
Posts: 180
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Quote:
Originally Posted by rgleason View Post
Dan, how did you solve this problem?
Bdbcat wrote:

"This port of Ubuntu terminal to W10 will not support GTK, as I see it."

Hi Rick

Love the cruiser app crashes

A big push of support libraries in the development branch last night don’t know how they trickle back if at all....

UBUNTU 19 develop is now currently 19.04.


Sounds like an interesting approach to using it in a container

/Ron
RonSouthworth is offline   Reply With Quote
Old 24-05-2019, 06:22   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Well, should I just remove that installation, and start over, and try to install some other preferred version of Ubuntu? These are the errors when I try to execute $opencpn

Quote:
ALSA lib pcm.c:2495snd_pcm_open_noupdate) Unknown PCM dmix
Cannot connect to server socket err = No such file or directory
jack server is not running or cannot be started <---just audio
08:07:19: Error: Unable to initialize GTK+, is DISPLAY set properly? <--- GTK driver

Lots of questions:

Is there a way to install the GTK driver?
Would UBUNTU 19.04 run properly in this MS Virtual Machine/Space. Does anyone know?
Also is this the right version to use?
How much space does it take installed with or without OpenCPN?
rgleason is offline   Reply With Quote
Old 24-05-2019, 06:55   #9
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Slight drift but WSL seemed an easier option to install signalk on win10. I used debian and followed the RPI signalk instructions. Then saving everything to a influxdb database should be not too involved s well. OpenCPN runs fine in windows as it is so i didn't try to get it working in a command line linux.
conachair is offline   Reply With Quote
Old 24-05-2019, 07:39   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Ubuntu Forums had some answers, which lead to some more questions of course.


https://askubuntu.com/questions/1145...-space-hyper-v


and here is something needed too
Supported Ubuntu virtual machines on Hyper-V


Quote:
Ubuntu 18.04?

For the default GNOME version, you should have a minimum 2GB RAM and 25 GB hard disk. However, I would advise having 4 GB of RAM for a comfortable use.
A processor released in last 8 years will work as well. Anything older than that should use a lightweight Linux distribution such as Lubuntu.

https://www.omgubuntu.co.uk/2018/04/...g-ubuntu-18-04
rgleason is offline   Reply With Quote
Old 25-05-2019, 05:02   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Clarification: Using WSL "Windows for Linux" (not Hyper V)

Windows Subsystem for Linux Installation Guide for Windows 10

Windows Subsystem for Linux Documentation


Also on Ubuntu forums it has been suggested to use 19.04 over 18.04LTS, evidently it is much faster and has better GNOME Shell.


However it appears that to run Linux in WSL the program needs to be packaged into a Windows Store App and certified by MS.
However there are ways to "roll your own"


There is more to WSL than Ubuntu


It appears that this June there will be a new Windows Store app for Ubuntu 19.04 using WSL2

See "When can I try this?" at the bottom
https://www.omgubuntu.co.uk/2019/05/...system-linux-2


However I believe this Store app is just for the "Terminal" version and not the full version.


Just going to a Vbox install might be much easier, as bdbcat suggested.
rgleason is offline   Reply With Quote
Old 25-05-2019, 05:34   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Custom Linux Installs and "Sideloading"
Creating a Custom Linux Distro for WSL


Roll your own and submit to MS for approval

https://github.com/Microsoft/WSL-DistroLauncher
rgleason is offline   Reply With Quote
Old 25-05-2019, 06:28   #13
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

Rick,

You don’t need to build anything from source to run OpenCPN in WSL. Everything I installed used sudo apt. So don’t believe to old blogs from 5 years ago when WSL was new and incomplete.

GTK installs just fine from the Ubuntu repository.

It’s a holiday weekend and I don’t have a computer. Next week maybe we can exchange some emails and you can get your system running. But using WSL is no different that regular Linux except for two things. WSL requires the user to install all the desired packages with apt. WSL needs an X server which you can get multiple ways. The simplest way is to install xrdp and use Windows Remote Desktop app to connect to xrdp. That’s the only differences I have found.
transmitterdan is offline   Reply With Quote
Old 25-05-2019, 07:36   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,634
Images: 2
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

You're a wizard TDan. Looking forward to your help.
The Ubuntu Forum's answers are proving to be "tried and true" answers and not focused on WSL.

Running Ubuntu in the new Windows 10 using WSL Windows System for Linux (not hyper-V)

Ubuntu 19.04 installed into WSL “Windows System for Linux” on Win10 host - How? Will it run Graphics intensive programs?

Perhaps we came to the wrong conclusions!
Will send you an email. Have a good week.
rgleason is offline   Reply With Quote
Old 25-05-2019, 09:25   #15
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: O5 Linux in Ubuntu 18.04LTS for Windows10

The answers on Ask Ubuntu are all wrong. In fact, most of the blogs and forums have poor information on WSL.

Can you run graphics apps on WSL?

Yes, because most Linux graphics apps (including OpenCPN) can use X-Windows. All you need is an X server that WSL can talk to. There are multiple solutions available including xrdp, Mobaxterm, etc. I like xrdp the best.

All of the libraries and tools needed to compile and run O can be installed with apt under WSL. Compiling is pretty fast on my old i7 machine. I can run ‘make -j 12’ and it compiles O in Linux very quickly. Faster than Microsoft Windows compiler even.

I have installed ddd for debugging and it works too.

I can compile the latest version of wxWidgets from git and it sort of works. There are a lot of new things in wx that seem at odds with O. The error about can’t seek on files plus lots and lots of gratuitous log file messages coming from wx. The wx team seems to be weeding some of that out.

Unlike Rick, I am terrible at creating a web based FAQ. Together we can create a FAQ that will let anyone run O in WSL.
transmitterdan is offline   Reply With Quote
Reply

Tags
linux, wind


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
OpenCPN Linux / Ubuntu Issues and Questions yachtmanforfun OpenCPN 65 24-01-2018 08:06
s63 plugin doens't work anymore in 16.04LTS Mbjh9acu OpenCPN 4 23-10-2016 09:27
How can I use a remote under Ubuntu Linux ? NahanniV OpenCPN 1 17-10-2016 12:42
How Can I Download Saved Tracks from Garmin GPS 72 on Ubuntu Linux? fgd3 OpenCPN 6 13-01-2015 16:34
OpenCPN GPS/AIS fix for Linux Mint 13 or Ubuntu 12.04 stephenippolito OpenCPN 3 20-10-2012 19:31

Advertise Here


All times are GMT -7. The time now is 12:29.


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.