LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh remote desktop - xserver config for x11 forwarding (https://www.linuxquestions.org/questions/linux-networking-3/ssh-remote-desktop-xserver-config-for-x11-forwarding-424840/)

b345713 03-14-2006 04:29 PM

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

Darin 03-14-2006 05:15 PM

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.

spooon 03-14-2006 06:34 PM

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

jiml8 03-14-2006 10:41 PM

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.

b345713 03-15-2006 10:51 AM

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

spooon 03-15-2006 03:44 PM

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.

mrclisdue 03-15-2006 04:14 PM

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,


All times are GMT -5. The time now is 06:05 AM.