Less mac-specific question: is there a way to echo...
# magic
a
Less mac-specific question: is there a way to echo TkCon output to the invoking terminal? In particular, my experience of running
magic
with an invalid
-d
is it helpfully prints the list of supported ones to the console, and then less helpfully immediately closes the console window before you can read it.
s
When I DO have a valid X-DISPLAY, this gives me a list to stdout:
Copy code
$ magic -noc -dblah
Use openwrapper to create a new GUI-based layout window
Use closewrapper to remove a new GUI-based layout window

Magic 8.3 revision 89 - Compiled on Tue Nov 24 17:02:20 PST 2020.
Starting magic under Tcl interpreter
Using the terminal as the console.
Unknown display type:  BLAH
These display types are available in this version of Magic:
        XWIND
        X11
        8BIT
        16BIT
        24BIT
        OPEN_GL
        OGL
        OPENGL
        CAIRO
        XR
        NULL
Use '-d NULL' if you don't need graphics.
I think XR is an alias for CAIRO and your build will have its own custom list. The
share/man/man1/magic.1
man-page in the build mentions some of these (seems old/incomplete), but implies that
-dnull
(missing in the output above) is not same as
-d NULL
.
a
-noc
looks like the thing I was looking for, ty! It's saying
The graphics display couldn't be correctly initialized.
for CAIRO/XR while segfaulting for X11 (and giving a list identical to yours for BLAH/HELP), so it does seem aware of the possibility at least.