Ask Your Question

How can I get libreoffice to open files over a windows/samba connection with a /run/usr/1000/gvfs path? [closed]

asked 2017-08-04 18:49:25 +0200

mdwy62 gravatar image

This is the only way I can open smb files with emacs org-mode links, as far as I can tell. smb: file paths do not seem to work.

This method (/run/usr/1000/gvfs) works with evince (pdf) files. This suggests that this is an issue with libreoffice rather than with emacs org-mode (aside from smb: file paths not working).

I am able to use org-mode links to local libreoffice files in org files just fine, eg:


My .emacs file has

    ((auto-mode . emacs)
     ("\\.odt\\'" . "/usr/bin/libreoffice %s")
     ("\\.pdf\\'" . "/usr/bin/evince %s")


From a terminal (outside of emacs), the following will work for LO:

/usr/bin/soffice smb://

However if I try the org-mode link:


emacs asks if I want to create a new header. So emacs org-mode does not play well with smb: file paths.

If I try an org-mode link to the /run/usr/1000/gvfs mount point:


I get a general I/O error: "General input/output error while accessing /run/user/1000/gvfs/smb-share:server=,share=server_name_1/Documents/foo.odt."

This is the same error I get from a terminal with LibreOffice if I try

/usr/bin/soffice /run/user/1000/gvfs/smb-share:server=,share=server_name_1/Documents/foo.odt

(or another symbolic link to this).

But this method opens pdf (evince) files from emacs org-mode links:


In a terminal, this path also works for evince, with quotes:

evince "/run/user/1000/gvfs/smb-share:server=,share=server_name_1/Documents/foo.pdf"

Adding quotes to the path for the odt file in a terminal does not help for LibreOffice. I get the same I/O error. That is in a terminal,

/usr/bin/soffice "/run/user/1000/gvfs/smb-share:server=,share=server_name_1/Documents/foo.odt"

also fails

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2021-02-08 13:43:30.226910


I have the same issue with vanilla Ubuntu 17.10 : LibO will not use the /run/user/etc. link, although it works when mounting as a Samba share, and no other piece of software that opens files (text editors, GIMP, etc.) have a problem with the gvfs version. (And now my "samba share" is borked, but that's another story.)

David gravatar imageDavid ( 2017-09-28 12:26:47 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2017-12-05 11:07:24 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I had same problem, tried some suggested fixes and workarounds, did not want to mount permanent share, decided to try LibreOfficeDev_6.0.0.0.beta1_Linux_x86-64 - which can be installed alongsideregular stable LibreOffice (5.1 in my case), and it WORKED :-) Linux flavour is Xubuntu LTS 16.04.03, kernel 4.10.0-40-generic. Download LibO beta here Hope that helps.

edit flag offensive delete link more

answered 2017-09-28 12:51:27 +0200

David gravatar image

updated 2017-09-28 12:52:32 +0200

You need to mount the samba share permanently, and use that location rather than the /run/usr/1000/gvfs version. That link (in preceding sentence) should give most information needed, but I had to supplement it with some information (about uid and gid) from AskUbuntu.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-08-04 18:49:25 +0200

Seen: 4,694 times

Last updated: Dec 05 '17