Xserver issue | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Xserver issue

Solaris


Tags
xwindow,putty

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-07-2013
laopi laopi is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 10 January 2013, 2:51 PM EST
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Xserver issue

Hi,

I had a solaris machine, when I run both putty and cygwin, it looks fine, I can start emacs, however, the shell is csh, I like bash, I run /bin/bash, the $DISPLAY looks fine, it show my IP properly, however, when I run emacs, it gave me some error message,


Code:
emacs: Cannot connect to X server localhost:0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

how can I fix it?

thanks.

peter

Last edited by Scott; 01-07-2013 at 01:38 PM.. Reason: Code tags
Sponsored Links
    #2  
Old 01-07-2013
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 27 July 2014, 10:58 PM EDT
Location: Saskatchewan
Posts: 18,978
Thanks: 748
Thanked 3,146 Times in 2,951 Posts
Maybe the variable's not exported? External applications wouldn't see it then, just the shell itself.


Code:
export DISPLAY
emacs

Sponsored Links
    #3  
Old 01-07-2013
laopi laopi is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 10 January 2013, 2:51 PM EST
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Corona688 View Post
Maybe the variable's not exported? External applications wouldn't see it then, just the shell itself.


Code:
export DISPLAY
emacs

The DISPLAY has been set properly, and I type echo $DISPLAY to confirm it.
    #4  
Old 01-07-2013
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 27 July 2014, 10:58 PM EDT
Location: Saskatchewan
Posts: 18,978
Thanks: 748
Thanked 3,146 Times in 2,951 Posts
Quote:
Originally Posted by laopi View Post
The DISPLAY has been set properly, and I type echo $DISPLAY to confirm it.
That does not confirm it's been set properly.

There are two kinds of shell variables -- environment variables, and local variables. Local variables aren't given to programs, but environment ones are.

To make sure a variable is an environment variable, do export VARIABLENAME

In this case, that would be export DISPLAY
Sponsored Links
    #5  
Old 01-07-2013
laopi laopi is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 10 January 2013, 2:51 PM EST
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Corona688 View Post
That does not confirm it's been set properly.

There are two kinds of shell variables -- environment variables, and local variables. Local variables aren't given to programs, but environment ones are.

To make sure a variable is an environment variable, do export VARIABLENAME

In this case, that would be export DISPLAY
export DISPLAY=localhost:0.0 is to set the DISPLAY, right? it is what I did.

peter
Sponsored Links
    #6  
Old 01-07-2013
Scott's Avatar
Scott Scott is online now Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 28 July 2014, 6:15 AM EDT
Location: Zürich
Posts: 8,432
Thanks: 328
Thanked 1,030 Times in 901 Posts
The display would be the name of the thing you want the thing you are displaying to go to. That would be attached to your computer, most likely in this case, the name of the computer your Cygwin is running on. But, to be honest, from your initial post, it's not at all clear what setup you have.
Sponsored Links
    #7  
Old 01-07-2013
laopi laopi is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 10 January 2013, 2:51 PM EST
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Scott View Post
The display would be the name of the thing you want the thing you are displaying to go to. That would be attached to your computer, most likely in this case, the name of the computer your Cygwin is running on. But, to be honest, from your initial post, it's not at all clear what setup you have.
When I run emacs under csh, everything is ok, after I type '/bin/bash' switch to bash shell, I type 'export DISPLAY=localhost:0.0' and 'echo $DISPLAY' to confirm the DISPLAY has been set properly, however, when I run emacs, I got the error.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help setting up XServer in Centos 5.4 mojoman UNIX for Dummies Questions & Answers 1 01-09-2010 06:18 PM
Xserver shamsul Solaris 1 06-01-2008 10:14 AM
Xserver big123456 UNIX for Advanced & Expert Users 6 12-06-2007 11:58 PM
xserver problem - hang tanvirscsa Solaris 0 09-28-2007 03:46 PM
Looking for recommendations for free Xserver umen UNIX for Dummies Questions & Answers 3 06-26-2006 09:14 AM



All times are GMT -4. The time now is 06:20 AM.