LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (http://www.linuxquestions.org/questions/aix-43/)
-   -   error while opning vi in AIX (http://www.linuxquestions.org/questions/aix-43/error-while-opning-vi-in-aix-4175430643/)

peacepanda 10-05-2012 04:19 AM

error while opning vi in AIX
 
Hi All,
I am trying to open vi in aix.But everytime I run the command I keep getting the error as
PHP Code:

E233cannot open display 

The file does open though but I still keep getting the roor.Can someone tell me what is the reason of the error here.

Regards,
Ajit

MensaWater 10-05-2012 09:44 AM

"cannot open display" is usually an indication you're trying to open an X Windows (GUI) version of something.

I don't work on AIX but it may be whatever it is using for vi has both a character based (CLI) version and a GUI version (vim/gvim due for Linux). Often if this is the case any time it sees the DISPLAY variable set it automatically tries to use the GUI.

Type "echo $DISPLAY" to see if your DISPLAY variable is set. If so you can try doing "unset DISPLAY" to get rid of it and retry vi to see if it launches the character based version.

If you WANT the GUI version then you'd need to work on insuring you have X Windows (or emulator) running on the workstation you're trying to display back to AND insure you have some method of getting X Windows back to it (e.g. opening ports in the 6000 range or using ssh X tunneling).

NevemTeve 10-10-2012 03:47 AM

Many platform automagically sets env var DISPLAY (if you have az X-server on the client-side), on AIX use sg like this:

Code:

export DISPLAY=$(who am i | awk '{ print substr($6,2,length($6)-2); }'):0


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