Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] Problems with ssh X forwarding with Mac OSX

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
MighMoS
Guru
Guru
User avatar
Posts: 416
Joined: Thu Apr 24, 2003 2:20 pm
Location: @ ~
Contact:
Contact MighMoS
Website

[SOLVED] Problems with ssh X forwarding with Mac OSX

  • Quote

Post by MighMoS » Sat May 22, 2004 11:33 pm

I'm not sure entirely where the problem is, as I've never done this before. Let me breifly describe my setup. At home, I have a gateway (running X forwarding), and my workstation (also with X forwarding enabled in ssh). I am trying to connect and run apps from my workstation from a Mac OSX machine, accross the internet. I have connected with the -X switch in both cases.

However, when I ssh to my gateway, then to my workstation, and try to launch any graphical program, I get an error about "could not open display" or "display unset". This mac does have X11 protocols installed, but the gateway does not (even though it has X11 forwarding). Does my gateway need X11 installed to forward the traffic, even if its originating from my workstation? Or is it a problem w/ the Mac?

Please help me as iChat is driving me crazy! I can't take it!! ;) ;) Thankyou for your help.
Last edited by MighMoS on Sun May 23, 2004 1:34 am, edited 1 time in total.
jabber: MighMoS@jabber.org

localhost # export HOME=`which heart`
Top
boroshan
l33t
l33t
User avatar
Posts: 730
Joined: Wed Apr 16, 2003 8:39 pm
Location: upside down
Contact:
Contact boroshan
Website

  • Quote

Post by boroshan » Sat May 22, 2004 11:51 pm

try editing /etc/ssh/sshd_config and setting AllowTcpForwarding and X11Forwarding to "yes". Make sure they're both uncommented and run /etc/init.d/sshd restart

fixed it for me, anyway
Don't let THEM immanentize the Eschaton!
Top
MighMoS
Guru
Guru
User avatar
Posts: 416
Joined: Thu Apr 24, 2003 2:20 pm
Location: @ ~
Contact:
Contact MighMoS
Website

  • Quote

Post by MighMoS » Sun May 23, 2004 12:29 am

Ok, so far, its not working. I've set up my gateway to forward port 22 straight through to my workstation, so i know its not the problem.
Here's what I type to connect:

Code: Select all

ssh [my.i.p.address] -X
Then it asks me for my password, so i know that went ok. I enter my password, and then I'm then logged in as who I want to be, and can execute console commands just fine. But when trying to launch a program I get this:

Code: Select all

LocalHost% gaim

(gaim:4690): Gdk-CRITICAL **: file gdkdisplay-x11.c: line 360 (gdk_display_get_name): assertion `GDK_IS_DISPLAY (display)' failed

** (gaim:4690): WARNING **: cannot open display: unset
LocalHost%
an echo $DISPLAY shows nothing, could that be the problem? My workstation /etc/ssh/sshd_config:

Code: Select all

bash-2.05b# grep -v "^#" /etc/ssh/sshd_config | grep '.'
Port 22
Protocol 2
ListenAddress 192.168.0.3
PermitRootLogin no
UsePAM yes
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
TCPKeepAlive yes
UseLogin no
Compression yes
PidFile /var/run/sshd.pid
Subsystem       sftp    /usr/lib/misc/sftp-server
Would I need to show the mac's (local) system's /etc/ssh/ssh_config file as well?
jabber: MighMoS@jabber.org

localhost # export HOME=`which heart`
Top
DrKayBee
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 143
Joined: Tue May 11, 2004 3:27 pm
Location: Columbus, OH

  • Quote

Post by DrKayBee » Sun May 23, 2004 1:15 am

isn't it supposed to be

Code: Select all

ssh -X user@xxx.xxx.xxx.xxx 
rather than

Code: Select all

ssh xxx.xxx.xxx.xxx -X 
(note the position of the X forwarding flag. I may be wrong though...

KB
Top
MighMoS
Guru
Guru
User avatar
Posts: 416
Joined: Thu Apr 24, 2003 2:20 pm
Location: @ ~
Contact:
Contact MighMoS
Website

  • Quote

Post by MighMoS » Sun May 23, 2004 1:22 am

Moving the -X flag didn't affect anything. I'm sure I'm going to kick myself once I find out the answer. Question, when you forward x11 sessions, is the $DISPLAY variable set? Because mine isn't.
jabber: MighMoS@jabber.org

localhost # export HOME=`which heart`
Top
MighMoS
Guru
Guru
User avatar
Posts: 416
Joined: Thu Apr 24, 2003 2:20 pm
Location: @ ~
Contact:
Contact MighMoS
Website

  • Quote

Post by MighMoS » Sun May 23, 2004 1:33 am

HAH! I knew there had to be an easy answer. Under MacOSX its not enough for the X11 libraries to be installed. I found an X11.app file, and running it popped up the X logo and xterm. Running ssh from there <i>did</i> enable X11 forwarding. And now, I can finally use all my wonderful linux programs (as despite what apple says, I can't get anything worth running working under OSX). Yayness.

Thankyou for your help though, it was very much appriciated. (I'm sure my school will love this too :twisted: )
jabber: MighMoS@jabber.org

localhost # export HOME=`which heart`
Top
DrKayBee
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 143
Joined: Tue May 11, 2004 3:27 pm
Location: Columbus, OH

  • Quote

Post by DrKayBee » Sun May 23, 2004 2:10 am

Chee that was a simple one!
I remember having spent a long time doing all kinds of xhost+ and what not in the terminal before firing up X11.app - glad it worked out easy.
KB
Top
eivinn
Apprentice
Apprentice
User avatar
Posts: 219
Joined: Wed Jul 10, 2002 10:49 am
Location: Norway
Contact:
Contact eivinn
Website

  • Quote

Post by eivinn » Sat Oct 15, 2005 2:13 pm

Have you found out how to run a remote window manager through the X11.app? I would like to run fluxbox in a window, but haven't had any luck yet. I can run normal applications yes, but I would like to have them all bundled into one window.
Top
bzhao
n00b
n00b
Posts: 1
Joined: Sat May 12, 2012 3:22 pm

  • Quote

Post by bzhao » Sat May 12, 2012 3:42 pm

eivinn wrote:Have you found out how to run a remote window manager through the X11.app? I would like to run fluxbox in a window, but haven't had any luck yet. I can run normal applications yes, but I would like to have them all bundled into one window.
use rdesktop command as a client and xrdp server for remote machine
Top
Post Reply

9 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic