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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-21-2004, 09:29 PM
|
#1
|
Member
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121
Rep:
|
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?
|
|
|
11-22-2004, 11:54 AM
|
#2
|
Member
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121
Original Poster
Rep:
|
bump
|
|
|
11-22-2004, 03:29 PM
|
#3
|
Member
Registered: Jan 2004
Distribution: suse/slack/gentoo/lfs (not-in-that-order)
Posts: 284
Rep:
|
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.
|
|
|
11-22-2004, 06:18 PM
|
#4
|
Member
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121
Original Poster
Rep:
|
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!
|
|
|
11-22-2004, 06:55 PM
|
#5
|
Member
Registered: Jan 2004
Distribution: suse/slack/gentoo/lfs (not-in-that-order)
Posts: 284
Rep:
|
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....
|
|
|
11-22-2004, 07:32 PM
|
#6
|
Member
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121
Original Poster
Rep:
|
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.
|
|
|
11-22-2004, 07:45 PM
|
#7
|
Member
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121
Original Poster
Rep:
|
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.
|
|
|
11-22-2004, 08:58 PM
|
#8
|
Member
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740
Rep:
|
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.
|
|
|
11-22-2004, 10:44 PM
|
#9
|
Member
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121
Original Poster
Rep:
|
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
|
|
|
11-22-2004, 10:56 PM
|
#10
|
Member
Registered: Jan 2004
Distribution: suse/slack/gentoo/lfs (not-in-that-order)
Posts: 284
Rep:
|
woot GW
nice .xinetrc idea 95se, will speed things up a lot if iright is going to be setting sessions regularly.
cheers
|
|
|
All times are GMT -5. The time now is 09:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|