try using export $DISPLAY after setenv ----- Original Message ----- From: "Shing-Fat Fred Ma" <[EMAIL PROTECTED]> To: "Raymond R. Balise" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, February 01, 2002 11:11 PM Subject: Re: setenv DISPLAY
> Hi, Raymond, > > I'm not familiar with the unix you describe. > HPUX, Solaris, and linux all rely on the > environment variable $DISPLAY, which > get passed to any subprocesses spawned > by the current process (e.g. when you issue > a command) because the setenv way of > setting the variable designates it as an > "envrionment" variable. The Xvnc script > seems to automatically set this before calling > xsetup, presumably because it has the > has the information about the DISPLAY > number being used by the VNC servver. > > $DISPLAY is a common > variables used by many scripts and commands. > My guess is that $HOST is suppose to > be nonempty string representing your > machine name with a ":0.0" suffix added, > and $HOST$DISPLAY merely concatenates > them together to get fully specified name, > including the domain. Or maybe $DISPLAY > is suppose to provide the ":0.0". This numbber > represents the console screen, so don't use it > in xstartup. You shouldn't have to explicitly > set DISPLY in xstartup becvause $DISPPLAY > changes from one server to another. The > vncserver script should set it. > > As for you .xsetup, I've never heard of that > file before. If it is a log file, it might merely > be reporting what you already know i.e. that DISPLAY > is not properly set. If it is a startup instruction file, then > it should not be setting DISPLAY either, for the same > reson i.e. most people will be accessing a > shared unix machine dfrom a different location > than the console, and that location is usually not > not predictable. The login windoe takes care of setting > DISPLAY (I think it's called xdm or xdmc or something > like that). If you get rid of the DISPLAY in .xsetup, it > might work. > > As I mentioned, it is vncserver that invokes xstartup > (maybe through another program it calls, Xvnc). You > should not have to issue the xstartup command yourself. > If that's what you're doing, then DISPLAY will certainly > not be automatically set right upon entry into xstartup, > unless you manually set it to the display number > reported by the vncserver script. The display number > is also logged in the log file (in ~/.vnc). > > Note that the DISPLAY can take a few forms. It > often takes the form of ":0.0" without a machine > name, in whi\ch case it defaults to the host > machine. Most unix systems will respond the the > command "hostname" by reporting its machine > name. DISPLAY can equivalently take the form > "MachineName:0.0" or > MachineName.blah.bleh.standford.edu:0.0 . > > MachineName is often a different machine from > the one that sets DISPLAY and runs the programs. > This would cause the windows for those programs > to open on the remote machine, assuming that > all the proper access permissions are in place > (which normally happens invisibly). > Once again, the 0.0 should be replaced by the > proper display number when using VNC, which > has no decimal part. Also, > when using VNC display numbers, it seems to > be not OK to leave out the machine name. > > Good luck. See if you can show your problem > to a system administrator. They are normally > very busy people, but they would know if there > are any site-specific setup issues that might > interfere with the VNC was meant to work. > > Fred > > -- > -------------------------------------------------------------------------- > Fred Ma > Department of Electronics > Carleton University, Mackenzie Building > 1125 Colonel By Drive > Ottawa, Ontario > Canada K1S 5B6 > [EMAIL PROTECTED] > ========================================================================== > > "Raymond R. Balise" wrote: > > > Thank you kindly for the VNC help. The problem seems to be with the > > standard UNIX setups here at Stanford. I have found other people who have > > the same problem but nobody who has a solution. > > > > In my xsetup I typed: > > #!/bin/tcsh > > echo $HOST$DISPLAY > > setenv DISPLAY $HOST$DISPLAY > > exit > > > > The echo is doing what I expected: > > tree2.Stanford.EDU:9 > > > > but the setenv does not seem to affect the system because if I type: > > echo $DISPLAY > > from shell prompt it display me a blank line. Sorry but I don't know > > anything about variable scope in UNIX. Is the scope on the setenv DISPLAY > > limited because it is inside of the .xsetup? Got any idea about why this > > will not work? > > > > Thanks again, > > Ray > > > > Ray > --------------------------------------------------------------------- > To unsubscribe, mail [EMAIL PROTECTED] with the line: > 'unsubscribe vnc-list' in the message BODY > See also: http://www.uk.research.att.com/vnc/intouch.html > --------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, mail [EMAIL PROTECTED] with the line: 'unsubscribe vnc-list' in the message BODY See also: http://www.uk.research.att.com/vnc/intouch.html ---------------------------------------------------------------------
