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,653
  • 18
  • 73
  • 128
risc0
  • 13
  • 1
  • 4
  • see this one for more tips too [Regain control after opening firefox via terminal](//askubuntu.com/q/802428) – Zanna Oct 26 '16 at 11:58

2 Answers2

3

Very simple:

libreoffice CV*.odt &

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

You'reAGitForNotUsingGit
  • 14,669
  • 9
  • 48
  • 83
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
  • 11,795
  • 2
  • 32
  • 44