LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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: Gentoo; Funtoo
Posts: 205

Rep: Reputation: 18
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: 69
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
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
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
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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: Gentoo; Funtoo
Posts: 205

Original Poster
Rep: Reputation: 18
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
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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


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
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


All times are GMT -5. The time now is 06:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration