LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2004, 02:08 AM   #1
cuzzle
Member
 
Registered: Sep 2003
Location: Richland, WA
Distribution: Suse 9.2
Posts: 42

Rep: Reputation: 15
emacs won't load as root


I am using Suse 9.0 and when i run emacs from the terminal as a normal user it works fine, but if I try and run it as super user (to edit a config file) then i get the following error:

# emacs
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.

What do I need to do to get it to work? I love emacs and like to use it to do all my editing. I'm having to use vi right now and I just don't get along with it very well.
 
Old 03-05-2004, 04:14 AM   #2
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

Rep: Reputation: 37
You are not allowed to access the X server if you are another user (in this case root). To allow this, then before you go into su mode, type "xhost +". Alternatively, run it any other way (eg. I use KDE and have an app starter in my panel so I can type it there, or press Alt-F2 and type it there. You could have a desktop link too, as long as you run it somehow)
 
Old 03-05-2004, 04:20 AM   #3
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

Rep: Reputation: 37
Actually, replying to your post made me check out some emacs options. An easier (and more secure) way of doing it is to use the command:
emacs -nw filename
to run emacs in the console window.
 
Old 03-05-2004, 12:49 PM   #4
cuzzle
Member
 
Registered: Sep 2003
Location: Richland, WA
Distribution: Suse 9.2
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks. I'll try it out when I get home.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't run emacs as root resist_r Linux - General 1 10-07-2005 05:54 PM
cant use emacs in root any more? |2ainman Linux - General 1 04-19-2004 09:07 PM
root emacs problems spuppett Linux - Newbie 2 04-13-2004 02:20 AM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM
Could not load root fs abhijitb Linux - Hardware 7 06-03-2003 04:24 PM


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

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