You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _pages/scripting/headless.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@ project: /software/imagej2
9
9
To start ImageJ2 headless mode, run (with the launcher appropriate for your system substituted):
10
10
11
11
```ssh
12
-
./ImageJ-linux64 --ij2 --headless
12
+
./ImageJ-linux64 --headless
13
13
```
14
14
15
15
By default, when ImageJ2 runs headlessly it acts like a one-off program: it will only perform the requested operations, then quit. To run a script headlessly, use:
{% include notice icon="warning" content='In many cases, it is necessary to enclose the entire list of key/value pairs in single quotes, to avoid shell expansion. See the following examples.' %}
@@ -33,23 +33,21 @@ print('Hello ' + name)
33
33
we could run this script with the command on [Linux](/platforms/linux):
Note that the `name` parameter must be enclosed in double quotes, since it is a string literal.
40
40
41
-
The optional `--console` argument allows to have `print`, `IJ.log` and error statements returned to the console window.
42
-
43
41
On [Windows](/platforms/windows) systems, single/double quotes might be inverted though, such that strings are enclosed in single quotes while the list of argument as well as the path to the py script are in double quotes.
Often headless mode is used to run many scripts in parallel that could result in huge numbers of server connections. Setting this parameter will prevent this issue. This parameter does not persist between launches and must be included every time server connections to update sites should be prevented.
@@ -89,7 +87,7 @@ If desired, the updater can be controlled in headless mode using the following c
89
87
90
88
```ssh
91
89
./ImageJ-linux64 --update add-update-site BAR https://sites.imagej.net/Tiago/
92
-
./ImageJ-linux64 --ij2 --headless --update update
90
+
./ImageJ-linux64 --headless --update update
93
91
```
94
92
95
93
You can also add multiple update sites in a single command line:
0 commit comments