LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-09-2007, 04:44 PM   #1
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 19.1 Xfce
Posts: 555

Rep: Reputation: 33
Unable to open emacs as root


All of a sudden I am unable to open the emacs editor as root. It will open OK as user but as root I get the following message:

Quote:
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.
Can anyone offer an explanation as to what this means and how I go about checking the DISPLAY environment etc. This is a new one on me
 
Old 01-09-2007, 05:12 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
First, 'emacs -d file' should work. Second, try running as ordinary user
Code:
xhost +127.0.0.1
before running emacs as root.
 
Old 01-09-2007, 05:26 PM   #3
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 19.1 Xfce
Posts: 555

Original Poster
Rep: Reputation: 33
Posted by raskin:
Quote:
Second, try running as ordinary user
Code:

xhost +127.0.0.1

before running emacs as root.
This has sorted it out. Many thanks

Mikie
 
Old 01-09-2007, 11:29 PM   #4
CuriouserAndCur
LQ Newbie
 
Registered: Oct 2004
Posts: 6

Rep: Reputation: 0
If you really need to run as root then do this:
#emacs -nw
You won't the x-windows version but it should be usable.
 
  


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
unable to open my NTFS drive unless im ROOT fuzzai Linux - General 5 02-03-2006 05:23 PM
unable to open apps when 'su'ing to root from user account ganja_guru Linux - Software 3 06-03-2005 10:51 AM
Kernel Panic - VFS unable to open root device JcB Slackware 17 10-30-2004 11:27 AM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM
Unable to open root (reiserfs) slaken Linux - General 3 01-29-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:23 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
Open Source Consulting | Domain Registration