could anyone explain how to set up $DISPLAY paramter?

Jason Yu
Jason Yu used Ask the Experts™
I have an oracle host with below settings.

#if [ -z "$REMOTEHOST" ]
#DISPLAY=`hostname`:0.0; export DISPLAY
#DISPLAY=localhost:1; export DISPLAY
#xhost + localhost

If I don't disable them, I will get trouble to run oracle gridware installer. Could anyone help me what each line means?

I want to know clearly what this if clause does!

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
Are you on a graphical workstation.,
The env $DISPLAY is used by graphical xterm, mailx, etc to display the graphical user interface.

The ssh client when you have a graphical system or using an X-window interface,
ssh -x username@remotehost will create and setup the $DISPLAY variable after authentication through the X11 tunnel within the ssh session.

This way when you launch any graphical app on the remote host it will be sent through the X11 tunnel back to the system from which you are connected and have it displayed within the X-windowing system on the originating system.

Setting variables only possible when the system from which graphical apps are launched and the remote one to which it is sent are on the same network.
xhost is the command to authorize a designated system with rights to send their graphical display to the system on which xhost command is run.

:0.0 is a notation deals with identifying the ..

Often depending on the GUI Windowing system, Gnome, KDE, etc. has two,three, four desktop display screen in which one can run application meaning each 0.0 is the main primary.
0.1 means second, etc.
Deals with whether all 10 windows of application you are running, are all one one desktop, or dispersed among the four.........

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial