1

How can I open a file in LibreOffice Writer from terminal and be back at terminal to continue with other tasks?

For instance, if I insert

libreoffice CV*.odt

it will open the file in LibreOffice but I will be unable to proceed with further commands in that instance of terminal.

Arronical
  • 19,893
risc0
  • 13

2 Answers2

3

Very simple:

libreoffice CV*.odt &

The & at the end tells the terminal to run it in the background.

2

The xdg-open utility which comes with a standard Ubuntu Desktop install will do this. It works not only for LibreOffice documents, but for any file or URL.

xdg-open opens the file with your preferred application, and returns immediately:

xdg-open CV*.odt

Tip: add alias o=xdg-open to ~/.bash_aliases to have a convenient shortcut:

o CV*.odt
o 'https://askubuntu.com/'
zwets
  • 12,354