Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-21-2004, 08:47 AM   #1
Registered: Aug 2003
Location: Oz
Distribution: Gentoo - Debian
Posts: 202

Rep: Reputation: 30
Environment Variable: how to change env DISPLAY in Redhat 9

Hello all,

This is a continuation of my post to the networking forum:

See here

because it has now become more of a general issue I think (and I got no clues in networking).

Anyway can anybody tell me how to change the DISPLAY environment variable in redhat 9?

I want to change it from localhost:10.0 to or :10.0

the command setenv does not work in bash, so if I change to csh and then update env with

setenv DISPLAY


setenv DISPLAY :10.0

it appears to change the variable but only lasts until I exit csh, then when I check env in bash the DISPLAY value has gone back to localhost:10.0 ??

I tried export also, that didnt seem to work either...

Does anyone know what might be happening?

Old 07-21-2004, 05:07 PM   #2
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
The bash equivalent is:
export DISPLAY=


export DISPLAY
Old 07-21-2004, 05:15 PM   #3
Senior Member
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
Don't force it - SSH automatically sets the $DISPLAY variable when it does X forwarding, and if that's not happening then I would check that the system SSH config is OK, and that you don't have a ssh_config in your home directory to override the defaults. There's no reason why you can't reinstall SSH to get a clean setup.

X forwarding definitely works out of the box on Fedora Core 1 & 2, without requiring -X to force it.

I notice that you specify csh, rather than bash. You could try setting up a clean account with bash, just in case the environment variable handling in csh is not working right. I doubt that many people test csh on RH...


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem withChanging DISPLAY environment variable to display on someone else's screen wantsri Linux - Networking 1 10-25-2005 12:14 PM
Tcl Error no display name and no DISPLAY environment variable thinkgeek Programming 5 07-06-2005 11:24 PM
setting environment variable DISPLAY jpan Debian 4 10-15-2004 07:09 PM
DISPLAY environment variable danahata Slackware 2 02-26-2004 04:30 PM
How can I do some modification to my initialized "env" environment variable? yuzuohong Linux - General 3 12-18-2002 04:41 PM

All times are GMT -5. The time now is 02:12 PM.

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