20

I am trying to convert docx to pdf using unoconv, but getting Error: Unable to connect or start own listener. Aborting. when I run unoconv -f pdf 1234.docx.

So, there must be some listener. I then started the listener via unoconv --listener.
I tried ps aux | grep soffice, and found soffice.bin.

So I tried unoconv -f pdf 1234.docx again. It still gave me the same error: Error: Unable to connect or start own listener. Aborting.

What am I doing wrong here?

Jason Sundram
  • 12,225
  • 19
  • 71
  • 86
Krishna Prasad Varma
  • 4,670
  • 5
  • 29
  • 41

5 Answers5

10

You have to kill all the soffice.bin processes before trying to use unoconv. I didn't have to do any "unoconv --listener" command.

Marcos García
  • 622
  • 1
  • 6
  • 16
2

You need to kill all soffice.bin processes before executing unoconv

Ru Chern Chong
  • 3,692
  • 13
  • 33
  • 43
0

It fails with the error in the question if it does not find the LibreOffice personal configuration file, but it also creates them before exiting. The second run succeeds.

You can reproduce the error but removing the personal configuration files, then trying to run unoconv:

$ rm -rf .config/libreoffice/
$ unoconv foo
Error: Unable to connect or start own listener. Aborting.

https://github.com/dagwieers/unoconv/issues/241

rbalint
  • 1
  • 1
0

Failing to start instance hints at the inability of the script to find the LibreOffice program.

Do this basic test:

  1. Copy the unoconverter to "libreoffice/program" folder.

  2. IMPORTANT: Go there and try to execute ./soffice to verify that the soffice runs itself.

  3. Now run unoconv with the version of python that shipped with the LibreOffice by typing ./python unocov -f pdf 1234.docx

You should see the converted file in the same directory now. Kill the soffice process and retry if it generates the same error.

Charlie
  • 22,886
  • 11
  • 59
  • 90
-8

unoconv does not support .docx / .pptx etc.

You need to use the old document extension, which is .doc, .ppt.

A simple rename would probably solve the problem.

shrty
  • 404
  • 3
  • 6
  • Misinformation here: although it's not perfect, it does support Office Open XML (.docx, .pptx and .xlsx): http://github.com/dagwieers/unoconv/blob/master/unoconv – Paulo Freitas May 14 '14 at 14:34
  • Yes, it does support it - but like I said, it _probably_ would work by renaming the files to a regular .doc/.ppt – shrty Feb 26 '15 at 07:21