LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   emacs Xserver issue (https://www.linuxquestions.org/questions/linux-newbie-8/emacs-xserver-issue-837048/)

bluesharks 10-08-2010 06:11 PM

emacs Xserver issue
 
Hi I am newbie and i dont know what the problem is. I ssh on to a linux machine and
setenv DISPLAY mylocalhostname:0
emacs temp.temp

emacs: Cannot connect to X server mylocalhostname: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.

Could someone help me fix this.

Tinkster 10-08-2010 06:42 PM

More input, please :}

What machine are you ssh-ing from?
Is it a Mac? If it is, does it have X running?
If it does, did you run "xhost +<remote_box>"?
Did you enable X11 forwarding on the remote host?
If you did - what results do you get when you invoke
ssh with -X (or -Y)?


Cheers,
Tink

bluesharks 10-09-2010 01:06 AM

Thank you for your reply.
I ssh from a Redhat client machine to a server(Redhat) which has Xserver running on server machine.
I have tried enabling X11 Forwarding on the client machine too.How do i know if Xserver is enabled on the client machine. Do i need to edit any config files for this.

I tried ssh using - X and -Y option too. But i still get the same error.Could you let me know where am i going wrong.

Tinkster 10-09-2010 01:25 AM

Quote:

Originally Posted by bluesharks (Post 4122153)
Thank you for your reply.
I ssh from a Redhat client machine to a server(Redhat) which has Xserver running on server machine.
I have tried enabling X11 Forwarding on the client machine too.

Is it enabled on the server?

Quote:

Originally Posted by bluesharks (Post 4122153)
How do i know if Xserver is enabled on the client machine. Do i need to edit any config files for this.

If you're in a GUI you have xserver running ...
If your client is command-line only you're out of luck.

Quote:

Originally Posted by bluesharks (Post 4122153)
I tried ssh using - X and -Y option too. But i still get the same error.Could you let me know where am i going wrong.

Hard to tell at this stage.


Cheers,
Tink

bluesharks 10-09-2010 01:06 PM

Yes it is enabled on the server as when i had my old computer i was able to do that.

I am doing it from GUI.
Is there a any alternative way to get this fixed or do i have to install any packages?

Tinkster 10-09-2010 03:44 PM

In that case I'd say the "antique" approach w/ "export DISPLAY"
in the ssh session on the "server" and xhost +<server> on your
local workstation should just work (unless X11 traffic is being
blocked by a firewall).


Cheers,
Tink


All times are GMT -5. The time now is 10:12 AM.