Experimental "Flatpak" distribution of JMRI


 

Bad idea: Flatpak will create the desktop entries with icons.

And Flatpak run itself the applications in an isolated environment. User
should not run outside of flatpak the JMRI applications installed by
Flatpak. It must be started from the desktop entries. Or, if the user
really really want, with the command line "flatpak run --command".


"Dave Sand" <ds@...> writes:

Dave,

Once you find the JMRI install location, you can run "./CreateJmriApps.sh -d" to create the desktop icons and start menu entries.

Dave Sand

----- Original message -----
From: "Sandpiper via groups.io" <sandpiper270.dm@...>
To: [email protected]
Subject: Re: [jmriusers] Experimental "Flatpak" distribution of JMRI
Date: Saturday, April 05, 2025 10:26 PM

I just tried the flatpak. I am using Linux Mint Cinammon 21.3. The URL did not start any flatpak installer, it just downloaded the file.

After downloading the flatpak to my download folder, I tried to right click it to install it. There was no program associated with it to install it,
even though I have flatpaks installed on my system. I asked chatGPT how to install it, and got some directions on how to open a terminal
window, navigate to where the download file was, and then install it. After some fussing, I was able to do that. I didn't get any indication that it
worked, but doing 'flatpak list', I was able to see it was installed.

There was nothing in the Start menu that would let me run it. I didn't know where it would be on my system, since I am not used to manually
dealing with flatpaks. Using 'which JMRI', or any other name I could think of, did not show anything like that installed. ChatGPT told me that if
I ran 'flatpak run org.jmri.JMRI' in a terminal window, then it would run. When I did that, DecoderPro opened up. I never use DecoderPro,
always use PanelPro. I didn't see any way to make it open to that.

I finally found where on my system it was installed. It was in my home directory at ~
/.local/share/flatpak/app/org.jmri.JMRI/current/active/files/share/JMRI. By navigating there with the Nemo file manager, I found PanelPro and
DecoderPro, and could start them.

That is my experience, it was a bit painful. Much easier to just install the java that you want, and also JMRI. Assuming the flatpak can be made
to 'just work' for the install, I would think for the new user, it will fail to connect to an external DCC system, such as the NCE PowerCab I have
here at the laptop, because JMRI isn't a member of the dialout group.

Dave Morgan


 

Hello. Flatpak packager here.


# Installation and usage of JMRI Flatpak on Linux Mint Cinammon 21.3

So, I have tested on a fresh installation of Linux Mint Cinammon 21.3
and I can confirm that the system do not know what to do with the
Flatpak bundle file.

Which is strange, because the application manager of Mint Cinammon 21.3
can install Flatpak package from Flathub. So, I guess the installation
on this version of Mint would not require the terminal when JMRI would
be on Flathub.

But after installing the Flatpak bundle of JMRI, I can now start the
different JMRI applications from the start menu of Mint. I just searched
"JMRI" and I can see the applications and launch them.

So, on Linux Mint Cinammon 21.3:

* The installation is a bit rough, due to Linux Mint, I will open a bug
report about it

* It would be "1 click button" to install when JMRI would be on Flathub

* After installation, you can launch the applications from the Start
menu

* I could successfully uninstall JMRI from the application manager of
Mint.


# Installation and usage of JMRI Flatpak on Linux Mint Cinammon 22.1

I also tested with the latest version I can found of Linux Mint
Cinammon: 22.1

This version of Mint still did not recognize the .flatpak file. I still
could install other Flatpak application with the application manager.
Installation of JMRI on Mint would not need the terminal when JMRI
would be published on Flathub.

After installation of JMRI, I could also launch the JMRI applications
from the Start menu.

But I couldn't uninstall JMRI from the application manager: It didn't
found JMRI. Another bug report to open to Mint.


# Launching the JMRI applications

Flatpak is not only a archive containing the applications: It run the
applications in an isolated environment.

You are not supposed to go on the installation directory and run the
applications from there.

You must start the applications from the Start menu.

And if you really really want to use the command line:

