Conteúdo

# Starting LibreOffice Software With Parameters

Ao iniciar o LibreOffice a partir da linha de comandos, pode atribuir vários parâmetros, com os quais pode influenciar o desempenho. A utilização de parâmetros da linha de comandos só deve ser utilizada por utilizadores experientes.

Para uma utilização normal, a utilização de parâmetros de linha de comandos não é necessária. Determinados parâmetros requerem um conhecimento mais avançado da tecnologia do LibreOffice .

## Iniciar o LibreOffice a partir da linha de comandos

1. Search for Run in the Windows Start menu.

2. Type the following text in the Open text field and click OK.

3. "{install}\program\soffice.com" {parameter}

   Replace {install} with the path to your installation of LibreOffice software (for example, C:\Program Files\LibreOffice). Use soffice.exe instead of soffice.com, when you do not need console (e.g., you do not use command-line interface for headless operations).

1. Open a shell under Linux, *BSD, or macOS platforms.

2. Type the following line of text, then press Return:

   {install}/program/soffice {parameter}

   Replace {install} with the path to your installation of LibreOffice software (for example, /opt/LibreOffice in UNIX)

LibreOffice requires write access to its user profile directory.

## Parâmetros válidos para a linha de comandos

### Iniciar sem parâmetros especiais

Iniciar sem parâmetros abre o centro de partida.

{ficheiro} | Tentar abrir o ficheiro ou ficheiros com os componentes mais adequados.
{file} macro://./[Library.Module.MacroName] | Abre o ficheiro a aplica as macros especificadas do ficheiro.

### Obter ajuda e informação

Parâmetro | Significado
--- | ---
--help / -h / -? | Lista os parâmetros disponíveis para a linha de comandos.
--helpwriter | Abre a ajuda local ou online do LibreOffice Writer.
--helpcalc | Abre a ajuda local ou online do LibreOffice Calc.
--helpdraw | Abre a ajuda local ou online do LibreOffice Draw.
--helpimpress | Abre a ajuda local ou online do LibreOffice Impress.
--helpbase | Abre a ajuda local ou online do LibreOffice Base.
--helpbasic | Abre a ajuda local ou online do LibreOffice para a linguagem Basic.
--helpmath | Abre a ajuda local ou online do LibreOffice Math.
--version | Mostra a versão do LibreOffice e fecha.
--nstemporarydirectory | (macOS sandbox only) Returns path of the temporary directory for the current user and exits. Overrides all other arguments.

### Argumentos genéricos

Parâmetro | Significado
--- | ---
--quickstart[=no] | Activates[Deactivates] the Quickstarter service. It can take only one parameter no which deactivates the Quickstarter service. Without parameters this service is activated.
--nolockcheck | Desativa a verificação de instâncias remotas durante a instalação.
--infilter=InputFilterName [:InputFilterParam[,param]] | Forces an input filter type, if possible. For example: --infilter="Calc Office Open XML" --infilter="Text (encoded):UTF8,LF,Liberation Mono,en-US". See the list of document filters for file conversion. The list of filter options for Lotus, dBase and Diff files. The list of filter options for CSV files. The list of filter options for PDF files.
--pidfile={file} | Store soffice.bin pid to {file}.
--display {display} | Sets the DISPLAY environment variable on UNIX-like platforms to the value {display}. This parameter is only supported by the start script for LibreOffice software on UNIX-like platforms.

### User/programmatic interface control

Parâmetro | Significado
--- | ---
--nologo | Desativa o ecrã de arranque ao iniciar o programa.
--minimized | Inicia no modo minimizado. O ecrã de arranque não é exibido.
--nodefault | Inicia sem qualquer exibição, para além do ecrã de arranque.
--invisible | Inicia no modo invisível. Neither the start-up logo nor the initial program window will be visible. LibreOffice software can be controlled, and documents and dialogs can be controlled and opened via the API. Using the parameter, LibreOffice can only be ended using the taskmanager (Windows) or the kill command (UNIX-like systems). It cannot be used in conjunction with --quickstart. More information is found in LibreOffice Developer's Guide.
--headless | Starts in "headless mode" which allows using the application without user interface. This special mode can be used when the application is controlled by external clients via the API.
--norestore | Desativa a função reiniciar e a recuperação de ficheiros depois de uma avaria do sistema.
--safe-mode | Starts in a safe mode, i.e. starts temporarily with a fresh user profile and helps to restore a broken configuration.
--accept={UNO} | Notifica o LibreOffice que, ao serem criadas as "UNO Acceptor Threads", será utilizada uma "UNO Accept String". UNO-URL is string the such kind uno:connection-type,params;protocol-name,params;ObjectName. Poderá obter mais informações no Guia de programadores do LibreOffice.
--unaccept={UNO-URL} | Fecha um aceitante criado com --accept={UNO string}. Utilize --unaccept=all para fechar todos os aceitantes abertos.
--language={lang} | Uses specified language, if language is not selected yet for UI. The lang is a tag of the language in IETF language tag.

