--convert-to always fails silently on Ubuntu

Hi everyone,

I just downloaded libreoffice 4 and installed it on a Mac (Lion) and Linux
(Ubuntu). On the Mac, everything works exactly as I expected, and I can
easily convert documents to pdfs using the command line tool like this:

/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to
pdf sample.ppt

However, on Unbuntu, when I execute the equivalent command, it always fails
quickly and silently with exit code 77 (Permission denied).

/opt/libreoffice4.0/program/soffice --headless --convert-to pdf sample.ppt

This failure happens regardless of whether I am a regular user or superuser.
I am not running libreoffice via a user interface, and this command is being
executed on an Amazon EC2 headless machine.

Can someone offer any advice, either a method to get more error information
(such as a log file or a verbose flag) so I can figure out what's going on?
I'm sure it's a simple issue, but right now the lack of error reporting is
making it hard to get the issue resolved.

Thanks in advance!

Cheers,
Graham

Graham,

Try the command prefixed with sudo.

How would that make a difference? Isn't that what he means when he
said it wouldn't work as SU? - either that or he ran "sudo su" before
running the command, so I doubt that that is th problem.

I tried running the command as su and the same thing happened.

Keieran

I missed that last night - good catch

Hi :slight_smile:
I think you should NOT be using trying to run as SuperUser by su or sudo or anything.  It should work without that but i agree it was a good idea to give it a go to see what happens.

Can you try adding the tag

-v

or

--verbose

to see if it gives you more output to explain what is going wrong?  Perhaps something like

/opt/libreoffice4.0/program/soffice --headless -v --convert-to pdf sample.ppt

I'm not sure if position matters but i think it doesn't.  If it does then i've probably put it in the wrong place.  You can find out more about the tags that can be used in Gnu&Linux by just using the tag

-h

or

--help

Btw the double - and full word seems to be the newer way but not everyone has caught up yet so sometimes programs still need the shorter tag or are happy with either.  Its getting less messy like that now but it takes time for an evolution like that to ripple outwards.  Machines in remote places might be worth holding back from radical upgrades just in case something does go wrong.  No-one wants to go for a long hike in space just to plug a keyboard in and sit doing coding work. 
Regards from
Tom :slight_smile:

Hi Tom,

Neither of -v or --verbose is recognized as a command line option. I'm
using libreoffice 4.0.1.2, and here are the command line options that it
supports.

I wish I could find a way to get more information about why it's failing!

Cheers,
Graham

Hi :slight_smile:
It might have made a difference if he didn't have read/write access to the folder or something dumb like that.  Also it's something quick to try and beats just tearing your hair out. 
Regards from
Tom :slight_smile:

Hi :slight_smile:
It might have made a difference if he didn't have read/write access to the folder or something dumb like that. Also it's something quick to try and beats just tearing your hair out.
Regards from
Tom :slight_smile:

sudo chown blah to change ownership of the folder - I have to look the exact switches, etc. I have seen this issue crop up occasionally were a folder tree does not have the permissions set to allow something like this.

The folder is owned by the same user that is executing the command, so I
don't think that's an issue. It would be ideal if there was a way to find
out what the actual permissions error is. Is there a log file or a verbose
option to get this information? Trying lots of things without knowing the
details of the issue is quite inefficient.

Hi :slight_smile:
There is not much point in fixing a problem when you don't know what the problem is or where it is if there is one.  That's a bit like "pin the tail on the donkey" but without anyone looking to see how close you got.  What if, as it turned out, that the file/folder permissions were not the issue?  You can chown all you want but now you don't know whether the problem has been solved or not.

One trouble-shooting technique is to try su or sudo and if it had no effect then you can rule out a whole bunch of stuff.  As has happened in this case.

As Graham says, what would be really nice is to find a log-file or generate one.  Almost all commands have a "verbose" tag that does the job.  How can we get more info about what is going wrong?

Regards from
Tom :slight_smile: