Lubuntu Manual Snap

Should we ship this as a snap in Lubuntu?

3 Likes

Seems sensible. Is this our first Snap? Wow, how far we have come.

3 Likes

:joy:

Our first snap? Yeah. The first snap on the Lubuntu ISO? Nope.

@arraybolt3 @kc2bez @guiverc etc WDYT?

1 Like

Maybe we should do a Flatpak out of spite or are those officially illegal?

Personally I’d prefer a PDF that is readable on more systems, including maybe a minimal install of Lubuntu.

eg. I performed a minimal install of noble (24.04.2) yesterday & okular exists in the Office category; thus a PDF could still be read by users there, where that install type cannot use a snap package without additional install.

Users also often have non-Ubuntu systems which also won’t have snapd infrastructure, and maybe they want to use the manual there should there system they’re learning on not have a second display?? Okay maybe I’m reaching here, but I do think PDF maybe more useful.

I’m happy though with a do-ocracy approach, in that the person(s) doing the work can decide according to their own desires and time required for each approach.

2 Likes

How about the best of both worlds: the Snap can include tooling to generate a variety of different formats so you can bring it with you in whatever format you want. There’s certainly a lot more a Snap can do than a mere PDF.

The idea that the offline manual is excluded from a minimal install to me is reasonable, thus being provided as a snap package isn’t an issue I feel.

If it’s installed as a snap package, and has the capacity to generate/write the file as PDF, that would be the best of both worlds to me too.

Actually, I guess I hadn’t thought about that particular problem. Looking at the anarchism package, it see it provides Markdown and HTML formats. Maybe that makes sense. There are tools to generate PDFs from those, you can assume everyone has a browser of some kind (w3m at least!) for the HTML, and Markdown is quite readable.

1 Like

Personally I also prefer the pdf version.

3 Likes

I was actually able to create a very simple local browser for the Lubuntu Manual using QtWebEngine, here’s a basic view:

The size of the compiled binary is 41 KB, and according to Massif data generated from Valgrind, even after doing a bit of clicking around, it peaks at 32.4 MB for memory usage. Very lightweight option. (Like Electron, QtWebEngine uses a Chromium backend. When’s the last time you’ve seen stats like that for an Electron app?)

In fact, it’s quite literally this simple:

        QWebEngineView* web_view = new QWebEngineView(this);
        web_view->setUrl(QUrl::fromLocalFile("/tmp/manual/build/html/index.html"));
        setCentralWidget(web_view);
        setWindowTitle("Lubuntu Manual");
        resize(800, 600);

Would it be a good thing to just ask the user whether they’d like to open the HTML version via this lightweight browser, or the PDF version via something like qpdfview? Have a “Remember this option” checkbox, too?

Also, we could ship the actual content via the snap, then the wrappers via the system, to balance up-to-date content with extremely efficient viewing.

Thoughts?

4 Likes

Do we have to ship a browser? Can we not ask the user which one they want to use, honor x-www-browser and fallback on your solution as needed? If the PDF is going to use an external viewer, there’s no reason not to on the HTML one. That said, it will also need an included fallback.

How are we generating the necessary files? With Sphinx? That must be included, too.

Will users have the option to select different versions, including Git master? That would be cool.

There should be an update mechanism using Git to check for and grab sources.



P.S. moved this development talk to a new topic with an appropriate tag. The original was more about how to deal with the current situation.

2 Likes

Or, hear me out: Electron.

runs

1 Like

I don’t think you fully understand the advantage here from a user perspective…

Let’s say they start Lubuntu for the first time. Many new users will start by double-clicking on the manual to get more information. Currently, when opening the manual, there is a wait of several seconds while a fully-featured Firefox window opens to load the manual from our server.

What I’m proposing is this…

  • When clicking on the Lubuntu Manual, a dialog box opens with two options: PDF and HTML:
    • Opening the PDF copy simply uses xdg-open etc. to open the local copy of the PDF.
    • The HTML version is viewed via this minimal QtWebEngine browser, opening in like 0.02 seconds and allowing them to browse at a fast speed.

The idea is, when building the snap, yes, Sphinx is used. Read the README and Makefile in the Lubuntu Manual repo; I tried it last night on my Plucky system, it works. That being said, we would only ship the HTML artifacts in the snap, so it would be a very lightweight snap with a somewhat extensive build process.

On minimal install systems without snapd, or when the lubuntu-manual snap isn’t found, the icon would simply disappear. And if it’s launched before the snap is fully installed and initialized, it shows a loading icon.

Thoughts?

4 Likes

Yeah, ok, I dig that. If someone really wants to use another browser with it for some reason, the artifacts are there.

What about my ideas for getting different versions (including ones that don’t relate to the system you’re on) and updating?

And what are we going to do for the minimal folks? Just stick with the thing on the desktop that we can never update? Maybe we should make a deb?

Exactly. Anyone have a strong opinion on making it intuitive for them to pick, or just leave it for them to find?

All of that would be handled via the snap. We would have snap branches reflecting each branch in Git (then probably give Lyn access to push to the snap store etc).

As with any other snap, they could definitely switch to a different branch, yeah. We just might want to keep the intuitive workflow in manual.lubuntu.me itself

Just keep a link opening a web browser, something like Falkon?

1 Like

Maybe if you open the manual, it tells you where to find it?

Well, sure, as long as the same basic functionality as the Snap is there (meaning, switching versions— it’s a little wonky right now online). And no, x-www-browser.

Still that doesn’t solve an issue: offline installs.

Some sort of universal navbar? Or links within the manual itself? Could be difficult to nail down unless we’re specific about what we want here.

Still that doesn’t solve an issue: offline installs.

On the one hand, yes, someone who does a complete offline Minimal install will then be left without access to the Manual.

Then again… what will the person actually be doing with the machine if it’s installed in such a state? Can we reasonably assume that access to the Lubuntu Manual is something they’d actually want?

I’ve already stated that a minimal install is fine to me without manual. It makes sense to me…

Most minimal install users will no doubt add their own browsers, thus can access the manual online if/when required, and if they don’t have a browser they can use another device easily enough.

To me the minimal install users aren’t the newbies who need the most hand-holding; as I’d imagine newer users would get the full install (no optional components though) anyway. My 2c.

1 Like

One way to think about this is looking everywhere else: does Ubuntu and/or any of the other flavors provide an offline manual? My guess is they do.

Actually, I highly doubt it.