Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to clear the export DISPLAY=my ip address that I have given .

It has botched up the x settings , now I just want it to be reset like normal

How to clear this export paramater .

Simple set DISPLAY=

doesnt work .

Please tell me

share|improve this question
    
What shell are you using? Are you actually using the set command? That only works in some shells. –  Dennis Williamson Jun 21 '10 at 13:51
    
The only way to get it "like normal" is to logout and login again. Sure, unset will clear the variable, but it is not necessarily the same as it was before exporting. –  grawity Jun 21 '10 at 16:28

3 Answers 3

up vote 0 down vote accepted

Try:

export DISPLAY=""

Usually you should have it set like this:

export DISPLAY=":0.0"

or

export DISPLAY="localhost:0.0"
share|improve this answer
    
If it's already exported it doesn't need to be again. Also, some shells won't let you do export and an assignment at the same time. You might have to do DISPLAY=""; export DISPLAY (if it hasn't already been exported). –  Dennis Williamson Jun 21 '10 at 13:55
    
Ideally I want it like before I exported anything . My idea output is something like blank if I get set | grep DISPLAY . Which is before I set anything . In this case it shows locahost:0.0 I want VNC to take control of this DISPLAY thing –  Nishant Jun 21 '10 at 13:59

As others have mentioned, knowing the shell you're using might help.

Otherwise, have you tried simply using unset? The exact command would be unset DISPLAY, for this specific variable.

--Christopher Karel

share|improve this answer
    
I have withdrawn my answer for unset since I missed you already answered it :) It certainly seems like that would accomplish what was asked and I know it works in at least BASH, KSH and CSH. –  Alex Jun 21 '10 at 14:30
1  
I, too, missed it. But this is correct. Suggested edit: "unset DISPLAY", to match the question being asked. –  mpbloch Jun 21 '10 at 14:52
export DISPLAY=""

in bash should clear any value

share|improve this answer
    
No, that's incorrect. –  Dennis Williamson Jun 21 '10 at 13:49
    
Somehow even after the command , I am getting [[root@charlie originalnotbuildable]# export="" [root@charlie originalnotbuildable]# echo $DISPLAY charlie:2 I am trying to open a VNC session and somehow this charlie:2 session is not changing. –  Nishant Jun 21 '10 at 13:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.