Score:1

Permissions makes libreoffice go in a crash-loop when opening from terminal

pr flag

I am having some permission issues with libreoffice that I just don't have the technical provess to understand.

ISSUE

when I run localc directly from terminal, it goes into a loop: the program crashes immediatly while opening a file, then tries again, asking me if I want to restore the file it just crashed trying to open. It keeps on doing this.

loffice /some/file.csv

When I open the file with sudo, files opens fine sudo loffice /some/file.csv

interestingly enough it also opens fine if I open it from a filebrowser like pcmanfm. I also have a "rofi -dmenu" that I use to open a list of scripts and some of these open csv-files - this also works fine.

BACKGROUND

I'm not sure when this issue started to happen - it's been a busy few weeks - but I think it might having to do with me changning default programs for opening different filetypes. This is how I did it:

First I copied the mimeapps.list to my Dropbox, and then symlinked that to the position in the config folder like this:

ln -s ~/Dropbox/dotfiles/mimeapps.list /home/my_user/.config/mimeapps.list  

After changing some defaults (for some reason the e-reader Calibre was default for opening stuff so I changed that so that my editor of choice ) I did:

sudo -A update-desktop-database

I don't know if this messed up something, but it seems likely.

I've been using the last couple of hours trying to understand what's going on, listing different files related to mimetypes on the system in order to see if there is a problem with permissions, but I can't figure it out. Help would be appreciated.

I'm using Lubuntu 20.04 with i3wm.

PS

this is the output from term when opening it

(soffice:25195): Gtk-WARNING **: 13:53:58.639: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/gnome/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/gnome/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Application Error
Johan Palych avatar
us flag
Have you added polkit-1-auth-agent for i3wm? lxqt-policykit is already installed in Lubuntu 20.04. Example for policykit-1-gnome https://askubuntu.com/questions/799125/authentication-agent-and-i3wm Launch in the terminal for Calc (localc); Draw (lodraw); Base (lobase); Impress (loimpress); Writer (lowriter)
Johan Palych avatar
us flag
Launching System Apps using Rofi https://kifarunix.com/install-and-setup-i3-windows-manager-on-ubuntu-20-04/#:~:text=Launching%20System%20Apps%20using%20Rofi
emilBeBri avatar
pr flag
@JohanPalych thank you for the suggestion, I added the /usr/bin/lxqt-policykit-agent to startup but when I try to run /usr/bin/lxqt-policykit-agent localc it says "An authentication agent already exists for the given subject" so I guess that's not the problem? what do you think?
Score:0
pr flag

The workaround I've found is to launch localc through i3, so that it is i3 that starts the program. this is similar to using sudo I guess, in that it gets around the permission issue. But I don't like it as a 'solution', since it avoids the problem rather than solve it.

i3-msg 'exec --no-startup-id localc ~/some-file.csv'
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.