Results 1 to 10 of 10
Hello,
When I do a ssh on my machine and I try to run an application, it gives me the following error :
cannot connect to x server.
What can ...
- 04-14-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 6
cannot connect to x server
Hello,
When I do a ssh on my machine and I try to run an application, it gives me the following error :
cannot connect to x server.
What can I do?
Thank you for your help
- 04-14-2010 #2
You are logging into this machine from another via ssh? The address of the server has to be preceded with either -Y or -X. Log into the server with:
*Example*
Then, run the command for the app or utility you wish to run. If -Y doesn't work, try -X. If you still cannot get X forwarded you will likely have to edit /etc/ssh/sshd_config. Open sshd_config on the server with your favourite editor and look for:Code:ssh -Y bob@bobsnetwork
...and change to:Code:#X11Forwarding no
Restart sshd on the server or reboot and X forwarding should then be enabled.Code:X11Forwarding yes
Last edited by Dapper Dan; 04-14-2010 at 12:52 PM.
- 04-14-2010 #3Just Joined!
- Join Date
- Apr 2010
- Posts
- 6
I've connected with -X but I always have the same error.
My sshd_config already had X11Forwarding to yes.
- 04-14-2010 #4
Did you try -Y ? Are you by chance trying to run the application as root or su?
- 04-14-2010 #5Just Joined!
- Join Date
- Apr 2010
- Posts
- 6
I tried -Y but it does the same.
No I am not running the application as root.
- 04-14-2010 #6
Perhaps a few more dumb questions... Is the X server actually running on the server machine? Are you trying to run an application remotely or are you trying to run a desktop environment from the server to a client machine? Please give more detail about what you are attempting to do and the commands you are using to do it.
- 04-15-2010 #7Just Joined!
- Join Date
- Apr 2010
- Posts
- 6
The X server isn't actually running on the server machine.
I'm doing a ssh -X mymachine and then I'm trying to run my application remotly.
- 04-15-2010 #8
Then there's your problem. You cannot forward X from a server machine to a client if X isn't running on the server.
- 04-15-2010 #9Just Joined!
- Join Date
- Apr 2010
- Posts
- 6
but when I run X server on my server, it doesn't change anything. I always have my error.
- 04-15-2010 #10
Is this a headless server or does it have a monitor? If a monitor, are you able to bring up xwindows from it and it works satisfactorily?


Reply With Quote
