LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-08-2010, 06:11 PM   #1
bluesharks
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
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.
 
Old 10-08-2010, 06:42 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 10-09-2010, 01:06 AM   #3
bluesharks
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 10-09-2010, 01:25 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by bluesharks View Post
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 View Post
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 View Post
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
 
Old 10-09-2010, 01:06 PM   #5
bluesharks
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
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?
 
Old 10-09-2010, 03:44 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
  


Reply



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
Emacs Issue deibertine Linux - Newbie 25 06-13-2009 06:31 PM
XServer Issue cmschube Red Hat 2 11-07-2007 03:35 PM
xserver-xfree86: Xserver could not start on my ATI-radeon video card Shankarrajus Debian 2 07-17-2006 07:00 AM
Installation Issue- xserver-xorg Configuring darthbob88 Ubuntu 1 03-15-2006 07:25 AM
Newby w/crontab or emacs issue vrogers64 Mandriva 3 01-20-2005 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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
Open Source Consulting | Domain Registration