Solved

emacs: Cannot connect to X server :0.0.

Posted on 2004-09-07
8
3,212 Views
Last Modified: 2013-12-27
I am using Red hat 9 which has been newly installed.I am having problem evoking "emacs" as the user.I tried through root and it worked fine.
 Whenever I start it as the user it gives me the following message :-

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
 
emacs: Cannot connect to X server :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.
 
Any help in this regards will be appreciated
0
Comment
Question by:bibinbhanu
8 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Is the user that is trying to start emacs the logged in user, or have you logged in as one user and 'su'd to another? The logged in user should be able to start emacs.
0
 

Author Comment

by:bibinbhanu
Comment Utility
i have logged in as the user , i.e. the user that is trying to start emacs is the logged in user.
0
 
LVL 20

Accepted Solution

by:
Gns earned 125 total points
Comment Utility
Yep. If you'd like all "local users" to be able to write to the X display, you could do "xhost + localhost" as the user who started the X session (root in all probability;-), then the user should have no problem:-).

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
Comment Utility
Ah, semi-crossing posts.

Could you quote the output from
xhost
here?

-- Glenn
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 20

Expert Comment

by:Gns
Comment Utility
And could you also quote the content of /etc/hosts here? Might be that you've done something silly to the "loopback address":-)

-- Glenn
0
 

Author Comment

by:bibinbhanu
Comment Utility
Thanks for the help Glenn, the emacs editor is working now.
:)
0
 
LVL 1

Expert Comment

by:michelandre
Comment Utility
I have the same problem
But it will work if I use from the start menu: "Run Command"
You don't have to be root but sometimes it helps, so do the following if you have to use root:
When the windows appears click "Options" and enter the user: "root" and his "password"
You have to give the full path to the command

Hope it will partially help

Michel-André
0
 
LVL 20

Expert Comment

by:Gns
Comment Utility
Has top do with the credentials you have michelandre,,, Since when you "Run..." you always do that as the user that started X, it'll always work like that;-).
The xhost + ... bit would help, but should only be performed in situations where you are comfortable with the local security/users;-);-)

-- Glenn
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now