Ask Your Question

log file / verbose option for headless convert-to [closed]

asked 2013-08-12 14:32:56 +0100

richelectron gravatar image

updated 2013-08-12 18:00:17 +0100

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?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-06 07:32:09.958579


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.

oweng gravatar imageoweng ( 2013-08-13 02:09:09 +0100 )edit

Hi oweng, yes, this is a RedHat environment

richelectron gravatar imagerichelectron ( 2013-08-13 08:42:34 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2013-08-15 18:28:26 +0100

richelectron gravatar image

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 :)

edit flag offensive delete link more

answered 2013-08-13 02:20:26 +0100

oweng gravatar image

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.

edit flag offensive delete link more



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?

richelectron gravatar imagerichelectron ( 2013-08-13 18:36:59 +0100 )edit

Question Tools

1 follower


Asked: 2013-08-12 14:32:56 +0100

Seen: 5,932 times

Last updated: Aug 13 '13