Discussion:
[Inkscape-user] open file into existing instance from terminal?
Orm Finnendahl
2017-04-07 11:21:42 UTC
Permalink
Hi,

is there a way to send an existing inkscape instance a file-open
message (with the document name as argument) from a terminal or
another process?

It seems, the dbus interface would be the way to go but the API
documentation only mentions a command to open a new document (which
works BTW).

I'm on linux and inkscape is bzr-inkscape 0.91

--
Orm
Maren Hachmann
2017-04-07 12:00:19 UTC
Permalink
Hi Orm,

you'd need to run Inkscape in interactive shell mode to do this, as far
as I know.
From the man page ('man inkscape' or
https://inkscape.org/en/doc/inkscape-man.html):

"""
--shell

With this parameter, Inkscape will enter an interactive command line
shell mode. In this mode, you type in commands at the prompt and
Inkscape executes them, without you having to run a new copy of Inkscape
for each command. This feature is mostly useful for scripting and server
uses: it adds no new capabilities but allows you to improve the speed
and memory requirements of any script that repeatedly calls Inkscape to
perform command line tasks (such as export or conversions). Each command
in shell mode must be a complete valid Inkscape command line but without
the Inkscape program name, for example "file.svg --export-pdf=file.pdf".
"""

Hope this helps, I can't say anything about dbus etc.

Kind Regards,
Maren
Hi,
is there a way to send an existing inkscape instance a file-open
message (with the document name as argument) from a terminal or
another process?
It seems, the dbus interface would be the way to go but the API
documentation only mentions a command to open a new document (which
works BTW).
I'm on linux and inkscape is bzr-inkscape 0.91
--
Orm
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-user mailing list
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Loading...