LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2005, 07:57 AM   #1
sunsane
LQ Newbie
 
Registered: Sep 2005
Location: INDIA
Distribution: Mandrake
Posts: 10

Rep: Reputation: 0
"Inforamtion about Enviroment variable DISPLAY"


Hi all,
I had some queries regarding environment variable DISPLAY->

1. What does 0.0 mean in while setting your environment variable as set DISPLAY w.x.y.z:0.0 ?
2. Why you need to set DISPLAY variable in UNIX/LINUX environmet always?
3. Is it always there that every device on linux network and having capability
of expressing Input/Output through GUI must have env. variable DISPLAY ?
4. Last but very silly question, why DISPLAY is ever put up as env. variable in
LINUX?

Help me out.

anyone having some written history on environment variables can list me out.

cheers
 
Old 09-20-2005, 09:44 AM   #2
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
ok so basically what the display vairiable tells you is where the xserver is going to push all the visual output.

the 0 refers to the display number. don't know why you've got 0.0 - i've never seen it declared like that and you probably don't need the second one

so x.y.z.p:0 would be fine.

ok the reason the display variable comes into play is not really on a local setup but if you ssh into a machine(server) you can set the display env var to point to the client that your ssh ing from. so you'd have somehting like this

set DISPLAY client_ip_address:0
 
Old 09-21-2005, 05:42 AM   #3
sunsane
LQ Newbie
 
Registered: Sep 2005
Location: INDIA
Distribution: Mandrake
Posts: 10

Original Poster
Rep: Reputation: 0
Dispaly variable

Hi pats,

Understood the point of pushing of all visual o/p. But then, what is display
number & really i saw people working here on their SPARC m/c s setting DISPLAY by w.x.y.z:0.0.

Also, why does a client need to set it's DISPLAY on server as pointed by you.
& then try to answer my queries no. 2,3,4.

Thanks
 
Old 09-21-2005, 10:05 AM   #4
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
Quote:
Also, why does a client need to set it's DISPLAY on server as pointed by you.
the client when logged on via ssh has to set the display env. var. on the server to point anything executed in that shell to be forwarded to the clients machine. so if you were just using a local shell you could set DISPLAY to be localhost:0.0 and it would make not impact because thats the notmal behaviour.

Quote:
really i saw people working here on their SPARC m/c s setting DISPLAY by w.x.y.z:0.0
i've never seen it done like this but i'll take your word for it. the first 0 is the display number for sure


Quote:
what is display
well. linux has 'virtual' displays. i'm not even going to attempt to explain this because it makes sense in my head but i can't put it into words!!

have a look at this tho http://support.objectplanet.com/esup..._i=22&type=yes

Quote:
Why you need to set DISPLAY variable in UNIX/LINUX environmet always?
don't know what you mean by this. sorry


Quote:
Is it always there that every device on linux network and having capability of expressing Input/Output through GUI must have env. variable DISPLAY ?
not necessarily. its not essential. for example i might want to log into a server and just execute a couple of copy commands. i wouldn't need to forward the xserver output to my own display in that case. only if you want to use X forwarding do you need to set the DISPLAY variable


Quote:
4. Last but very silly question, why DISPLAY is ever put up as env. variable in
errm. good question. i believe all the enviroment variables are loaded into memory and therefore more quickly accessible than being put in a config file.
if i was to log into a box somewhere on the net then set the DISPLAY variable to point back to me. you could then log in with the same account from a different account with a different ip address and set the DISPLAY enviroment variable to point back to you.
this would work because each session will have its own set of enviroment variables.
this means that we could both work on the same machine with no conflict.

not such a silly question after all!!

hope i've cleared some things up. i can't really explain the whole display number thing. when you use VNC you have to specify which display you want to connect to and its the same sort of thing
 
Old 09-22-2005, 12:44 AM   #5
sunsane
LQ Newbie
 
Registered: Sep 2005
Location: INDIA
Distribution: Mandrake
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks pat,

all your info. is really helpful and now i can proceed on finding more related matter on this.
 
Old 09-22-2005, 12:52 AM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 50
If you use SSH with X forwarding, then you shouldn't set the DISPLAY variable. If you manually set the display, and then the programs communicate directly to your X server across the insecure network, then that defeats the whole point of X forwarding (you are not forwarding at all).

If you tell SSH to X forward (e.g. with the -Y or -X option), the SSH will set it up so that programs communicate to port on the local machine, and then SSH will *forward* that to your computer.
 
Old 09-22-2005, 01:20 AM   #7
nabeelmoidu
Member
 
Registered: Jul 2005
Location: Bangalore
Distribution: Fedora
Posts: 71

Rep: Reputation: 15
Check out this
http://www.xfree86.org/current/X.7.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to X11 window server using ":).0" as DISPLAY variable cclack Linux - Newbie 4 09-06-2007 09:32 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Conditional display of "HCL Entries" and "Reviews" ? J.W. LQ Suggestions & Feedback 1 09-01-2005 08:53 AM
Xlib: extension "XFree86-DRI" missing on display ":0.0". fostiator Linux - Hardware 15 02-20-2005 07:13 AM
bash-2.05b# Xlib: extension "XFree86-DRI" missing on display ":0.0". citrus Linux - General 8 02-22-2004 10:43 AM


All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration