Log file / verbose option for headless convert-to

Hi there

I am trying to make use of the --convert-to option to convert a doc file to a pdf from the command line on a red hat system.

eg. /usr/lib/libreoffice/program/soffice.bin --headless --convert-to pdf --outdir /test/path /test/path/test.doc

The above command runs and works when I run it as root, but not when I run it as a non-root user.

I noticed there is no -v / verbose / log file option for headless, I am trying to trouble shoot this on a system that does not have X so it would be handy to see some kind of output when the command fails - right now it just fails silently which is not helpful at all.

So there are 2 questions really…

  1. How can I log / see the output of --convert-to on the command line
  2. Can I get this command to execute under a non-root user?

The only error I can see is 19712 (returned in the script calling this command) - I’m not sure if that means anything to anyone?

Which GNU/Linux distribution are you running? Usually LO is installed under /opt/libreofficeN.N/? I have seen this alternate location occasionally and I presume it is a RedHat requirement or similar. Just curious.

Hi oweng, yes, this is a RedHat environment

We discovered that the non-root user in question was created with no home directory and the command runs successfully now that a home directory has been created :slight_smile:

1 Like

Apart from checking the obvious, such as path permissions, you can add the --backtrace parameter to obtain more detailed output to a gdbtrace.log file. Exactly how how helpful this will be I am uncertain as I am not really sure why it is not executing for a non-root user. Are you running SELinux policies? If you are, that could easily be a related issue.

Thanks for the helpful feedback oweng, I did manage to generate a gdb.log file - it did not include a whole lot of detail though apart from an exit code 0115 when it was run as the non-root user. Strangely enough though, I created a standard test user and the process works when run as this new (non-root) test user. What could be wrong with the non-root user the script is running it as?