{section:Interactive Singularity Jobs and condor_ssh_to_job} Starting with HTCondor 8.8, =condor_ssh_to_job= and hence also interactive jobs use an =sshd= running directly on the execute node with user privileges. Since 8.8.10, most issue have been ironed out, and connecting into the job happens using =condor_nsenter=, which is an =nsenter= -like tool to "enter" container namespaces in a generic way. This tool is spawned by the =starter= in parallel to =sshd=. There are a few remaining issues related to X11 forwarding which can be worked around, and which are partially dependent on the utilised setup. These are discussed on this page. {subsection:X11 forwarding} X11 forwarding in general works by running =xauth= as a child of the =sshd= process on the execute node. =sshd= mostly prunes the environment before, setting a new DISPLAY variable to a forwarded X11 port. It then runs =xauth= which by default uses the user's home directory to store the X11 authorization information. Two issues arise: *: Since =condor_nsenter= does not run as a child of the =sshd=, but as a child of the =starter=, it can not pass on the =DISPLAY= environment variable to the user session. *: In many cases, when containers are used, the actual users may not have a home directory on the execute node, or might not have it mounted inside the container. However, we cannot override the location to store the =.Xauthority= file with the environment variable =XAUTHORITY= since =sshd= prunes that. {subsubsection:A possible workaround} To solve both issues at once, we can make use of the fact that =sshd= is spawned and configured by HTCondor via the =condor_ssh_to_job_sshd_config_template=. The location of this template can be set via the knob =SSH_TO_JOB_SSHD_CONFIG_TEMPLATE=. We can patch the file shipped with HTCondor and add the line: XAuthLocation /usr/local/bin/condor_xauth_wrapper Subsequently, we can create the wrapper script (make sure it is executable) with the following content: ---- {verbatim} #!/bin/bash # Walk up the process tree until we find the second sshd which rewrites cmdline to "sshd: user@tty". # The first sshd is our parent process which does not log itself. SSHD_PID=$$ SSHD_CNT=0 while true; do IFS= read -r -d '' CMDLINE > ${SSH_TO_JOB_DIR}/env.sh # Ugly hack needed with HTCondor 8.8.10 which does not yet pass through DISPLAY. echo "export DISPLAY=${DISPLAY}" > ${JOB_WORKING_DIR}/.display export XAUTHORITY=${JOB_WORKING_DIR}/.Xauthority /usr/bin/xauth "$@" =7.8), you could also patch =/usr/libexec/condor/condor_ssh_to_job_sshd_setup= instead and inject the =XAUTHORITY= location via =SetEnv=. In that script, =${base_dir}= refers to the execute directory. This solution has not yet been tested, but should also achieve the expected result. However, you will still need the above =condor_xauth_wrapper= for now, to transport over the =DISPLAY= variable by hooking into =sshd=. But as soon as HTCondor learns this in a future version, the lengthy script can be dropped.