After logging into a network via SSH, the network's default shell being used is BASH.It is then possible to run applications which utilize graphics only if X11 forwarding has been enabled which I usually do via the -X option while logging in:ssh -X user@network.to.connect.toI notice that when it is enabled the DISPLAY environmental variable exists and is set as such DISPLAY=localhost:11.0, however there is nothing stopping the user from exporting an environmental variable named the same thing, making it look as if it has been enabled.Is there a way from the bash shell or a bash script to determine if X11 Forwarding is enabled?
Using BASH to determine if X11 forwarding is enabled from SSH
bash;ssh;x11