On 19 Jul 2022 at 8:12, Stephan Bergmann wrote: Date sent: Tue, 19 Jul 2022 08:12:06 +0200 Subject: Re: [libreoffice-users] Tried send email with strace To: LibreOffice <users@global.libreoffice.org> Copies to: msetze...@gmail.com From: Stephan Bergmann <sberg...@redhat.com>
> On 7/19/22 00:07, Michael D. Setzer II wrote: > > Found some code at end of strace > > > > (soffice:166273): GLib-GObject-WARNING **: 07:19:47.960: invalid cast from > > 'GtkBox' to 'GtkMenuShell' > > > > (soffice:166273): GLib-GObject-WARNING **: 07:19:47.960: invalid cast from > > 'GtkBox' to 'GtkMenuShell' > > > > (soffice:166273): GLib-GObject-WARNING **: 07:20:00.439: invalid cast from > > 'GtkBox' to 'GtkMenuShell' > > > > (soffice:166273): GLib-GObject-WARNING **: 07:20:00.439: invalid cast from > > 'GtkBox' to 'GtkMenuShell' > > /usr/bin/xdg-email: line 978: xdg-email-hook.sh: command not found > > ) = 0 > > > > Note sure why it is call xdg-email instead of passing directly to internet > > email > > setting?? > > xdg-email gives a popup that says unable to detect mailto: URL?? > > See my response at > <https://listarchives.libreoffice.org/global/users/2022/msg00383.html> > "Re: [libreoffice-users] Question on send to email option in linux.." > > (And better not start new email threads when you could have continued > the existing one.) > Thanks for the information. Thought it was a significant difference in what I had found since I was under the assumtion that setting the option internet email would have it directly call that program rather than have it go thru some other process. Saw the xdg-email at very end of the strace showing the issue. In later email saw that it was passing /usr/bin/xdg-email mailto:?subject=testemail&attach=file:///tmp/lu1757371x dt6i.tmp/lu1757371xdt6m.tmp/testemail.odt So it was creating subject using the basename of the file and creating a copy of the file under tmp. Modified my WSENDTO script to #!/bin/bash /home/msetzerii/.wine/drive_c/PMAIL/Programs/WSENDT O.EXE $(echo "$1" |sed 's_^.*file://__g') and then replaced the xdg-email with link to WSENDTO and it was able to call the email client and load program as attachment. Noticed there is no senddoc.sh on my system in either the Fedora libreoffice or the 7.3.4.2 directories, but just senddoc. It does appear to be very similar to the contents of the xdg-email script. My Macro to do mailto Sub Mailto Dim oDoc As Object Dim Path$ oDoc = ThisComponent Path$ = oDoc.getURL() If oDoc.HasLocation() Then shell("/home/msetzerii/.wine/drive_c/PMAIL/Programs/W SENDTO.EXE " &mid(Path$,8,100) ) Else Print "The document has not yet been stored" End If End Sub Seems to work fine, and bypasses the senddoc and sends just the direct filename rather than creating a copy in the /tmp directory. The mid removes the FILE:// from the oDoc.getURL() value returned. Had found an old macro someone had written long ago for Libreoffice 2 that no longer worked, and hadn't been updated for many years, and was just trying to find a solution that would work. Not something I do a lot, but interesting. Thanks again for info. +------------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor (Retired) mailto:mi...@guam.net mailto:msetze...@gmail.com Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +------------------------------------------------------------+ -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy