LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2004, 11:33 AM   #1
NNP
Member
 
Registered: Nov 2004
Distribution: Debian/Ubuntu
Posts: 156

Rep: Reputation: 30
Emacs problems with SuSe 9.1


I just installed Suse 9.1 pro. Emacs was not included in the default install so i installed it off the cd using Yast. It appeared to install fine but when i try to run it i get the following error...

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.


I have no clue whatsoever what any of this means or how i'd even begin trying to fix it. Can anyone suggest something?

Aswell as that, should I use Yast to install packages or the rpm commands from the command line. I heard that if you dont install rpm packages properly it can mess up the rpm database.

Thanks,
NNP
 
Old 11-14-2004, 12:39 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Jumping to conclusions here ... you're trying to
edit something in a terminal, su'ed to root, while
logged in as a normal user in X?

Try su -c "emacs /path/to/file"
Or
a) as nornal user do "xhost +localhost"
b) as root "DISPLAY=:0.0 emacs /path/to/file"

What you have run into is a quite basic
permissions problem, not emacs specific
at all ...


Cheers,
Tink
 
Old 11-14-2004, 01:35 PM   #3
NNP
Member
 
Registered: Nov 2004
Distribution: Debian/Ubuntu
Posts: 156

Original Poster
Rep: Reputation: 30
damn you, your right!


Just as a matter of interest, is what your saying that since i had su'ed to root the root account doesn't access programs installed in /usr/bin? i installed emacs into /usr/bin then shouldn't it be available to all users?
 
Old 11-14-2004, 01:41 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
It's not a matter of file-permissions ... emacs is
actually starting; what it wouldn't/couldn't do
is display anything on the other users' desktop.

You'd have the same "problem" (actually it's a
very sensible security default) with any other X
application that you start from root (or any other
user for that matter) ... some daft distro's (e.g. MDK)
will change that behaviour, though.


Cheers,
Tink
 
Old 11-14-2004, 02:08 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Actually, I believe that the Mandrake behavior is the same as what you described. I have Mandrake on my laptop and I will use kdesu to start a gui program as root.
 
  


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
installing emacs on SuSE 9.3 ljr2600 Linux - Newbie 2 06-23-2005 05:26 AM
emacs 21.4.1 gets segmentatino fault on SuSE 9.3 SKelem Linux - Software 5 06-20-2005 03:03 PM
emacs not working on SuSE 9.1 Pro monty Linux - Software 0 11-04-2004 04:48 PM
root emacs problems spuppett Linux - Newbie 2 04-13-2004 03:20 AM
Installing emacs on SuSE 9.0 bjb123 Linux - Software 1 11-14-2003 07:56 PM


All times are GMT -5. The time now is 06:25 AM.

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