could anyone explain how to set up $DISPLAY paramter?

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!

Jason YuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.........

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.