trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: February 2020

Re: [trinity-users] xdg-open and libreoffice

From: Michael <mb_trinity_desktop@...>
Date: Fri, 28 Feb 2020 14:21:21 -0600
On Friday 28 February 2020 01:54:26 pm Dr. Nikolaus Klepp wrote:
> Anno domini 2020 Fri, 28 Feb 13:49:24 -0600
>
>  David C. Rankin scripsit:
> > On 02/28/2020 12:41 PM, Dr. Nikolaus Klepp wrote:
> > > hi all!
> > >
> > > Looks like a little GNOME just hit me with a club: I'm working on a
> > > presentation with libreoffice impress (yes, I hnow, why ...). Now that
> > > thing has a function "Edit image using external tool". Selecting that,
> > > impress calls "xdg-open file://tmp/sdfsfewf.png" - which call in my
> > > case kuickshow - which is not surprising, as I use kuickshow for
> > > viewing images. But how do I persuade that piece of a genius to call
> > > gimp ???
> > >
> > > Nik
> >
> > Start Menu -> Settings -> Control Center -> TDE Components -> File
> > Assiciations -> image -> png
> >
> > in Application Preference Order - highlight GIMP and choose [Move Up]
> > until GIMP is at the top of the list.
> >
> > That should do it, if not, click the Embedding tab and set the radio
> > button to 'Show file in separate viewer'.
> >
> > If that doesn't do it, then I'm out of bullets.
>
> Well, yes, but that kills the setting for the rest of the system :(

Which is what it's suppose to do...  ;)

michael@local [~]# xdg-open --help
xdg-open - opens a file or URL in the user's preferred application

I don't think the current rev's of LO have the ability to allow you to choose 
what applications to use like FF does.  I believe OO use to, but I'm finding 
nothing in Options  (and if it did it'd most likely be under either  Tools > 
Options > LibreOffice or Tools > Options > LibreOffice Base)

I wouldn't, but you could write a wrapper for xdg-open that captures 
what/who's sending the request to do what you want.  Most likely be a huge 
pita, here's a way to get the parent pid:

$$ is defined to return the process ID of the parent in a subshell; from the 
man page under "Special Parameters":
https://stackoverflow.com/questions/21063765/why-is-returning-the-same-id-as-the-parent-process

Best,
Michael