PackageKit / Help integration Background: currently many Linux distributions package help separately, since it is incredibly bulky. will not fit on a live-CD etc. It would be great to detect and trap those entry points (eg. sfx2/source/appl/appserv.cxx /SID_HELPINDEX/ -> vcl/inc/vcl/help.hxx) and allow PackageKit to be used to install the apropriate (localised) help if it is not present. Similarly it would be good to present a web fallback if not running on Linux. We should most likely integrate with PackageKit directly via its dbus interface to avoid desktop dependencies. Skills: building, simple C++
Deleted "Easyhack" from summary.
The Dbus/Sessioninstaller-bridge code as already here now: http://opengrok.libreoffice.org/xref/core/shell/source/sessioninstall/SyncDbusSessionHelper.hxx all it need now, is to plug that in at the right locations.
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Still an EasyHack, note there is the lcl_tryLoadBibliography() function showing how to use the PackageKit helper: http://opengrok.libreoffice.org/s?refs=lcl_tryLoadBibliography&project=core
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp) [NinjaEdit]
oops, the skillLinux keyword isn't real, remove it again
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
I like to do this hack. Can anyone give me more hints about this
(In reply to Asela from comment #8) > I like to do this hack. Can anyone give me more hints about this Welcome, you are aware that this is one of the more difficult easy hacks ? Have a look at https://wiki.documentfoundation.org/Development/GetInvolved to get you started. You have a code pointer in comment #2, and that is all you should need. happy hacking jan i.
(In reply to jan iversen from comment #9) > (In reply to Asela from comment #8) > > I like to do this hack. Can anyone give me more hints about this > > Welcome, you are aware that this is one of the more difficult easy hacks ? > > > Have a look at > https://wiki.documentfoundation.org/Development/GetInvolved > > to get you started. > > > You have a code pointer in comment #2, and that is all you should need. > > happy hacking > jan i. Thanks I will try
I was taking a look at this and made what looked like a maybe-correct change, but I'm having trouble testing, so let me ask a strange question followed by some observations that may explain... Do we have a docker or a known current version of a distro I can build a VM from where this would be expected to work? In particular one where the Bibliography Database menu option can successfully install libreoffice-base and also having libreoffice-help installed would allow me to see the help files through the menu. The two environments I tried to test in are 1) My new laptop. It's so new I haven't bothered to distrohop or change much yet. It's still on the manufacturer's default: PopOS 20.10. I did change the default browser, which will come up. 2) The family desktop. It's on Ubuntu 20.04.2 LTS with pretty much stock everything. On the laptop the org.freedesktop.PackageKit.Modify2 interface is not available. Modify is. PopOS apparently uses a lot of package manager manager code from Enlightenment (rebranded, of course). So of course Also, installing libreoffice-help-en-us (that is my locale, BTW) causes it to attempt open those HTML files in my default browser, which is ungoogled-chromium from a flatpak that doesn't have permission to see those files. I know I could fix that, but I have to imagine this could confuse someone. On the desktop (where both Modify and Modify2 exist) if I try the Bibliography Database it asks me only asks me to restart LO (no prompting for authentication or anything). Looking at dbus-monitor indicates to me it did make a DBus call, but nothing ever was visible. journalctl shows me that Ubuntu Software wasn't allowed to communicate with me? apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gtk/Notifications" interface="org.gtk.Notifications" member="AddNotification" mask="send" name="org.gtk.Notifications" pid=3023 label="snap.snap-store.ubuntu-software" peer_pid=2653 peer_label="unconfined" Note that pkcon works on both these machines, so the dbus approach should in theory be doable. A couple limitations to this approach occurred to me, though. For one thing installing software requires auth from a user who can do such things (i.e. a sudoer). If I were to try to use LibreOffice at my current employer, for example, I (and most employees) do not have such privileges on any machines. This would just be rubbing it in 😉. But also... at least with the minimalist change I was making, there's no querying the package to see where it installed the help files - I was going to just assume the approot would be the same. Which it should be if the same person (or two reasonable people) made both packages. But what if LO isn't running from a package. If I wanted to run LO at work I'd be either building from source or downloading someone's archive file of some sort and running it from some arbitrary user directory. My current build directory for LO certainly can't find the files installed by libreoffice-help. Perhaps that latter point should be a part of the requirement for fixing this ticket? That sfxhelp.cxx file does also contain logic of where to look for the files. The PK APIs (both gobject and also dbus) certainly do contain calls to check if the package is installed and to list the files installed by a given package. You already have a a call for IsInstalled and GetFiles() is documented here: https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html But maybe another approach could be better? I know y'all know LO much better than I, and I don't know the reasoning for the status quo, so feel free to slap this down. Maybe LO could have a built-in html viewer to avoid weird issues that could come up with the default browser, and if it can't find the HTML files yes start grabbing online help for the right version but your "Help Browser" could have a button to "Download for Offline Viewing"? But then that's not an easy hack anymore, but rather a significant restructuring of how Help works. Just a thought.
Olivier: check the previous comment, we have a dev interested in Help
(In reply to Buovjaga from comment #12) > Olivier: check the previous comment, we have a dev interested in Help Sorry I misunderstood the situation. Since it was unassigned
(In reply to John from comment #13) > (In reply to Buovjaga from comment #12) > > Olivier: check the previous comment, we have a dev interested in Help > > Sorry I misunderstood the situation. Since it was unassigned and it has been a while since an update. Asela - I added to the CC list for this bug so you can jump in. Are you working on this? Are there any roadblocks or ways I could help out?
(In reply to Buovjaga from comment #12) > Olivier: check the previous comment, we have a dev interested in Help Wishing Bugzilla would allow me to delete my own comments. Sorry for all the noi
Re-evaluating the EasyHack in 2024 This enhancement is still relevant, as this feature it is not implemented yet. Some other parts of LibreOffice like language packs are already integrated with PackageKit, but not the help. The expected behavior is that if you choose help and it's not there, it should provide option to install it. In that case, if you choose "Help > LibreOffice Help", or press F1, you will see the dialog box titled: "LibreOffice Help Not Installed". There, you are only offered to "Read Help Online". To see some of the current integrations of Packagekit with LibreOffice, grep for it in git log: $ git log -i --grep="Packagekit" Developer should have in mind that not every LO installation on Linux is from the distro packages. There are other means like RPM/DEB packages from libreoffice.org, and also Snap, Flatpak, AppImage, etc.