Ask Your Question

sudo libreoffice --calc or -o filename.ods doesn't work [closed]

asked 2014-01-15 07:13:34 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

  • Problem in short :- I need to open, save as, and close .ods file from command line/ within a shell script.
  • Background Info :- I would create a formula.ods (say) supposed to contain formulas written so as to take raw data from (say) a temp.csv file, By copying diff files (say 1.csv, 2,csv, 3.csv etc) to the temp.csv file each time I hope to get the same set of calculations performed on diff bits of data. While opening the formula.ods would do the math on the temp.csv data. Then I can save as the file as a csv resembling the name of original file (say 1_result.csv, 2_result.csv, .... ). I would like to save the results as .ods if I could somehow avoid the formula. otherwise they will all be the same! I am using LibreOffice 4.1 on Linux Mint 12 Lisa (Kernel -generic i686)
  • Problem :- Needless to say I can not do this manually - Ideally, I need to open and close about 1500 files in a matter of 1 to 1.5 hours (practically, I will be happy if I can get 250- 500). But I am stuck at the first step itself. sudo libreoffice --calc or sudo libreoffice -o formula.ods gives the error "The application can not be started. A General error occurred while accessing your central configuration."
  • Tryouts so far :- On some other forums I saw sugestions to delete .libreoffice so I renamed it to .libreoffice_old but no use. The command created a new .libreoffice folder except that this one has execute permissions and the .libreoffice_old has rwx only for root.

Thanks for any/all pointers.

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 2016-02-18 14:08:22.736189


The use of sudo is not recommended. LO is designed to be run with user permissions.

oweng gravatar imageoweng ( 2014-01-16 09:23:29 +0200 )edit

I didn't know that about LO. I was following another link. As answered below use of sudo is not required. This is to confirm what oweng has written, Regards,

vo81 gravatar imagevo81 ( 2014-01-17 15:25:03 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-01-15 09:48:09 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

  • Answered partly:-
    The command should be $libreoffice4.1 --calc filename.ods and the file opens. sudo is not required in my case.

  • Unanswered portion:- How to "save as" the opened up file from command prompt / shell script? Will get back if I can find something.

Thanks, Regards,

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-01-15 07:13:34 +0200

Seen: 535 times

Last updated: Jan 15 '14