Problem Description I'm trying to run a GUI application on a remote Linux machine by manually setting the DISPLAY environment variable, but I keep getting an error when the app tries to open the display.
I’ve tried the following methods, but none worked — neither on GNOME nor on XFCE:
a. Ran xhost + on RealVNC server vpc00
b. Ran xhost +ab0500 on RealVNC server vpc00
c. Set DISPLAY manually using setenv DISPLAY localhost:10.0 (value taken from running echo $DISPLAY after connecting remot host via ssh -X)
d. Disabled both the OS firewall and SELinux (there’s no firewall between the servers; both are on the same VLAN)
e. Tried adding the X11 magic cookie manually using xauth -add
f. Tried above solutions on the remote host which same OS version with RealVNC server (Oracle Linux 8.10) also getting the same error.
What does work: Connecting to the remote host with ssh -X or ssh -Y, then launching the GUI app works without any issues.
Error Message:
[al@vpc00 ~/Desktop]$ ssh ab0500 Last login: Thu Apr 17 20:53:57 2025 from vpc00.pen.skyechip.com
[al@ab0500 ~]$ echo $DISPLAY DISPLAY: Undefined variable.
[al@ab0500 ~]$ setenv DISPLAY vpc00:1
[al@ab0500 ~]$ echo $DISPLAY vpc00:1
[al@ab0500 ~]$ firefox & [1] 13350
[al@ab0500 ~]$ Error: cannot open display: vpc00:1 [1] Exit 1 firefox
Basically, manual DISPLAY forwarding isn’t working, but ssh -X and ssh -Y are fine. Looking for a fix or explanation for why manual DISPLAY forwarding fails even when access seems open.
System Information:-
RealVNC Server vpc00
Operating System: Oracle Linux Server 8.10
Kernel: Linux 5.15.0-206.153.7.1.el8uek.x86_64
Architecture: x86-64
RealVNC server version: RealVNC(R) Server 7.13.1 (r57) x64 (Dec 6 2024 17:47:50)
X.Org X Server 1.20.11
Remote Server ab0500
Operating System: CentOS Linux 7 (Core)
Kernel: Linux 3.10.0-1160.71.1.el7.x86_64
Architecture: x86-64
X.Org X Server 1.20.4