/usr/bin/flatpak run --command=/app/share/JMRI/PanelPro org.jmri.JMRI

To run the PanelPro. Or replace the "PanelPro" with the application you
want.





"Sandpiper via groups.io" <sandpiper270.dm@...> writes:

I just tried the flatpak. I am using Linux Mint Cinammon 21.3. The URL did not start any flatpak installer, it just downloaded the file.

After downloading the flatpak to my download folder, I tried to right click it to install it. There was no program associated with it to install it,
even though I have flatpaks installed on my system. I asked chatGPT how to install it, and got some directions on how to open a terminal
window, navigate to where the download file was, and then install it. After some fussing, I was able to do that. I didn't get any indication that it
worked, but doing 'flatpak list', I was able to see it was installed.

There was nothing in the Start menu that would let me run it. I didn't know where it would be on my system, since I am not used to manually
dealing with flatpaks. Using 'which JMRI', or any other name I could think of, did not show anything like that installed. ChatGPT told me that if
I ran 'flatpak run org.jmri.JMRI' in a terminal window, then it would run. When I did that, DecoderPro opened up. I never use DecoderPro,
always use PanelPro. I didn't see any way to make it open to that.

I finally found where on my system it was installed. It was in my home directory at ~
/.local/share/flatpak/app/org.jmri.JMRI/current/active/files/share/JMRI. By navigating there with the Nemo file manager, I found PanelPro and
DecoderPro, and could start them.

That is my experience, it was a bit painful. Much easier to just install the java that you want, and also JMRI. Assuming the flatpak can be made
to 'just work' for the install, I would think for the new user, it will fail to connect to an external DCC system, such as the NCE PowerCab I have
here at the laptop, because JMRI isn't a member of the dialout group.

Dave Morgan


 

Hello. Flatpak packager here.

What problem did you encounter?

The Flatpak version install a .desktop file for each JMRI application.
Then, these applications appear in your desktop menu. From which you can
launch them. It is not needed to run the scripts from the command line.

Or maybe Idid not understand what problem(s) do you encounter with the
Flatpak version.


"Jim Albanowski via groups.io" <jimalbanowski@...> writes:

Linux Crew:

Playing further with my flatpak install...

One hoped for feature with a Linux release is a seamless update of a system.

The flatpak install uses the same files structure for data but I have
a problem finding the "programs" the scripts... No big problem there
were launcher icons installed in "other" in the start pane but I
wanted to update desktop icons that are easily built in Mint Cinnamon.

The help show files gives me an /app/share/JMRI but that's not obvious
where that actually is... there is no app directory in Home or the
higher File System...

So for me... interesting... but I would ask the developers to get the
install to 100% of the standard we have or not worry about the flatpak
version...

I have several Linux/Mint/JMRI installs that I've gifted/built on
recycled PC's that the easier an update the better... We are generally
talking "noob" class computer users let alone Linux users.

Jim Albanowski



 

Hello. Flatpak packager here.

The actual installation method with Java require to run command lines
and could still have problems. In the past, Igot multiple time JMRI
telling me that it didn't found the X server or things like that. It's
not a trivial thing to do. Or at least, not for every one.

By packaging JMRI with Flatpak and distribute a copy in Flathub, on any
Linux distribution with Flatpak managed properly, a user could install
it by simply clicking the [Install] button.

For the different architecture support, it will come later.


Best regards.



"Robert Heller via groups.io" <heller@...> writes:

This seems like a "solution looking for a problem", at least for *Linux*.
Since JMRI is in JAVA and requires nothing outside of JAVA's JRE and
installing a suitable JRE under Linux is "trivial" (compared to MS-Windows or
MacOS), I am not sure how truely useful or needful this is.

I can see a flatpak (or similar) for MS-Windows or MacOS, since it appears
that those two O/S's have the greatest problems with installing JMRI, mostly
caused by confusion about installing the proper version of a JRE.

