Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Can't open ODF file from command line using relative path #12

Open
xuanngo2001 opened this issue Oct 19, 2018 · 4 comments
Open

Can't open ODF file from command line using relative path #12

xuanngo2001 opened this issue Oct 19, 2018 · 4 comments

Comments

@xuanngo2001
Copy link

When executed the following command:

LibreOffice-fresh.basic-x86_64.AppImage file.odt

it showed the following error:

/tmp/.mount_LibreOEGfULE/usr/file.odt does not exist.

However, opening file.odt from Libreoffice GUI is fine.

@probonopd
Copy link
Contributor

probonopd commented Oct 20, 2018

The AppRun which is currently being used does a chdir into usr/ of the AppImage before it executes the payload application. This means passing in relative paths does not work.

https://github.com/AppImage/AppImageKit/blob/d18552660f2823102b6da4b0b61821e9bf8feb02/src/AppRun.c#L155-L161

If you want relative paths to work, you currently need to use your own version of AppRun. A simple symlink to the script that launches LibreOffice may be sufficient (though I have not tested it).

For more information, please see https://docs.appimage.org/introduction/software-overview.html#apprun.

@antoniofaccioli
Copy link
Owner

I have tested it on Zorin OS 12 (derivative of Ubuntu 16.04), if you give it the absolute path of the file it works correctly.

For example: LibreOffice-fresh.basic-x86_64.AppImage /home/antonio/Scrivania/Esercitazioni.odt

@probonopd
Copy link
Contributor

Yes. If we want to make it support relative paths, we need to use a different AppRun.

@xuanngo2001
Copy link
Author

@antoniofaccioli
Yes, absolute path can be used to open the file but using Libreoffice to do conversion will create same problem.
e.g

LibreOffice-fresh.basic-x86_64.AppImage --headless --convert-to docx:"MS Word 2007 XML"  /home/absolute/path/file.odt 
convert /home/absolute/path/file.odt -> /tmp/.mount_libreoFayDko/usr/file.docx using filter : MS Word 2007 XML
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp/.mount_libreoFayDko/usr/file.docx> failed: 0x507(Error Area:Io Class:Access Code:7))

In order to resolve this, I have to explicitly specify the output directory using --outdir.

@xuanngo2001 xuanngo2001 changed the title Can't open ODF file from command line Can't open ODF file from command line using relative path Oct 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants