LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-14-2006, 04:29 PM   #1
b345713
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Rep: Reputation: 0
ssh remote desktop - xserver config for x11 forwarding


Hello all,

I'm running fedora 4 (and cygwin under windows on the other and I get similar errors on both) and just configured ssh for remote access!

My question regards x11 forwarding setup!

When I establish my ssh connection through mindterm's or appgate's online java applets I have no difficulty, yet when I try running startx to get a remote desktop manager going which is my real objective, it reports a fatal server error saying server is already active for display 0!

It then says that if x is no longer running I should remove /tmp/.X0-lock and start again!

if ii try xinit I get the very same message!

If I try - startkde - i get the following:

X connection to localhost:10.0 broken (explicit kill or server shutdown).
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X connection to localhost:10.0 broken (explicit kill or server shutdown).
startkde: Starting up...
ksplash: Fatal IO error: client killed
kded: Fatal IO error: client killed
DCOP aborting call from 'anonymous-21770' to 'kded'
kdeinit: Fatal IO error: client killed
kdeinit: sending SIGHUP to children.
klauncher: Exiting on signal 1
kdeinit: sending SIGTERM to children.
kdeinit: Exit.
Warning: connect() failed: : No such file or directory
ksmserver: Fatal IO error: client killed
startkde: Shutting down...
Warning: connect() failed: : No such file or directory
Error: Can't contact kdeinit!
startkde: Running shutdown scripts...
startkde: Done.


and with the - gnome-session - command I get:

The application 'gnome-session' lost its connection to the display localhost:10.
0;
most likely the X server was shut down or you killed/destroyed
the application.


I first thought (wrongly) it had something to do with creating a tunnel for x so I created one from 6000 to 127.0.0.1:6000 without luck

I then tried messing with the allowed hosts so i tried the command:

xhosts +, without sucess!

What am I doing wrong?

Do I need to reconfigure the xserver to listen for remote connections somehow? How can I do that!

Note: Yes I do have x11 forwarding yes in my sshd_config!

Thanks in advance for your time, and pardon me for my incorrect english!

Best regards

A
 
Old 03-14-2006, 05:15 PM   #2
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally Posted by b345713
...through mindterm's or appgate's online java applets...
from appgate's web site FAQ
Quote:
I can't get the tunnels to work in the applet.
You can use tunnels only if you are running a signed applet, or have disabled the security restrictions put on applets by the browser/appletviewer.

These are java applets in a browser? Have you tried it with a stand alone ssh program, such as openssh or putty or even another Linux machine? I would suggest verifying that it works with a real ssh client and when you know it works, you can figure out what to set on the java applet.
 
Old 03-14-2006, 06:34 PM   #3
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by b345713
When I establish my ssh connection through mindterm's or appgate's online java applets I have no difficulty, yet when I try running startx to get a remote desktop manager going which is my real objective, it reports a fatal server error saying server is already active for display 0!
It doesn't work that way. The whole point of X forwarding is that it forwards X to your local X server. Running "startx" only relates to the remote X server (which controls the display on the remote machine), which is completely irrelevant, so don't do that.

I understand you are connecting from Cygwin to Linux?

What you should do is:
* in Cygwin, do "startx" to start your local X server
* in the xterm, do "ssh -Y user@host"
* then you can run X apps and it should work

Last edited by spooon; 03-14-2006 at 06:37 PM.
 
Old 03-14-2006, 10:41 PM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
You didn't specify which is your client and which is your server. I presume you want the Windows box to be the client. In this case, you need to download and install an X server for cygwin. I recommend (and use) Cygwin/X http://x.cygwin.com

I use this config to establish X sessions on my WinXP laptop, communicating with a Linux system. I works very well.
 
Old 03-15-2006, 10:51 AM   #5
b345713
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
You are right jiml8! I wasn't clear in my exposition!

Actually I'm using both FC4 and Cygwin as servers at home and I tried accessing both from localhost through the regular terminal console and trough the web based java applets (which after spoon's reply seems really dumb) and from work through a proxy using java ssh applets with x11 forwarding activated!

At work I have winxp and from what I understood from spoon's words of wisdom I need an xserver at work to forward my xsession! Is this accurate? (When I connect to cygwin I get an x11 forward error but when I connect o FC4 I don't - Any ideas as to why?). If so them maybe my best solution would be to use vnc!

I tried setting up a tunnel to bypass the proxy (yes I know that if work security is set in this way I probably should not try it, but please forget about that part) to my cygwin machine, which is also running tightvnc and I managed something!

I opened my browser at localhost (work's localhost not home) and the tunnel was created as I got the rfb 003.003 message which I think means the server is up! Yet when I tried using the viewer binary app to connect through the tunnel it said a connection to the server could not be established!

As you probably know tightvnc comes with 2 parts a java viewer and the main rfb! Did I establish the tunnel the wrong way around (i.e. to the main instead of to the java viewer). Do I need to establish 2 tunnels (1 for the java viewer and one for main?). Should it not work with the viewer binary connecting to main?

With FC4 vnc I managed to connect the vnc viewer from home's localhost to the rfb port and I got the rfb 003.007 (different vs I suppose) message when I opened my browser! Does tightvnc work in a different manner from FC4 vnc?

Thanks a lot for your time + all the best

A
 
Old 03-15-2006, 03:44 PM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by b345713
At work I have winxp and from what I understood from spoon's words of wisdom I need an xserver at work to forward my xsession! Is this accurate?
Yes. If you need an X server on Windows, use either Cygwin/X (the X server in Cygwin) or Xming (the same X server without Cygwin).

Quote:
Originally Posted by b345713
(When I connect to cygwin I get an x11 forward error but when I connect o FC4 I don't - Any ideas as to why?).
In /etc/sshd_config on the server, make sure "X11Forwarding" is set to yes.
 
Old 03-15-2006, 04:14 PM   #7
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
if i may jump in here, there's a step-by-step tutorial i used long ago to establish x over ssh, in lieu of vnc, in days gone by:

http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html

better late than never, i suppose....

cheers,
 
  


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
ssh remote desktop - xserver config for x11 forwarding b345713 Linux - Newbie 1 03-14-2006 06:38 PM
X11 forwarding over SSH SirSlappy Linux - Networking 1 10-18-2005 01:37 PM
ssh forwarding+remote desktop Metroid Linux - Networking 2 06-23-2004 03:14 PM
ssh: x11 forwarding problems Halz Linux - Software 1 06-25-2002 03:27 AM
Port forwarding and remote X11 sessions lfabiani Linux - Networking 6 04-01-2002 06:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:51 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