We help IT Professionals succeed at work.
Get Started

setting xhost + localhost only through telnet

Last Modified: 2013-12-27
I have trouble setting xhost + localhost through telnet to a remote RedHat 5 machine.
I can manually log in to the machine and make this setting, but I need to do this through either a shell or a perl script (I need this for some automated testing).
I looked at some previous posts, and I tried some of the suggestions but they all seem to suppose that you will log in to the machine manually. But I only log in to the machine through a perl script using telnet, make some settings, like adding it to a grid, and then the grid will send out some applications to it. These applications won't see the xhost + localhost only if I do it manually on the machine.
If I manually log in to the machine, then all I need to do is to do xhost + localhost , and then export DISPLAY :0 from my script and it all works.
However I just can't set xhost + localhost from the script.
I tried setting it from $HOME/.Xclients and /etc/X0.hosts but it didn't work.

Please let me know if you have any suggestions.

Watch Question
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE