emacs on feora core 2

Posted on 2004-12-01
Last Modified: 2013-12-15
I just intall fedora core 2 but anytime i am trying to open a file using emacs  =====> emacs myfile,
i am getting the the error message below. What could i do.
===================ERROR MESSAGE ===========================
crux:/afs/> emacs
Xlib: connection to "localhost:11.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
emacs: Cannot connect to X server localhost:11.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.
Question by:komlaaa
    LVL 40

    Expert Comment

    Is the user you are when invoking emacs the same user that logged in? If that's not the case you'll see this error.
    LVL 38

    Expert Comment


    crux:/afs/> xhost +; emacs -d `echo $DISPLAY`

    LVL 38

    Accepted Solution


       Is the issue resolved?

       If you use ssh from the Fedora Core 2 (A) login to other Unix/Linux box (B) , then make sure you enable ForwardX11
    --- /etc/ssh/ssh_config ---
    ForwardX11 yes

    and ssh into FC2 (A) from other box (B), check
    --- /etc/ssh/sshd_config ---
    X11Forwarding yes

      The "xhost +" is run on the machine in fromt of you.
    Say you are in front of FC2 (A), before you ssh into (B), run "xhost +" on (A) first.
    ssh -X <remote machine name or IP>

       Besides, remove ~/.Xauthority  at FC2 (A) and (B) then log out and log bcak in (.Xauthority will
    be recreated).


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now