*I* would find a Linux "Flatpak" distribution of JMRI to be far more hassle to
deal with than the current Linux distribution methodolgy of JMRI. Actually, I
expect that the current Experimental "Flatpak" distribution of JMRI won't work
on my machine(s) anyway -- I expect it is a x86_64 Flatpak and all of my
machines use ARM processors. And this brings up a *new* issue that will
complicate things: there would need to be *four* Linux flatpaks: ix86, x86_64,
armv7l, and aarch64.

My only thought about "improvements" in the Linux distribution of JMRI would
be the creation of .deb and .rpm distrubutions of JMRI. I realize that JMRI
will never be in any Linux distro repo and I understand why that is, but a
self-made .deb and .rpm with a proper openjdk-XX-jre depenency could be
helpful. *I* could probably help with creating the necessary control files to
help with this, if anyone is interested.

At Fri, 4 Apr 2025 08:19:38 -0400 "Bob Jacobsen via groups.io" <rgj1927@...> wrote:


 

Thank you Dave Sand.
In looking back at my reply above, I see that I have a mistake. It isn't JMRI that needs to be a member of the dial-out group, it is the user. So if that user were just upgrading using a flatpak, then they would already have been a member of that group, and it would work.
Dave Morgan


 

Hello. Flatpak packager here.

Thank you for your testing.

From what I understand, the Flatpak would just be an option. That you
could download from the JMRI website or, later, from Flathub. That mean
directly from any Linux Application Manager, if it use Flathub as a
repository.

For now, the Flatpak package is only for x86_64 because of the java
runtime who is for this architecture. I plan to make other versions for
different architecture later. Or a multi architecture version if it's
possible.



"splasher" <steve@...> writes:

As long as it is an additional option for Linux users. I run RPi and it is super easy right now to rename the existing JMRI folder and extract the
replacement. Yes, I do have to handle Java separately, but then how often is the Java requirements changed. I would hate to see the existing
process changed and/or complicated by something called Flatpak.


 

Dave,

Once you find the JMRI install location, you can run "./CreateJmriApps.sh -d" to create the desktop icons and start menu entries.

Dave Sand


----- Original message -----
From: "Sandpiper via groups.io" <sandpiper270.dm=[email protected]>
Subject: Re: [jmriusers] Experimental "Flatpak" distribution of JMRI
Date: Saturday, April 05, 2025 10:26 PM

I just tried the flatpak. I am using Linux Mint Cinammon 21.3. The URL did not start any flatpak installer, it just downloaded the file.

After downloading the flatpak to my download folder, I tried to right click it to install it. There was no program associated with it to install it, even though I have flatpaks installed on my system. I asked chatGPT how to install it, and got some directions on how to open a terminal window, navigate to where the download file was, and then install it. After some fussing, I was able to do that. I didn't get any indication that it worked, but doing 'flatpak list', I was able to see it was installed.

There was nothing in the Start menu that would let me run it. I didn't know where it would be on my system, since I am not used to manually dealing with flatpaks. Using 'which JMRI', or any other name I could think of, did not show anything like that installed. ChatGPT told me that if I ran 'flatpak run org.jmri.JMRI' in a terminal window, then it would run. When I did that, DecoderPro opened up. I never use DecoderPro, always use PanelPro. I didn't see any way to make it open to that.

I finally found where on my system it was installed. It was in my home directory at ~/.local/share/flatpak/app/org.jmri.JMRI/current/active/files/share/JMRI. By navigating there with the Nemo file manager, I found PanelPro and DecoderPro, and could start them.

That is my experience, it was a bit painful. Much easier to just install the java that you want, and also JMRI. Assuming the flatpak can be made to 'just work' for the install, I would think for the new user, it will fail to connect to an external DCC system, such as the NCE PowerCab I have here at the laptop, because JMRI isn't a member of the dialout group.

Dave Morgan


 

