Gwyddion provides means to open files in an
already running instance of the application and to test whether any
instance is running on a given display. These operations are performed
by so called remote control command line options. When they are given
to the program, it does not start the user interface as usual, instead
it attempts to communicate with an already running Gwyddion. All the
remote control options take the form --remote-*
:
--remote-new
Proably the most useful option. It opens the files given on the
command line in an already running instance of Gwyddion. If none
is running, it starts new Gwyddion as if
--remote-new
was not given – in this case, and
only in this case, start-up options such as
--no-splash
have the intended effect (and make
sense).
File type associations are created to run Gwyddion with this option by default.
--remote-existing
This options opens the files given on the command line in an already running instance of Gwyddion, in this case the command succeeds. However, if none is running it silently fails instead of starting a new one. This can be useful when you want to handle failure differently than by starting a new Gwyddion.
--remote-query
If an instance is already running, this option prints its toolbox window id (Window on X11, HWND on Win32) and succeeds. If none is running, it silently fails.
If more than one instance of Gwyddion is running on the display, the remote control will choose an arbitrary one.