Sorry, no description
... the author of this command may not have provided any manuals
Once you know what this command is about, feel free to add a description in the input "add an example + trick and tips" below
help other Linux-fans !
[--outdir output_dir] file]...
file]... [-p file...]
[--outdir output_dir] file]...
[--pt printername file...]
[--show Impress file]...
add an example, a script, a trick and tips
Converting Open Office (odt) files to Latex
OpenOffice used to have a LaTeX export functionality, which was
later removed, I guess. Nevertheless, there is a LaTeX writer:
sudo apt-get install openoffice.org-writer2latex writer2latex
Or, if your distribution uses LibreOffice, use
libreoffice-writer2latex instead of the above.
Just confirm all messages with
y. After installing,
you can use it with
which will create a
.tex file with the same name.
The formatting is pretty basic, but I think it gets the job done.
If you wish to edit it in Lyx after that, just concatenate the
commands, something like that:
w2l your-document.odt && /usr/bin/env lyx your-document.tex &
I tested the conversion on Ubuntu 11.04 with the default
Effect of HOME on libreoffice to convert to pdf as non-root user
I have really no idea what you are trying to do here.
$HOME is your user's home directory, why would
you change that to run a program?
You are explicitly telling libreoffice to create a pdf in the
/tmp/ayb which does not seem to be
your current directory. You are then attempting to delete a
pdf from your current directory and, of course, it does not
exist because you have told it to place it in
What happens if you do not change
HOME or your user
or anything else and just run:
$ libreoffice --headless -convert-to pdf --outdir /tmp/ayb /tmp/ayb/document_34.doc
$ ls /tmp/ayb/d*.pdf
silent /usr/bin/libreoffice "$@"
Exporting vector graphics from Inskcape into Libreoffice
Exporting from Inkscape using the png image format which
Libreoffice fully supports, rather than saving in vectorial
format which it does not support, is actually the only option.
See in Inkscape Wiki : Save as vs export.
However, the thread How to import SVG in OOo Writer says :
The svg import will be new feature in OOo 3.4, try OOo 3.4 beta
from OOo download site.
This is about OpenOffice, of which Libreoffice is actually
You might consider changing because of this feature, until it
finds its way into Libreoffice.
Printing from the command line with LibreOffice, lpr commands?
You can't pass
lpr command line options to
libreoffice. Two possible solutions are:
One step solution (the best solution in my opinion): use
unoconv outputting a PDF to
stdout piped to
$ unoconv --stdout filename.doc | lpr -U username -P the_printer_name
Three step solution (if you don't want / can't use
--print-to-file to a temporary file +
of the file + delete the temporary file (unfortunatelly
libreoffice still doesn't support printing to
$ libreoffice --headless --print-to-file --printer-name the_printer_name --outdir /tmp filename.doc
$ lpr -U username /tmp/filename.ps -P the_printer_name
$ rm /tmp/filename.ps
Only root User is able to open LibreOffice
It looks like your username is not identified by linux to have
enough privilege to run commands. A few things you should check
Make sure you are in
sudo group with this command.
$ getent group sudo
It should show output as
If you are not in it add the username with
$ sudo gpasswd -a <user> sudo
/etc/sudoers by opening the file and
confirming it has the following lines.
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
How to prevent LibreOffice running 'recover' at each startup?
Adding the option '--norestore' when running libreoffice gets rid
of the recovery dialog.
This can be made to happen systematically by adding the following
to your .bashrc:
alias libreoffice="libreoffice --norestore"
System-wide auto-complete word list syncing/integration?
I assume you are referring to LibreOffice's auto-complete
The closest I found is the english typing booster, which is a new feature in Fedora 17.
You need to compile it yourself though, if you want to use it
with anything but F17.
Are there Linux utilities for previewing files (partic. .doc's) rather than full-blown editing?
This is something that
antiword was designed for.
You can convert MSW documents into plain text, PDF, PostScript,
and DocBook, depending on which reader you prefer to view files
sandboxing libreoffice on Linux
What I've done on my CentOS (Redhat/RPM based distro) box:
- Download the RPMs. Store to a temp dir.
- Create a directory where the programs will live.
- Extract the files to the directory. For an rpm
- for FILE in /tmp/dir/*.rpm ; do rpm2cpio $FILE | cpio -iv
- Find the "base" dir for the executable:
- find /path/to/install/dir -name soffice -type f | xargs
- set PATH to include above directory.
For Debian, I'd substitute step 3. with something like:
for FILE in /tmp/dir/*.rpm ; do dpkg-deb -X $FILE ; done
But I don't have a debian based distro to confirm that the
layouts are what I'd expect. I'd also look at
--fsys-tarfile archive $FILE | tar -xvf - if
dpkg-deb -X doesn't work.
Convert file to PDF using LibreOffice under user apache (i.e. when using PHP)
There are two problems here. The first is that
www-data (the apache user) does not have a
$HOME so libreoffice cannot run if there is no
$HOME defined. The second problem is, unless you
specifically set it up this way (and you really really really
apache does not have access to the
/tmp directory. A web server normally runs in
a restricted environment and does not have full access to the
file system for very valid security reasons.
So, you need to i) give apache's user a home and ii) give it a
directory it has access to to write in. So, create a
tmp directory in the same folder where you store
your webpage and then run the following
shell_exec('export HOME=/tmp && libreoffice --headless -convert-to pdf --outdir ./tmp /tmp/ayb/document_34.doc');
I just tested and it works perfectly on my machine. Make sure
./tmp has its permissions set to 777. Also, you
may need to restart apache if you play aroud with it too much. It
stopped working for me after a while when I made changes and I
needed to restart it.
Libreoffice readonly document with one specified name
I would check if there is a lock file for the file you are trying
to save. Enable showing hidden files in your file browser or do a
ls -la in a terminal window and look for a file like
".~lock.??? ????? 1.odt#". If one is present, make sure you close
all LibreOffice windows and delete it with your file browser or
These files can get left behind if LibreOffice isn't closed
How to make Libreoffice integrate better with KDE graphic environment
In order to better integrate Libreoffice's interface with KDE,
you must remove the
libreoffice-kde package; it is
supposed to provide the required integration, but apparently it
doesn't do its job very well.
Then you should install the
you should get the following result:
I've tried this with Kubuntu, I'm not sure if it works also with
other KDE distros but I suppose that is should.
for short) is a multi-platform office productivity suite. It
was derived from OpenOffice.org 3.3 Beta on September 28,
is a shell script that sets up the environment and passes
the command line arguments to the soffice.bin
the following helper scripts start the respective
sdraw, simpress, smath, sofficerc, spadmin, swriter
Specify a UNO connect-string to
create a UNO acceptor through which other programs can
connect to access the API.
Starts the wizard for a new Base document.
Starts with a new Calc document.
Batch converts files. If
--outdir is not specified then the
current working directory is used as the output directory
for the converted files.
.doc files to PDFs.
pdf:writer_pdf_Export --outdir /home/user
.doc files to PDFs using the settings in the Writer PDF
export dialog and saving them in /home/user.
This option specifies the X
server to use; see X(7)
Starts with a new Draw document.
Starts with a new Global
Starts in "headless
mode", which allows using the application without user
mode can be used when the application is controlled by
external clients via the API.
--invisible and strictly ignores any GUI
environment. --quickstart does not work with
Lists LibreOffice command line
Starts with a new Impress
Starts in invisible mode.
start-up logo nor the initial program window will be
visible. LO can be controlled and documents and dialogs can
be opened via the API.
with this parameter, it can only be quit using the
taskmanager (Windows) or the kill command (UNIX based
does not work with this parameter.
Force an input filter type if
possible. For example -infilter="Calc Office Open
Starts with a new Math document.
Keeps the splash screen
Creates the a new document from
the given templates.
Starts LO without creating a
new document. The next time you start LO, the welcome screen
together with --nologo by quick starters.
Note that --quickstart has no longer been
supported since OpenOffice.org 2.0.0.
Disables the check for remote
instances using the installation.
Disables the splash screen at
Disables restart and file
recovery after a system crash. It is possible that LO will
try to restore a file it keeps crashing on, if that happens
--norestore is the only way to start
Disables the splash screen at
Opens the given files for
editing, even templates.
-o a template file would create a new document derived
from that template.
Prints the given files to the
default printer and ends. The splash screen does not
If the file
name contains spaces, then it must be enclosed in quotation
Batch print files to file. If
--printer-name is not specified the
default printer is used. If --outdir is not
specified then the current working directory is used as the
output directory for the converted files.
Prints all .doc
files to the current working directory using the default
--outdir /home/user *.doc
Prints all .doc
files to /home/user directory using the
Prints the given files to the
printer printername and ends. The splash screen does
If a file name
contains spaces, then it must be enclosed in quotation
Starts LO with it’s quick
starter. --quickstart disable the quick
work with --invisible or
Opens the given Impress files,
starts the presentation and quits after they have
Closes an acceptor that was
created with --accept option.
--unaccept=all to close all open
Starts LO and terminates after
it registers some UNO services. Doesn’t show the
splash during startup.
Opens the given files read-only
creating a temporary copy of them at $TMPDIR.
Starts with a new HTML document.
Starts with a new Writer
See http://wiki.documentfoundation.org/BugReport for more
details on how to report bugs in LibreOffice.
page was created by Rene Engelhard <rene[:at:]debian[:dot:]org>
for the Debian GNU/Linux Distribution, because the original
package does not have one. It was updated for Novell by Petr
Mladek <petr.mladek[:at:]novell[:dot:]com> and adapted for
LibreOffice by Philipp Weissenbacher