LinuxQuestions.org
Help answer threads with 0 replies.
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 11-21-2004, 09:29 PM   #1
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Rep: Reputation: 15
X11 tunneling through OpenSSH Problem


I have searched everywhere for why this isn't working but alas no luck.

Ok, I have both my client and server set up with ssh, and they have public key authentication so I don't need my password to login to the server.

While I am on my desktop in a X session in fluxbox(client), i can ssh into the server and run a program like "xcalc" and it is forwarded to my machine, cool.

Now, what I want to do is tunnel the entire X display to my machine from the server. I found out that I need to set the display variable on the server and start a X server on the client and then run say fluxbox. So this is what I did.

X :1 & #starts X session on tty8
ssh server
export DISPLAY=:1 #sets display
fluxbox

But, I get a connection failed. I have tried everything for the DISPLAY i.e.:

:1
client:1
client:10.1
client:10.0
client:11.0
client:11.1
"don't change it"
etc.

And nothing works. Is there anything that I am missing here? Also on my machine i did:

xhost +server

I don't know if that was necessary but It didn't work anyway.

Anybody have any ideas?
 
Old 11-22-2004, 11:54 AM   #2
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
bump
 
Old 11-22-2004, 03:29 PM   #3
Present
Member
 
Registered: Jan 2004
Distribution: suse/slack/gentoo/lfs (not-in-that-order)
Posts: 284

Rep: Reputation: 30
are you sure you need x-server on the client? you are ahead of what i'm doing in our home/office (simple file/printer sharing), but i don't understand why two instances of server would make sense.

perhaps a guru can shed some light on your problem.

just curious if you are logging in as the same user on both systems? i would like to do that for several computers here in my office, but have not figured it out. if so, perhaps you might try only one login per user initially (across the entire network) to reduce possible problems (i have had difficulties if i try multiple logins with one username).

cheers, hope it works,
pres

Last edited by Present; 11-22-2004 at 03:30 PM.
 
Old 11-22-2004, 06:18 PM   #4
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
Thats the thing, I'm not sure. I'm just trying stuff that I find online, and none of it seems to work. I am logging in with the same username to the server, I don't know if the uid's are that same, maybe that is a problem. Hell, I don't know, I thought I was pretty much home free when I got x programs to be tunnelled but then I hit a wall. I am mostly just doing this to learn, so it isn't mission critical. The server is a friends machine, P 200, with a 40k upload so......ya.

I can play ksirtet from his system though!
 
Old 11-22-2004, 06:55 PM   #5
Present
Member
 
Registered: Jan 2004
Distribution: suse/slack/gentoo/lfs (not-in-that-order)
Posts: 284

Rep: Reputation: 30
have you tried setting up an account on the server which you only use for the remote connection? when i run samba (visitors with ms and need my printer), it helps to have an account they can login to on the server different than any current sessions on the server.

this may be a workaround only necessitated by my great ignorance, but seems to help. perhaps it would help in your case. i would also double check that you need server running on both. that seems a bit odd to me for some reason.

wish a guru would help us out here....
 
Old 11-22-2004, 07:32 PM   #6
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
Tried having a seperate user, just added a new one and I get the same error. Connection to x server failed. I tried not having another X running on /dev/tty8, still no go, same error. I am all out of ideas.
 
Old 11-22-2004, 07:45 PM   #7
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
Oh, Sweet! Hahah!

Ok, I got it working. The trick was I started an X server on /dev/tty8 (client), login to the server, I did it from /dev/tty2, I didn't do any exporting or anything. After I typed in fluxbox, I quickly switched to my running X server. And BAM! I now have a running fluxbox, running from the server, awesome.

Hey present, thanks alot man you got me thinking about some other ideas. If you get stuck feel free to send a question my way.

EDIT: Is there a better way of doing this though?

Last edited by IRIGHTI; 11-22-2004 at 07:59 PM.
 
Old 11-22-2004, 08:58 PM   #8
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Hey, maybe you can try this... add this to your .xinitrc, instead of your regular "fluxbox" or whatever.

#exec fluxbox
exec ssh -X -C -l username ssh.url.com 'exec fluxbox'

And by typing startx I guess it would load up fluxbox from the remote server automatically (of course assuming you don't need the password)

Last edited by 95se; 11-22-2004 at 09:00 PM.
 
Old 11-22-2004, 10:44 PM   #9
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
Oops I forgot something I did. I tried it again and it wouldn't work so I forgot to mention a critical command

X :1 &
export DISPLAY=:1 #this forwards the display i get from the server to the correct tty on my machine......forgot this.
ssh -X server
fluxbox
 
Old 11-22-2004, 10:56 PM   #10
Present
Member
 
Registered: Jan 2004
Distribution: suse/slack/gentoo/lfs (not-in-that-order)
Posts: 284

Rep: Reputation: 30
woot GW

nice .xinetrc idea 95se, will speed things up a lot if iright is going to be setting sessions regularly.

cheers
 
  


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
Bitchx SSH/Tunneling set-up (OpenSSH) lion paw Linux - Software 0 09-12-2005 02:45 PM
incoming tunneling or tunneling via a 3rd party? JustinHoMi Linux - Networking 1 04-15-2005 02:57 PM
openSSH and proFTPd HELP TUNNELING!!!!!!!!!! sc_3007 Linux - Networking 11 03-23-2005 01:44 PM
Problem in apache tunneling pymehta Linux - Networking 0 07-29-2004 03:26 AM
MySQL, OpenSSH and Tunneling IgD Linux - Security 1 09-30-2003 09:02 PM

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

All times are GMT -5. The time now is 09:31 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
Open Source Consulting | Domain Registration