The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
I need to display it how to do unitipon Shell Programming and Scripting 2 06-11-2007 04:33 AM
Display Carmen123 Linux 1 12-04-2006 11:35 AM
X Display BG_JrAdmin SUN Solaris 2 10-01-2005 07:38 AM
display LiTo UNIX for Dummies Questions & Answers 4 11-04-2004 06:08 PM
DISPLAY from another LAN b5fnpct UNIX for Advanced & Expert Users 2 12-31-2002 05:01 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-27-2001
sskb
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
DISPLAY settiing

How to set the display environment variable through a script?
i tried that using "setenv" but it gave me error.

is there any idea?
  #2 (permalink)  
Old 08-28-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584

Try just typing env. If that doesn't work, try just typing set. Now, if that doesn't work, I'm out of ideas...
  #3 (permalink)  
Old 08-28-2001
nonbarye nonbarye is offline
Registered User
  
 

Join Date: Jul 2001
Location: Turkey
Posts: 9
Cool Solution

in script,
you can add following line;

export DISPLAY=`uname -n`:0.0
  #4 (permalink)  
Old 08-28-2001
rwb1959's Avatar
rwb1959 rwb1959 is offline
Registered User
  
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
setting DISPLAY

It depends what shell you are
using. For example:

C Shell: setenv DISPLAY some_host:0.0
Bourne Shell: DISPLAY=some_host:0.0; export DISPLAY
Korn Shell: export DISPLAY=some_host:0.0
BASH: export DISPLAY=some_host:0.0

...where "some_host" is the hostname or IP
address of the X workstation or console you
are using.

Since you said you tried "setenv", I assume you
are using "csh". You may also want to check the
man page for csh and the "source" command if you
want the setting to be persistant in your
current session's environment.
  #5 (permalink)  
Old 10-04-2001
sskb
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
to be clear..
while in the normal command mode i use

setenv DISPLAY system-no:0.0
and that works fine.

if i use the same in script.. then it gives me errors like

setenv: command not found

is there any remedy?
  #6 (permalink)  
Old 10-04-2001
rwb1959's Avatar
rwb1959 rwb1959 is offline
Registered User
  
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
First... are you using csh?
Can you verify this the shell you are using?
If so, setenv is a built-in so I'm not sure why you
would get that particular error.

Can you supply more info. (maybe even the script)?

Also, it has been said the csh is not a good shell for
scripting for various reasons but an interesting (amusing)
article by Tom Christiansen discusses the "cons"...
Now while i agree with Tom, I would not begrudge
anyone the freedom to "find out for themselves"

http://www.dubois.ws/software/csh-tcsh-book/csh-whynot
  #7 (permalink)  
Old 10-04-2001
sskb
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
yes i am using a csh.
the script i have used is the following.

setenv DISPLAY 172.24.1.55:0.0
/opt/netscape/netscape&

it invokes netscape if i have already set display.
but the first line gives me error.

Closed Thread

Bookmarks

Tags
export display

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0