I'm trying to run a bash script that starts GUI. Though it says application started when I run this bash script doesn't show up any GUI. Here is what I've tried so far and please let me know if I'm missing something with the X11 set up here.
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.9 (Santiago)
rpm -qa | grep xorg-x11-xauth
xorg-x11-xauth-1.0.9-1.el6.x86_64
cat /etc/hosts|grep 127.0.0.1
127.0.0.1 localhost localhost.localdomain
cat /etc/ssh/sshd_config|grep X11
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
cat /etc/ssh/ssh_config|grep X11
ForwardX11 yes
Also enabled X11 forward in putty session and set Xdisplay location :0.0
Are you sitting at a Windows desktop?
If yes, did you install an X-server on it, like Xming or Cygwin/X or ...?
The (insecure) xhost -allow and manual DISPLAY setting should not be necessary if there is the (much safer) ssh X-forwarding enabled.
I'm not doing any SSH here. I'm trying to run a script on the local host machine itself. Just opened a putty session , enabled X11 forwarding by setting the X display location as
:0.0
and trying to run a script that should open a GUI. I have also set below lines in /etc/hosts file but no luck yet
On a local host, what do you need putty for? putty , amongst other features, does an ssh connect / session.
On the local server, is there an X-server running? How does xclock convert display :0.0 to :10.0 ?
You might have to go for xming. This is easy one.
As i understand you correct, you are opening a putty session and triggering a script.
Im assuming, you are using a windows desktop where this putty tool is available for you and the port 22 to the host you are connecting is allowed to this windows desktop.
You might need to install xming in this windows desktop in that case.
Once you are done,
-> Start your xserver in your desktop
-> Click Xlaunch - next - next -next - done
-> Open putty
-> Provide the SSH informations ( Display parameter as localhost:<xserver display parameter> and allow x11 forwarding )
and trigger your script and it should work.
Please make sure .Xauthority file is getting created in your home dir
You may need to install other packages like,
xauth
xterm
I will provide you some commands for required packages and it defnitely works
Yes, I'm using putty on a windows desktop to connect to red hat server and to run script. Thanks for the info in your comments and now I'm able to launch GUI version of script. May sound weird, but is there a way we can have this Xming(kind of tools) installed at Red Hat Linux OS layer and directly start GUI from there instead of invoking from Windows Desktop?