I just tried the flatpak. I am using Linux Mint Cinammon 21.3. The URL did not start any flatpak installer, it just downloaded the file.
After downloading the flatpak to my download folder, I tried to right click it to install it. There was no program associated with it to install it, even though I have flatpaks installed on my system. I asked chatGPT how to install it, and got some directions on how to open a terminal window, navigate to where the download file was, and then install it. After some fussing, I was able to do that. I didn't get any indication that it worked, but doing 'flatpak list', I was able to see it was installed.
There was nothing in the Start menu that would let me run it. I didn't know where it would be on my system, since I am not used to manually dealing with flatpaks. Using 'which JMRI', or any other name I could think of, did not show anything like that installed. ChatGPT told me that if I ran 'flatpak run org.jmri.JMRI' in a terminal window, then it would run. When I did that, DecoderPro opened up. I never use DecoderPro, always use PanelPro. I didn't see any way to make it open to that.
I finally found where on my system it was installed. It was in my home directory at ~/.local/share/flatpak/app/org.jmri.JMRI/current/active/files/share/JMRI. By navigating there with the Nemo file manager, I found PanelPro and DecoderPro, and could start them.
That is my experience, it was a bit painful. Much easier to just install the java that you want, and also JMRI. Assuming the flatpak can be made to 'just work' for the install, I would think for the new user, it will fail to connect to an external DCC system, such as the NCE PowerCab I have here at the laptop, because JMRI isn't a member of the dialout group.
Dave Morgan


 

Linux Crew:

Playing further with my flatpak install...

One hoped for feature with a Linux release is a seamless update of a system.

The flatpak install uses the same files structure for data but I have a problem finding the "programs" the scripts... No big problem there were launcher icons installed in "other" in the start pane but I wanted to update desktop icons that are easily built in Mint Cinnamon.

The help show files gives me an /app/share/JMRI but that's not obvious where that actually is... there is no app directory in Home or the higher File System...

So for me... interesting... but I would ask the developers to get the install to 100% of the standard we have or not worry about the flatpak version...

I have several Linux/Mint/JMRI installs that I've gifted/built on recycled PC's that the easier an update the better... We are generally talking "noob" class computer users let alone Linux users.

Jim Albanowski


 

I understand that. The "tricky bit" for both MS-Windows and MacOS installs is
getting and installing the "proper" JAVA JRE, not actually installing JMRI
itself. That seems to be what non-techies seem to have the most trouble with.
And probably the most confusing thing is that the version of Java at java.org
-- Oracle's JAVA -- is the wrong one. This is where something like a "Flatpak"
type of install might be helpful.

Getting the correct version of JAVA for *Linux* is pretty trivial, by
comparison, since almost all Linux distros have OpenJDK in their repo. Here
having a RPM or DEB package with a proper depenency for OpenJDK could be
helpful, eg:

sudo apt install ./jmri-5.12.deb

would then go after openjdk-17-jre (and openjdk-17-jre-headless)
automagically.

At Fri, 04 Apr 2025 10:29:53 -0500 "Dave Sand" <ds@...> wrote:


Robert,

The macOS install is essentially the same as the Linux install. Download a DMG, open it and drag "JMRI" to "Applications".

Dave Sand


----- Original message -----
From: "Robert Heller via groups.io" <hellere[email protected]>
To: [email protected]
Subject: Re: [jmriusers] Experimental "Flatpak" distribution of JMRI
Date: Friday, April 04, 2025 8:34 AM

This seems like a "solution looking for a problem", at least for *Linux*.
Since JMRI is in JAVA and requires nothing outside of JAVA's JRE and
installing a suitable JRE under Linux is "trivial" (compared to MS-Windows or
MacOS), I am not sure how truely useful or needful this is.

I can see a flatpak (or similar) for MS-Windows or MacOS, since it appears
that those two O/S's have the greatest problems with installing JMRI, mostly
caused by confusion about installing the proper version of a JRE.

*I* would find a Linux "Flatpak" distribution of JMRI to be far more hassle to
deal with than the current Linux distribution methodolgy of JMRI. Actually, I
expect that the current Experimental "Flatpak" distribution of JMRI won't work
on my machine(s) anyway -- I expect it is a x86_64 Flatpak and all of my
machines use ARM processors. And this brings up a *new* issue that will
complicate things: there would need to be *four* Linux flatpaks: ix86, x86_64,
armv7l, and aarch64.

