-1

I have a client A (192.168.1.1)(vncviewer) accessing Server B (192.168.2.1) (RHEL6) to run a installer. The installation pre-requisite is to set the xhost and DISPLAY properly.

Q1) Please correct me if I am wrong for the following

  • Xserver should be running in clientA
  • DISPLAY should be set in Server B
  • DISPLAY should be set to 192.168.1.1 (of client A's IP)
  • Xhost on clientA should be set to allow Server B's IP (192.168.2.1)

Q2) Overhere, although I am running the installer over a network, I am using VNC to do it, and not using X. Do I still need to set the xhost and DISPLAY parameters ? If not, what value should be provided respectively for these parameters ?

Q3) In terms of X11 forwarding, what are the configurations that should be done on client A and Server B ?

Hope to hear your advices soon.

Regards,

Noob

Noob
  • 363
  • 2
  • 6
  • 16

1 Answers1

1

You're probably referring to the old X-Windows display redirection method. On the client you'd open up a xterm and allow server B to display content on your local screen:

A$ xhost +192.168.2.1

Then you telnet to server B and say you want the application displayed on machine A:

A$ telnet 192.168.2.1
B$ export DISPLAY=192.168.1.1:0.0
B$ myapp

When starting myapp, the application gets displayed on A's screen.

However, nowadays we use encrypted redirections with ssh. Just start ssh on the client with the parameter -Y:

A$ ssh -Y 192.168.2.1
B$ myapp

To make this work, the sshd_config must have set

X11Forwarding yes

on both sides.

As of you VNC-configuration, as long as you're logging into an X-Windows environment on client A, it should'nt affect your application redirection from B to A.

Alexander Janssen
  • 2,557
  • 15
  • 21
  • Thank you for your explanation. However, my doubt is that since i am already connected to B via VNC, there is no need for me to direct any display from B to A already isn't it ? I am just thinking that i could have run the program(myapp) in server B via the VNC. In another word, for myapp to run locally in ServerB, do i need to set any display or xhost setting ? – Noob Jun 15 '15 at 11:59
  • @Noob We would not reasonably expect a server to contain a GUI or to serve VNC. This is not good practice. In any event, have you tried just starting the installer? – Michael Hampton Jun 15 '15 at 12:07
  • @MichaelHampton even a headless server kann serve X-programs via simple display-redirection & ssh, just the X11 client libraries are needed on the server, not a full-blown X11 installation. And yeah, Oracle is notoriously known for shipping GUI/Java installers... – Alexander Janssen Jun 15 '15 at 12:27
  • Yes, I know you can run X programs over ssh, and indeed that's how I would start the Oracle installer, but that's plainly not what he's doing. He installed a GUI on his server and connected to it with VNC! – Michael Hampton Jun 15 '15 at 12:34
  • Funky, I understood that he's accessing the client via VNC, and starting the ssh-connection w/ X-redirection from there to the server. In that case; I don't know, but I figure 'just start the installer locally on B' should do it. – Alexander Janssen Jun 15 '15 at 12:38
  • @all, thanks for the feedback. Sorry for the confusion, i am not using any ssh at the moment. Just pure VNC connection to the database server B. Hence i wonder -> 1) in this scenario, do i still need to do any X settings/configurations ? 2) putting VNC aside, assuming if i am accessing the server B physically via its console through its GUI, do i need to do any X settings and configuration ? 3) does the OS itself uses X to run its Gnome desktop ? – Noob Jun 15 '15 at 17:13
  • @all, guys can i just confirm, when i run a vnc connection to Server B. The X server and X client will be actually residing locally in B itself. – Noob Jun 16 '15 at 17:01
  • Ok. So the server B has a working X server and you can access this server additionally via VNC. Did you just try starting the installer? If all of that you say is true, you don't need to set DISPLAY or xhost; you only need that if you want a remote screen displayed locally, without the use of VNC. – Alexander Janssen Jun 16 '15 at 17:12
  • @Jan - I issue a xhost+ in server B and run the installer. The installer gui then appear in my vncviewer. This is the reason that brought me here. I am thinking why should I issue a xhost+ at all and if B instead of A is my X server ? In any case Jan, can I confirm that with A connecting to B via vnc. B Xclient and Xserver are actually itself, right ? – Noob Jun 17 '15 at 05:14