LinuxQuestions.org
Visit Jeremy's Blog.
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 08-12-2008, 01:20 AM   #1
darthaxul
Member
 
Registered: Aug 2008
Distribution: Devuan; Gentoo; FreeBSD
Posts: 236

Rep: Reputation: 19
ssh x forward session fails


I enabled the X11forwarding yes
also enabled the other options

ssh -X <user>@<host>
export DISPLAY=localhost:0.0
export XAUTHORITY=/home/<user>/Xauthority

then i try xclock or xcalc and nothing works
anyone got any solutions?
 
Old 08-12-2008, 01:48 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Does it work with ssh -Y instead of -X? If so, there's some mis-match with the X11 security settings.
 
Old 08-12-2008, 03:20 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
If you enabled X11forwarding in the configuration file, you don't need the -X option. Also you have not to set DISPLAY and XAUTHORITY upon connection, since it should be done automatically for you. Try to connect with no option, then verify the DISPLAY variable and try to launch a light X application, for example:
Code:
ssh user@host
echo $DISPLAY
xclock
 
Old 08-12-2008, 04:31 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I think that you still need the -X option if you mean that you allowed X11forwarding in /etc/ssh/sshd_config on the server. Don't use the DISPLAY=":0.0" line. Ssh will set it to someting like "localhost:10.0".
 
Old 08-12-2008, 02:01 PM   #5
darthaxul
Member
 
Registered: Aug 2008
Distribution: Devuan; Gentoo; FreeBSD
Posts: 236

Original Poster
Rep: Reputation: 19
still no go

I also changed the Xwrapper.config to allow anyone to start x11.

trying xclock it says "error:cant open display"
trying startx it hangs at "[config/hal] couldnt initialise context: (null) ((null))"

it appears to start x session on the remote monitor but i want it to be on my screen so how do I make the display go back to my machine?

Last edited by darthaxul; 08-12-2008 at 02:05 PM.
 
Old 08-12-2008, 02:52 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The X server doesn't need to be running on the ssh server. Certain components may need to be installed however if the clients need it. You can have the server running in init level 3 however (debian, Ubuntu & slackware may use run level 1).

How are you trying to launch the program.
ssh -X user@host /path/to/program
should work OK. You will need port 22 open on the server and X11 forwarding enabled in /etc/ssh/sshd_config. If the client is running windows, you can install Cygwin/X and have an X server running on the client.

X is a bit different in that the X server runs on the client. The X client is the program that is running on the server.
 
  


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
KDE Session Not Carried forward swamprat Linux - Desktop 1 11-21-2007 01:19 PM
Thunderbird forward from filter fails BCarey Linux - Software 3 02-07-2007 01:02 PM
ssh -> perl -> spawn background proces hangs ssh session rhoekstra Programming 2 04-25-2006 01:05 AM
xfce4-session fails to save session ! OneManArmy Debian 0 12-10-2004 02:14 PM
IPTABLES Forward ssh session wkuk Linux - Security 2 05-21-2004 07:41 AM

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

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