### Argumentos para desenvolvimento

Parâmetro | Significado
--- | ---
--terminate_after_init | Exit after initialization complete (no documents loaded).

Unix and Linux user can invoke LibreOffice with these additional parameters for debugging purposes.

Parameter | Meaning
--- | ---
--record | An enhanced debugger.
--backtrace | Prints the backtrace of the entire stack.
--strace | strace is a diagnostic, debugging and instructional userspace utility for Linux.
--valgrind | Automatically detect many memory management and threading bugs, and profile the program in detail.

The debug options --record, --backtrace, --strace and --valgrind cannot be used together. Please use them one by one.

### Argumentos para criação de documentos

The arguments create an empty document of specified kind. Only one of them may be used in one command line. If filenames are specified after an argument, then it tries to open those files in the specified component.

Parâmetro | Significado
--- | ---
--writer | Inicia um documento do Writer em branco.
--calc | Inicia um documento do Calc em branco.
--draw | Inicia um documento do Draw em branco.
--impress | Inicia com um documento Impress em branco.
--math | Inicia um documento do Math em branco.
--global | Inicia com um modelo global de documentos do Writer em branco.
--web | Starts with an empty HTML document.

### File open arguments

The arguments define how following filenames are treated. New treatment begins after the argument and ends at the next argument. The default treatment is to open documents for editing, and create new documents from document templates.

Parâmetro | Significado
--- | ---
-n | Treats following files as templates for creation of new documents.
-o | Opens following files for editing, regardless whether they are templates or not.
--pt {Printername} | Prints the following files to the printer {Printername} and ends. The splash screen does not appear. Se o nome do ficheiro incluir espaços, será necessário colocar esse nome entre aspas. If used multiple times, only last {Printername} is effective for all documents of all --pt runs. Also, --printer-name argument of --print-to-file switch interferes with {Printername}.
-p | Prints following files to the default printer, after which those files are closed. The splash screen does not appear. If the file name contains spaces, then it must be enclosed in quotation marks.
--view | Opens following files in viewer mode (read-only).
--show[=N] | Opens and starts the slideshow of the following presentation documents immediately. Files are closed after the showing. N in the example refers to the slide number and, when it is provided, they start at that slide.
--convert-to OutputFileExtension [:OutputFilterName [:OutputFilterParams[,param]]] [--outdir output_dir] | If --convert-to is used more than once, last value of OutputFileExtension[:OutputFilterName[:OutputFilterParams]] is effective. If --outdir is used more than once, only its last value is effective. In absence of --outdir, current working directory is used for the result. For example: --convert-to pdf *.doc --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc --convert-to "html:XHTML Writer File:UTF8" *.doc --convert-to "txt:Text (encoded):UTF8" *.doc See the list of document filters for file conversion. The list of filter options for Lotus, dBase and Diff files. The list of filter options for CSV files. The list of filter options for PDF files.
--print-to-file [--printer-name printer_name] [--outdir output_dir] | Batch print files to file. If --outdir is not specified, then current working directory is used as output_dir. If --printer-name or --outdir used multiple times, only last value of each is effective. Also, {Printername} of --pt switch interferes with --printer-name. For example: --print-to-file *.doc --print-to-file --printer-name nasty_lowres_printer --outdir /home/user *.doc
--cat | Applies filter "txt:Text" to the following text documents and dump text content to console (implies --headless). Cannot be used with --convert-to.
-env:VAR[=VALUE] | Set a bootstrap variable. For example, to set a non-default user profile path: soffice.com -env:UserInstallation=file:///c:/my-test-profile open LibreOffice.app -env:UserInstallation=file:///tmp/test soffice -env:UserInstallation=file:///tmp/test

### Ignored switches

Parâmetro | Significado
--- | ---
-psn | Ignored (macOS only)
-Embedding | Ignored (COM+ related; Windows only)
--nofirststartwizard | Does nothing, accepted only for backward compatibility.
--protector {arg1} {arg2} | Used only in unit tests and should have two arguments.