My only thought about "improvements" in the Linux distribution of JMRI would
be the creation of .deb and .rpm distrubutions of JMRI. I realize that JMRI
will never be in any Linux distro repo and I understand why that is, but a
self-made .deb and .rpm with a proper openjdk-XX-jre depenency could be
helpful. *I* could probably help with creating the necessary control files to
help with this, if anyone is interested.

At Fri, 4 Apr 2025 08:19:38 -0400 "Bob Jacobsen via groups.io" <rgj1927@...> wrote:


A user has been interested in possibly distributing JMRI as a ������FlatPak������ for Linux. I don������t know much about that method, but apparently the distribution file also includes the JRE, so it������s (at least in theory) easier to install.

As an experiment, you can find a 5.10 distribution in this form at



For more on this, see JMRI/JMRI Issue 11658:



Is anybody familiar enough with this distribution method to be able to try it?

Is this something that we should do on an ongoing basis?

Bob
������
Bob Jacobsen
rgj1927@...










--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services












--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services


 

Robert,

The macOS install is essentially the same as the Linux install. Download a DMG, open it and drag "JMRI" to "Applications".

Dave Sand

----- Original message -----
From: "Robert Heller via groups.io" <heller@...>
To: [email protected]
Subject: Re: [jmriusers] Experimental "Flatpak" distribution of JMRI
Date: Friday, April 04, 2025 8:34 AM

This seems like a "solution looking for a problem", at least for *Linux*.
Since JMRI is in JAVA and requires nothing outside of JAVA's JRE and
installing a suitable JRE under Linux is "trivial" (compared to MS-Windows or
MacOS), I am not sure how truely useful or needful this is.

I can see a flatpak (or similar) for MS-Windows or MacOS, since it appears
that those two O/S's have the greatest problems with installing JMRI, mostly
caused by confusion about installing the proper version of a JRE.

*I* would find a Linux "Flatpak" distribution of JMRI to be far more hassle to
deal with than the current Linux distribution methodolgy of JMRI. Actually, I
expect that the current Experimental "Flatpak" distribution of JMRI won't work
on my machine(s) anyway -- I expect it is a x86_64 Flatpak and all of my
machines use ARM processors. And this brings up a *new* issue that will
complicate things: there would need to be *four* Linux flatpaks: ix86, x86_64,
armv7l, and aarch64.

My only thought about "improvements" in the Linux distribution of JMRI would
be the creation of .deb and .rpm distrubutions of JMRI. I realize that JMRI
will never be in any Linux distro repo and I understand why that is, but a
self-made .deb and .rpm with a proper openjdk-XX-jre depenency could be
helpful. *I* could probably help with creating the necessary control files to
help with this, if anyone is interested.

At Fri, 4 Apr 2025 08:19:38 -0400 "Bob Jacobsen via groups.io" <rgj1927@...> wrote:


A user has been interested in possibly distributing JMRI as a ������FlatPak������ for Linux. I don������t know much about that method, but apparently the distribution file also includes the JRE, so it������s (at least in theory) easier to install.

As an experiment, you can find a 5.10 distribution in this form at



For more on this, see JMRI/JMRI Issue 11658:



Is anybody familiar enough with this distribution method to be able to try it?

Is this something that we should do on an ongoing basis?

Bob
������
Bob Jacobsen
rgj1927@...










--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services


 

Bob and everyone,

I have no strong feelings about adding a flatpak (and my Linux distribution does not have great support for it, so I won't test - plus I prefer spending my development time on other parts of JMRI which I've been neglecting far too long already).

I'm just slightly wary of either dropping behind java releases or adding more flatpak releases to the JMRI schedule (i.e. 5.10-java17.0.13 on 5.10 release in Dec 2024, 5.10-java17.0.14 on Jan 21, 2025, 5.10-java17.0.15 on Apr 15, 2025 if things go as planned at Oracle).

