Hello 1 Login Server I have a total of 3 calculation nodes. Especially in non-GUI jobs, I can run scripts successfully with Slurm sbatch. However, when it is with Gui, I run it with X11. However, my problem for now is this: When I run sbatch gui.sh, it runs smoothly and automatically selects the calculation node and gui is active on the login server. But the node it selects must be logged in with the same user for x11 to work. How can I run the application with gui on the login node without logging in on the calculation node?

The calculation node gives the following error when I run the script without logging in. How can I solve this problem.  

srun: error: Ignoring --x11 option for a job step within an existing job. Set x11 options at job allocation time.
srun: error: tutelservernode01: task 0: Exited with exit code 255

My test Script ;

#!/bin/bash
#SBATCH --partition=debug   #Kullanılacak partition (compute, debug, vb.)
#SBATCH --job-name=xclock    # İşin adı
#SBATCH --output=xclock-%j.log  # İşin çıktı dosyası
#SBATCH --error=xclock-%j.err   # İşin hata çıktı dosyası

# Slurm'un hangi node'dan işlemi çalıştıracağını seçmesine izin verin
# --nodelist parametresi kullanılmazsa, Slurm otomatik olarak bir node seçecektir.

# xclock komutunu başlatmak için DISPLAY ortam değişkenini ayarlayın
#export DISPLAY=localhost:10.0  # MobaXterm veya başka bir X sunucusunun adresine göre ayarlayın

export DISPLAY=$DISPLAY

# xclock komutunu sbatch içinde başlatın
srun --x11 xclock

thankyou for support.