installation on Mac with intel chip:X11Error: Can't open display: /private/tmp/com.apple.launchd.E1Z2K7OfrY/org.xquartz:0

I followed the installation instruction step by step, but still cannot start afni. I got the following error message:
Precompiled binary macos_12_x86_64: Feb 20 2024 (Version AFNI_24.0.07 'Caracalla')

** Version check disabled: AFNI_VERSION_CHECK forbids

I made sure that I used tcsh, restarted my Mac, and also re-installed xQuartz. Still the same thing

Thanks go to B Feige for advice and help

Initializing: X11Error: Can't open display: /private/tmp/com.apple.launchd.E1Z2K7OfrY/org.xquartz:0

++ AFNI is detached from terminal.

can you help?

What is the output of:
#note corrected getenv typo below for future viewers

launchctl getenv DISPLAY
echo $DISPLAY
  • rick

I ran into the same trouble.

“Version check disabled: AFNI_VERSION_CHECK forbids
Thanks go to K Bove-Bettis for caloric input

Initializing: X11Error: Can't open display: /private/tmp/com.apple.launchd.DDinp9RSCJ/org.xquartz:0”

the output of:
launchctl getnev DISPLAY
echo $DISPLAY
is

“Unrecognized subcommand: getnev
Usage: launchctl ... | help [subcommand]
Many subcommands take a target specifier that refers to a domain or service
within that domain. The available specifier forms are:

system/[service-name]
Targets the system-wide domain or service within. Root privileges are required
to make modifications.

user//[service-name]
Targets the user domain or service within. A process running as the target user
may make modifications. Root may modify any user's domain. User domains do not
exist on iOS.

gui//[service-name]
Targets the GUI domain or service within. Each GUI domain is associated with a
user domain, and a process running as the owner of that user domain may make
modifications. Root may modify any GUI domain. GUI domains do not exist on iOS.

session//[service-name]
Targets a session domain or service within. A process running within the target
security audit session may make modifications. Root may modify any session
domain.

pid//[service-name]
Targets a process domain or service within. Only the process which owns the
domain may modify it. Even root may not do so.

When using a legacy subcommand which manipulates a domain, the target domain is
inferred from the current execution context. When run as root (whether it is
via a root shell or sudo(1)), the target domain is assumed to be the
system-wide domain. When run from a normal user's shell, the target is assumed
to be the per-user domain for that current user.

Subcommands:
bootstrap Bootstraps a domain or a service into a domain.
bootout Tears down a domain or removes a service from a domain.
enable Enables an existing service.
disable Disables an existing service.
kickstart Forces an existing service to start.
attach Attach the system's debugger to a service.
debug Configures the next invocation of a service for debugging.
kill Sends a signal to the service instance.
blame Prints the reason a service is running.
print Prints a description of a domain or service.
print-cache Prints information about the service cache.
print-disabled Prints which services are disabled.
plist Prints a property list embedded in a binary (targets the Info.plist by default).
procinfo Prints port information about a process.
hostinfo Prints port information about the host.
resolveport Resolves a port name from a process to an endpoint in launchd.
limit Reads or modifies launchd's resource limits.
examine Runs the specified analysis tool against launchd in a non-reentrant manner.
config Modifies persistent configuration parameters for launchd domains.
dumpstate Dumps launchd state to stdout.
dumpjpcategory Dumps the jetsam properties category for all services.
reboot Initiates a system reboot of the specified type.
bootshell Brings the system up from single-user mode with a console shell.
load Recommended alternatives: bootstrap | enable. Bootstraps a service or directory of services.
unload Recommended alternatives: bootout | disable. Unloads a service or directory of services.
remove Unloads the specified service name.
list Lists information about services.
start Starts the specified service.
stop Stops the specified service if it is running.
setenv Sets the specified environment variables for all services within the domain.
unsetenv Unsets the specified environment variables for all services within the domain.
getenv Gets the value of an environment variable from within launchd.
bsexec Execute a program in another process' bootstrap context.
asuser Execute a program in the bootstrap context of a given user.
submit Submit a basic job from the command line.
managerpid Prints the PID of the launchd controlling the session.
manageruid Prints the UID of the current launchd session.
managername Prints the name of the current launchd session.
error Prints a description of an error.
variant Prints the launchd variant.
version Prints the launchd version.
help Prints the usage for a given subcommand.
/private/tmp/com.apple.launchd.DDinp9RSCJ/org.xquartz:0”

"getnev" is a typo for the command "getenv"