OTOH, I don't know if this is of any real concern, considering we are already shipping dozens (?) of libraries which also may go out of date in between production releases, and it's not system java but JMRI java :)

Heiko

--
eMails verschlüsseln mit PGP - privacy is your right!
Mein PGP-Key zur Verifizierung:


 

This seems like a "solution looking for a problem", at least for *Linux*.
Since JMRI is in JAVA and requires nothing outside of JAVA's JRE and
installing a suitable JRE under Linux is "trivial" (compared to MS-Windows or
MacOS), I am not sure how truely useful or needful this is.

I can see a flatpak (or similar) for MS-Windows or MacOS, since it appears
that those two O/S's have the greatest problems with installing JMRI, mostly
caused by confusion about installing the proper version of a JRE.

*I* would find a Linux "Flatpak" distribution of JMRI to be far more hassle to
deal with than the current Linux distribution methodolgy of JMRI. Actually, I
expect that the current Experimental "Flatpak" distribution of JMRI won't work
on my machine(s) anyway -- I expect it is a x86_64 Flatpak and all of my
machines use ARM processors. And this brings up a *new* issue that will
complicate things: there would need to be *four* Linux flatpaks: ix86, x86_64,
armv7l, and aarch64.

My only thought about "improvements" in the Linux distribution of JMRI would
be the creation of .deb and .rpm distrubutions of JMRI. I realize that JMRI
will never be in any Linux distro repo and I understand why that is, but a
self-made .deb and .rpm with a proper openjdk-XX-jre depenency could be
helpful. *I* could probably help with creating the necessary control files to
help with this, if anyone is interested.

At Fri, 4 Apr 2025 08:19:38 -0400 "Bob Jacobsen via groups.io" <rgj1927@...> wrote:


A user has been interested in possibly distributing JMRI as a “FlatPak” for Linux. I don’t know much about that method, but apparently the distribution file also includes the JRE, so it’s (at least in theory) easier to install.

As an experiment, you can find a 5.10 distribution in this form at



For more on this, see JMRI/JMRI Issue 11658:



Is anybody familiar enough with this distribution method to be able to try it?

Is this something that we should do on an ongoing basis?

Bob
â€
Bob Jacobsen
rgj1927@...










--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services


 

As long as it is an additional option for Linux users. I run RPi and it is super easy right now to rename the existing JMRI folder and extract the replacement. Yes, I do have to handle Java separately, but then how often is the Java requirements changed. I would hate to see the existing process changed and/or complicated by something called Flatpak.
--
-splasher in somd
-NCE PowerCab with Raspberry Pi 3b+ and JMRI
-DCC-EX with Arduino Megaw/motor shield, Raspberry Pi 3b+ and JMRI
-UsingEngine Driver with both
-Generally running the latest dev version of JMRI & Engine Driver


 

Bob:

Correction on the JDK... The flatpak installed 5.10 is running on JDK 17.0.11...

Mint running a java --version is reporting the 21.0.6 the Mint distro java version...

More Linux users need to check in...

Jim


 

Bob:

Just happen to be sitting in the lab and saw the email...

Using Linux Mint 22.0 which uses flatpak for installs during updates so it's right there to try.

Yes... Your URL downloaded and doing a flatpak install was good, just supplying password and Y when needed. There was a 5.8 on that machine and it seems to have been found when the 5.10 installed brought prefs forward.

I didn't check logs to see if the JDK was changed, quick check is version 21.0.6.

Obviously need to run more checks... this is a test machine and not in production...

Jim Albanowski


 

A user has been interested in possibly distributing JMRI as a “FlatPak� for Linux. I don’t know much about that method, but apparently the distribution file also includes the JRE, so it’s (at least in theory) easier to install.

As an experiment, you can find a 5.10 distribution in this form at



For more on this, see JMRI/JMRI Issue 11658:



Is anybody familiar enough with this distribution method to be able to try it?

Is this something that we should do on an ongoing basis?

Bob

Bob Jacobsen
rgj1927@...