How to build Gnucash in /home/<user>/opt?

.The main reason for not adopting Endless OS is I use Gnucash to maintain my accounts and it requires Finace:Quote to update my investments on daily basis. Unfortunately the Flatpak version of Gnucash does not support Finance:Quote. I would like to build and install Gnucash in /home/user/opt as per instruction on this page
Please guide me how to manage this on Ostree?
I would also like to know how Endless OS updates are going to affect this installation.

Kamalakar.

Hi, your best bet would be to use a Podman container to run Ubuntu within EOS and GNUcash inside it. See Running Ubuntu with Podman

It gives only an Ubuntu terminal. How can I run Gnucash unless I get Ubuntu desktop?

You can run graphical applications too with the approach mentioned.

I have installed Lubuntu Desktop, made lightdm as default display manager but can’t start the display manager. What is the command to start lightdm from the terminal?

You don’t run the display manager and you don’t run the complete desktop session. You run graphical applications in the container directly and let them interact with the local Xserver running on your EOS host:

export DISPLAY=:0
lxterminal

If you really want to have a full desktop session, you need to install Xnest - which is a X11 Server running inside a Window on a Host X11, point your DISPLAY to this Xserver and run startlxde. But this approach is a little more complex and doesn’t has any advantages, so i’ll leave it here.

After installing gnucash I had exit root terminal and opened user terminal with command:
podman exec --interactive --tty --user $(whoami) --workdir /home/$(whoami) mycontainer /bin/bash

and typed:
export DISPLAY=:0
gnucash

and it gnucash opened in GUI

But on reboot it is not working:
$ gnucash
No protocol specified
Unable to init server: Could not connect: Connection refused
Error: could not initialize graphical user interface and option add-price-quotes was not set.
Perhaps you need to set the $DISPLAY environment variable ?
Run ‘gnucash --help’ to see a full list of available command line options.

I also tried:
$ gnucash --display=DISPLAY
Unable to init server: Broadway display type not supported: DISPLAY
Error: could not initialize graphical user interface and option add-price-quotes was not set.
Perhaps you need to set the $DISPLAY environment variable ?
Run ‘gnucash --help’ to see a full list of available command line options.

SOLVED: I looked at your script and found it needed:
xhost +
command on the host.

You need to allow access to your hosts’s Xserver with:

xhost +

this has to be done once after every reboot. I would recommend to put this in your ~/.bashrc to have it executed every time you open up a Terminal. Inside your container, i would also recommend you to put

export DISPLAY=:0

inside your ~/.bashrc. This way, everything is set up in a way that you can immediately run graphical applications.

One last problem for updating the investment.
Although internet access through host is available to apt-get it is not available to the applications. Even ping command packets are sent through the host but not received back:
root@ca50d6597e9c:/# ping www.google.co.in
PING www.google.co.in (172.217.161.3) 56(84) bytes of data.
^C
— www.google.co.in ping statistics —
16 packets transmitted, 0 received, 100% packet loss, time 15361ms

Although it works on host:
ping www.google.co.in
PING www.google.co.in (172.217.161.3) 56(84) bytes of data.
64 bytes from del03s10-in-f3.1e100.net (172.217.161.3): icmp_seq=1 ttl=57 time=45.6 ms

— www.google.co.in ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 14ms
rtt min/avg/max/mdev = 45.211/47.823/51.584/2.206 ms

This issue has been discussed over here:

SOLVED It was not internet problem but wrong URL in /usr/share/perl5/Finance/Quote/IndiaMutual.pm file which gets the quotes from Association of Mutual Funds of India website.

I am happy that Gnucash in the container is fully functional.

Kamalakar

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.