how to set the current working directory to the current working directory?

I have been using libreoffice writer to put documentation in projects instead of just plain text files. Hence, they are scattered all over the drive, with graphics from draw etc. libreoffice writer ignores the current working directory, and It’s driving me nuts having to navigate the entire drive just to get files in the current working directory!

Say I run libreoffice writer from a bash shell for a project

> man -k writer | grep -i libre
oowriter (1)         - LibreOffice office suite
> ls  
        <see all the files for this project>
> oowriter

libreoffice writer forces one to re-navigate to the current working directory to find the doc and related files.

Then say,

>  cd <other_project>
>  ls
       <see all the files for other project>
> oowriter

Again libreoffice writer then pops up, completely oblivious to the current working directory.

How can I run it so that its current working directory is the current working directory?

Hello,

AFAIK not at all, since current (Linux) directory from where you start LibreOffice got nothing to do with the directory LibreOffice will store files to by default. This default path is defined by a single path determined from your operating system, when starting LibreOffice for the very first time and added to the configuration of LibreOffice. You may get that path from Tools -> Options -> LibreOffice -> Paths -> Type: My Documents and you may change it there. This path is used for every new file to be store for the first time and if you don’t choose another one.

On the other hand, the path used to save when opening and working with an existing file is remembered on a per file basis; i.e. LibreOffice keeps the path in mind for every single file, which path it has been opened from (required also for storing the lock file).