flathub / org.frescobaldi.Frescobaldi

https://flathub.org/apps/details/org.frescobaldi.Frescobaldi
1 stars 3 forks source link

Installing 2.23 versions of LilyPond #10

Closed jeanas closed 1 year ago

jeanas commented 1 year ago

In the LilyPond 2.23 series, installers are no longer provided. Instead, we provide static binaries that can be unpacked and run right away.

The tutorial on installing LilyPond and Frescobaldi in the Learning Manual (https://lilypond.org/doc/v2.23/Documentation/learning/graphical-setup-under-gnu_002flinux) says you can unpack the LilyPond binary "anywhere, you just have not to move it afterwards", and the example does it in ~, but this does not work with Frescobaldi from Flatpak because access is restricted. It does work to put it in ~/Documents for example. (See the user-fr thread https://lists.gnu.org/archive/html/lilypond-user-fr/2022-09/msg00049.html with people encountering this problem.)

Any thoughts @fedelibre?

fedelibre commented 1 year ago

I would prefer following flatpak best practices and not giving full access to the home directory. I can add a short explanation in the README file. In a nutshell, the steps are:

  1. Grant the permission to the desired directory, anything in ~ (for example ~/.local/lilypond), using the Flatseal app or the command-line flatpak.
  2. Launch Frescobaldi and add the path to this binary in the LilyPond preferences.
jeanas commented 1 year ago

OK. Maybe make an MR on the LilyPond repo to amend the LM so it mentions this explicitly? That way it's harder to miss it.

jeanas commented 1 year ago

By the way, I note that I do have the ability with Flatpak Frescobaldi to open LilyPond files in my home directory. Does it have to do with the fact that I explicitly requested this as the user? Would it be possible to make this work for access to LilyPond binaries as well?

fedelibre commented 1 year ago

Would it be possible to make this work for access to LilyPond binaries as well?

Yes, but it would mean allowing access to the whole home directory, which is not what I would want to set by default (see 1st point above).

We may agree on a standard default directory for these binaries, which could be enabled by default in the flatpak app. For example ~/lilypond or ~/.lilypond or ~/.local/lilypond. That way users who unpack the binaries in this location would not have to tweak the permissions at all.

jeanas commented 1 year ago

Yes, but it would mean allowing access to the whole home directory, which is not what I would want to set by default (see 1st point above).

What are the disadvantages with Frescobaldi being granted access to the home directory (for files that the user explicitly asked the app to process)? Is it a matter of security, or ability to run it isolated from the world, or ... ?

Also, what about LilyPond from the distro, in /usr/bin/lilypond? (Also applies to the other part of your reply).

hfiguiere commented 1 year ago

Would it be possible to make this work for access to LilyPond binaries as well?

If you mean runing "host binaries" inside the flatpak sandbox, I have to say this is a bad idea. There is a reason why Flatpak provides its sdk+runtime.

fedelibre commented 1 year ago

@hfiguiere Many LilyPond users (and especially the developers like Jean) need to run custom versions of LilyPond.

The point here is that from Flatpak point of view this should be discouraged: it should not be the default, but I think I can add a quick explanation in the README for those who really need this.

jeanas commented 1 year ago

Exactly. It's not just for developers. Because LilyPond historically has an emphasis on stability with long release cycles, and the development releases tend to be rather stable, many people end up using them. And when a new stable version is released, even if you get it via an upgrade from Flatpak, you likely still want the old one around when starting to use the new version for the first time on a new file because you might want to compare the results to check any layout changes are fine. And when helping people on the mailing lists, you encounter a variety of versions and you want to test that the code your propose works in their version.

The ability to seamlessly manage multiple versions of LilyPond in parallel is actually one of Frescobaldi's most frequently praised features.