libreoffice issue

Hello gents,

Libre office is broken, right after install (1:6.1.5-3):

$libreoffice 
Reading profile /etc/firejail/libreoffice.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 1606, child pid 1607
Blacklist violations are logged to syslog
Child process initialized in 78.51 ms
Final linking of kernel DynamicKernel failed.

Parent is shutting down, bye...

Hi! I think this is a little issue with our appamor. This problem is very easy to fix.
Firstly, the problem happens because there is a link file in /usr/local/bin that points to firejail.

┌─[dmknght@parrot]─[~]
└──╼ $which libreoffice
/usr/local/bin/libreoffice
┌─[dmknght@parrot]─[~]
└──╼ $ls -la /usr/local/bin/libreoffice
lrwxrwxrwx 1 root staff 17 Jun  1 23:31 /usr/local/bin/libreoffice -> /usr/bin/firejail

You can fix it by delete /usr/local/bin/libreoffice. The real path of libreoffice is /usr/bin/libreoffice

┌─[dmknght@parrot]─[~]
└──╼ $whereis libreoffice
libreoffice: /usr/bin/libreoffice /usr/lib/libreoffice /etc/libreoffice /usr/local/bin/libreoffice /usr/share/libreoffice /usr/share/man/man1/libreoffice.1.gz

P/s: this issue has been asked in community forum before

2 Likes

@dmknght thank you, /usr/bin/libreoffice works for me, after link removal.

I bet, this problem should be fixed in firejail configuration, provided with parrot…

I believe it is some issues inside our firejail package. Currently we have had more broken shortcuts. I reported to other devs. Hope we can fix this issue soon

wow that seems a lot easier than my solution.

How I fixed it:

first run:

sudo apt purge firejail firejail-profiles

then:

sudo rm -r /etc/firejail

  • this ensures any residual configuration left by firejail is removed. The apt purge command should have removed it, in theory. However close attention to terminal output will reveal that this fails because “directory not empty” errors.

then:

rm -r ~/.config/libreoffice

Reboot the system

log in, try to launch libreoffice, it should work now that firejail is removed as the prime offender causing this issue. If it doesn’t, you may want to uninstall libreoffice as well. This really shouldn’t be necessary, but if it is:

sudo apt purge libreoffice

then:

sudo apt install libreoffice

ONLY NECESSARY IF IT DOESN’T LOAD AFTER FIREJAIL IS REMOVED AND SYSTEM REBOOTED!

Otherwise, run:

sudo apt install firejail firejail-profiles

try to run libreoffice, it should load, but if launched in terminal you’ll see it complain about apparmor profiles not being enforced. This is because the system needs to be rebooted to properly and fully load firejail. Reboot the system now.

Log in and attempt to load libreoffice. If the result is the same as on my system, it should load. Again, I had the same DynamicKernel error that was listed above. However, unfortunately I came across this thread after I did all that stuff above.

In summary, what I think happens is that when firejail is updated, any links on the system are not updated along with the firejail configuration. Removing firejail seemed to remove the link as well (since firejail was no longer installed, it made the link invalid, and apt rightfully deleted the link as in the solution outline above). Basically, I took the long way to get to the same solution. Much credit to dmknght for narrowing down the solution to something far simpler than what I ended up doing.
Unfortunately, out of the plethora of threads here addressing libreoffice issues, this is the only one I found with the solution to my problem, and it wasn’t exactly the “top result” or easiest to find. It’s worth noting that trying to search forums for a specific thread that has one’s specific issue is typically a nightmare at best, but then again when is searching forums reasonably easy (that doesn’t end up in wading through dozens or hundreds of posts). Perhaps a stickied post for “how to address libreoffice loading issues” is needed?

edit: my orignal install was 4.5.1 security edition, amd64, updated to 4.7 via rolling release.

You are REMOVING FIREJAIL SANDBOX. It is removing protection, not fixing problem -_- dont do that next time you sir.

I can admit, that firejail is one of many things, why I personally prefer parrot over kali, where all work under root.

That’s why I removed it only briefly. Personally, I have used linux for years with no firejail or apparmor type protection, with no issues. However, I do see the advantages of it which is why I choose to keep it on the system. I did the removal/reinstallation of firejail as it was clearly the problem, being misconfigured. Since I’ve been chasing this problem down for literally months since I originally installed parrot, including various searches on this exact forum with no solution available (until fairly recently), I came to the fairly reasonable step of removing and reinstalling firejail and possibly libreoffice as the only reasonable possible solution left for this issue. The final step would have been to remove firejail completely and just live with the risk, as I have on every other linux distribution to date with no issues. This was the only step I could think of since “failed to link dynamic kernel” doesn’t exactly leave one to think “the link must be pointing to the wrong spot.” It’s one of the few cases in linux where the error message was absolutely unhelpful - it gave me windows flashbacks.

I understand extra protection and security is great to have and all, and I prefer my system to be as secure as reasonably possible. However, in order for security to be effective and practical, it has to allow for the system to operate as needed without creating an unnecessary and unreasonable amount of additional problems. I know this is the general issue in IT: functionality and convenience vs. security. In this case though, with libreoffice not working (an essential program for myself and many others), firejail was falling into the category of a security application preventing the system from operating as needed, and therefore ineffective and overall more problematic than a benefit.

I am glad that I was able to reinstall firejail and have everything work as needed (with the small exception of having to comment out ~/Music in my chrome/chromium/firefox/pluma/etc… profiles since firejail seems to choke over the hardlink I replaced the folder with to link directly to my music collection on my NTFS partition). To that end, is there a way to make that global, and permanent, so I don’t have to redo it every time firejail-profiles gets an update via apt? I know there has to be a way to do it if I dig around enough, I’m just not finding firejail’s configuration as straightforward as I would prefer, and am not really able to dedicate a lot of time to putting in research on a single program at the moment (and truthfully, really shouldn’t have to).

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.