Command "system" works differently when installing Octave from flatpak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Command "system" works differently when installing Octave from flatpak

Jaime
Hi everyone,
I will try not to waste your time.

I work in linux (kubuntu, 18.04 LTS bionic).

Octave can be installed directly from the package manager, what installs
Octave 4.2.2 and from flatpak (can be also done from the packages manager
telling him to recognize flatpak packages), it installs Octave 5.2.0. So I
have both versions.

I am trying to call an external function, '/gdalinfo.py'/ using
'/system()/'.

--Runing in Octave 4.2.2 (normal installation). Works fine
system('gdalinfo')
Usage: gdalinfo [--help-general] [-json] [-mm] [-stats] [-hist] [-nogcp]
[-nomd]
                [-norat] [-noct] [-nofl] [-checksum] [-proj4]
                [-listmdd] [-mdd domain|`all`] [-wkt_format WKT1|WKT2|...]*
                [-sd subdataset] [-oo NAME=VALUE]* datasetname

--Runing in Octave 5.2.0 (from flatpak), I get:
system('gdalinfo')
sh: gdalinfo: orden no encontrada
ans =  127

I have tried to addpath(genpath(_root to gdalinfo_)) but it did not work.

Any help? (Excuse me if it is a stupid question)
Thanks




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Command "system" works differently when installing Octave from flatpak

DigitalHermit
Jaime:

> I have tried to addpath(genpath(_root to gdalinfo_)) but it did not work.
>
> Any help? (Excuse me if it is a stupid question)

Have you tried using the flatpak override command? E.g.:
flatpak override --user env=PATH=$PATH:/some/new/path

--
"Don't be lazy. Do the thing. Do it properly."  - Simone Giertz


Reply | Threaded
Open this post in threaded view
|

Re: Command "system" works differently when installing Octave from flatpak

DigitalHermit
On Mon, Apr 6, 2020 at 10:27 AM Jaime Almonacid Caballer
<[hidden email]> wrote:
>
> Thanks a lot Kwan,
> No. I hadn't tried it. I have tried right now and I got:
> $ flatpak override --user env=PATH=$PATH:/usr/bin/

Dang it. Apologies. I had a typo (did it from memory):

flatpak override --user --env=PATH=$PATH:/path/to/new

But you are correct in that the system path should already be there.
You can verify with:

flatpak override --show --user org.octave.Octave

Also please note that I am doing this with the --user option. It's
possible that you have installed in the system path (this is the case
if you did it with sudo).  If you installed with sudo, leave out the
--user.

--
"Don't be lazy. Do the thing. Do it properly."  - Simone Giertz