DISPLAY Environment Variable | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

DISPLAY Environment Variable

UNIX for Dummies Questions & Answers


Tags
display, environment, variable

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-30-2010
cjhancock cjhancock is offline
Registered User
 
Join Date: Feb 2005
Last Activity: 1 July 2010, 5:36 AM EDT
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
DISPLAY Environment Variable

I've seen articles which say "export DISPLAY=<IP>:0" and others which say "export DISPLAY=<IP>:0.0". Can someone explain what the difference is?

TIA
Sponsored Links
    #2  
Old 06-30-2010
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 29 October 2014, 3:36 PM EDT
Location: /dev/ph
Posts: 4,826
Thanks: 64
Thanked 431 Times in 399 Posts
From a X(7) man page:

Quote:
From the user's perspective, every X server has a display name of the form:

hostname:displaynumber.screennumber

This information is used by the application to determine how it should connect to the server and which screen it should use by default (on displays with multiple monitors):

hostname
The hostname specifies the name of the machine to which the display is physically connected. If the hostname is not given, the most efficient way of communicating to a server on the same machine will be used.
displaynumber
The phrase "display" is usually used to refer to collection of monitors that share a common keyboard and pointer (mouse, tablet, etc.). Most workstations tend to only have one keyboard, and therefore, only one display. Larger, multi-user systems, however, frequently have several displays so that more than one person can be doing graphics work at once. To avoid confusion, each display on a machine is assigned a display number (beginning at 0) when the X server for that display is started. The display number must always be given in a display name.
screennumber
Some displays share a single keyboard and pointer among two or more monitors. Since each monitor has its own set of windows, each screen is assigned a screen number (beginning at 0) when the X server for that display is started. If the screen number is not given, screen 0 will be used.
Note that an IP address can be used instead of a hostname.
The Following User Says Thank You to fpmurphy For This Useful Post:
cjhancock (07-01-2010)
Sponsored Links
    #3  
Old 06-30-2010
mewbie mewbie is offline
Registered User
 
Join Date: Jun 2009
Last Activity: 24 August 2010, 11:50 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Hope it's ok to join in on an environment variable question-
How to view what environment variables users have set up?
env bob doesn't work, cd'ing to their home dir and running the cmd doesn't work either.
( I know to see my own it's: env)
Thank you
    #4  
Old 06-30-2010
kduffin's Avatar
kduffin kduffin is offline Forum Advisor  
UN1X
 
Join Date: Nov 2003
Last Activity: 21 January 2014, 4:03 PM EST
Location: Belize
Posts: 484
Thanks: 0
Thanked 3 Times in 2 Posts
If you have root rights, you can simply su - to the user and run env. Alternatively, you could just source their respective .chsrc, .bashrc etc. ( . /path/to/user/.bashrc) and then check the environment differences are. What's the purpose of your particular investigation?

Cheers,

Keith
Sponsored Links
    #5  
Old 07-01-2010
mewbie mewbie is offline
Registered User
 
Join Date: Jun 2009
Last Activity: 24 August 2010, 11:50 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you for the reply kduffin
That works great- with the exception that the next time the user logs in they will see 'Last login' as my IP - not their own and their .bash_history will contain cmds I executed.
It is also quiet a few steps to yield the results of 'env' for all users.
Is there another method to view one or all users env variables?
For example to view if any users have messed around with their history? such as 'unset HISTFILE'.
I know how to prevent them from altering it, I just want to know if they have .

Last edited by mewbie; 07-01-2010 at 02:09 AM.. Reason: spelling/grammar :p
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Display o/p in HTML format from unix environment apsprabhu Shell Programming and Scripting 3 04-12-2010 08:55 AM
set environment variable? smartgupta Solaris 8 09-15-2008 01:01 PM
How do i set environment variable ahjiefreak Linux 4 01-20-2008 07:21 PM
sed on an environment variable ? lumix Shell Programming and Scripting 3 12-15-2007 05:30 PM
Set the 'DISPLAY' environment variable script orno Shell Programming and Scripting 3 02-12-2007 11:27 AM



All times are GMT -4. The time now is 08:57 AM.