C.4 Shell Mode

In order to save the load time (even without a GUI, Inkscape still takes some time to start), you can perform multiple command-line tasks using one instance of the program running in the shell mode. For example, this can be used on a server where PNG export requests come from the users and are routed to a shell-mode Inkscape instance for a quick response.

To enter the shell mode, run Inkscape with a single parameter, --shell. You will get a prompt where you can type your commands. There’s no special syntax for the shell mode commands; each command is simply a valid command-line invocation of Inkscape, but without the Inkscape program name. For example, if you do:

$ inkscape --export-pdf=file.pdf file.svg

then in the shell mode, you can type --export-pdf=file.pdf file.svg as the shell command. Here is an example shell mode session where one document is exported to PDF and another to PNG:

$ inkscape --shell
Inkscape 0.47 interactive shell mode. Type 'quit' to quit.
>file.svg --export-pdf=file.pdf
>otherfile.svg --export-png=bitmap.png
Background RRGGBBAA: ffffff00
Area 0:0:744.094:1052.36 exported to 744 x 1052 pixels (90 dpi)
Bitmap saved as: bitmap.png
>quit