LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-17-2008, 03:44 PM   #1
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Rep: Reputation: 30
SSH won't run X forwarding


In attempting to SSH forward X from a remote Linux X server to a Local one I have encountered
a few problems. I have setup SSH properly and can SSH from any machine on my LAN to any other.
Sftp and SCP work properly also.

I have tried to SSH -X user@machine from within kconsole on a machine already running KDE.
Connection is made, but when I run "startx" (on the remote server), I get a slew of info messages
and the process hangs (in kconsole). I just don't get any output on my screen. Below, is a partial
output from Xorg.0.log on the remote (server):

Code:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/chipper:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.13 i686 [ELF] 
Current Operating System: Linux chipper 2.4.31 #9 Fri May 16 11:12:21 CDT 2008 i686
Build Date: 11 September 2005
	Before reporting problems, check http://wiki.X.Org
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat May 17 09:07:42 2008
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)

.......
This doesn't really tell me anything since there are no FATAL's in the log and KDE
appears to be running on the remote machine (server).

sshd_config on the remote server is set up like this:
Code:
X11Forwarding  yes
X11DisplayOffset 10
X11UseLocalhost yes
ssh_config on the local machine contains the following:
Code:
ForwardAgent yes
ForwardX11 yes
I am not trying to export the display variable on the remote server since SSH is
supposed to care of that internally according to documentation.

I have read that I should not start KDE on the local machine, since it is a resource hog
but simply try to start the X server and an xterm and SSH to the remote server from there.
However, I have not been able to setup xinit properly to run only an xterm. I have tried
to use a default by removing "start kde" from my ~/.xinitrc but this results in a fatal
error:

Code:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/amdk7:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Slackware 12.0 Slackware Linux Project
Current Operating System: Linux amdk7 2.6.21.5-amdk7 #6 Fri May 16 11:23:17 CDT 2008 i686
Build Date: 09 May 2007
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat May 17 10:30:38 2008
(==) Using config file: "/etc/X11/xorg.conf"
(II) module already built-in
(II) module already built-in
(II) module already built-in
FATAL: Module mga not found
(EE) MGA(0): [drm] DRIScreenInit failed. Disabling DRI
(EE) AIGLX: Screen 0 is not DRI capable
I then use Ctrl-C to exit.

'unable to open socket for inet6" isn't causing the problem so just ignore it.

The documentation on starting an xterm with the X server seems muddled to me, so
if anyone can clear it up I would appreciate it.

I'm just not sure why two systems which run 'X' without problems cannot connect
through SSH and employ X11 forwarding as advertised. Perhaps I'm just doing it
wrong, but other posts on this site would suggest I am doing it properly.

Any suggestions?
 
Old 05-17-2008, 05:34 PM   #2
rlhartmann
Member
 
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
startx is a script to start the X server on a local console, you don't want to run that
remotely. If you've used the ssh -X server, try running a command like konqueror, firefox, or
xterm, or any other command that starts a client (a window). These should client programs should work if everything is configured OK.
 
Old 05-17-2008, 06:35 PM   #3
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Original Poster
Rep: Reputation: 30
All right! Konqueror and Firefox worked OK but when
I closed them, X server still seemed to be running. I exited
the secure shell login, but it did not exit gracefully.
The system seemed to hang. Fortunately, I could just close
the shell on the local machine. Isn't X server supposed
to end once a program relying on it is closed?

What about simply starting the X server with an xterm
(on the local machine) and doing essentially the same
thing? I suspect I do not have to load all of KDE and would
prefer not to. How do I start the local X server with just
an xterm?

Why doesn't startx work on the remote server? I've read
several posts in this forum that state that that's exactly
what they do.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 X forwarding krusty_lab AIX 10 01-02-2008 10:36 AM
SSH X forwarding discala Linux - Networking 8 01-05-2007 07:05 AM
SSH and X forwarding? SlowCoder Linux - Newbie 8 05-28-2006 11:24 PM
X forwarding via SSH bd1308 Linux - Software 4 08-30-2005 08:13 PM
ssh and X-forwarding Björneborg Linux - Networking 2 02-19-2004 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration