Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mnorth

macrumors newbie
Original poster
Jul 25, 2008
8
0
When I SSH to a linux server, and try to open up an xterm, for example, I can't type anything in the xterm window. I've tried clicking on the window, keeping the cursor over the window while typing, trying to alt-tab to the xterm (it doesn't show up in the alt-tab application list), and nothing seems to work.

Anyone have an idea of what's going on?
 
What is the complete ssh command-line you are using?

I use:

ssh -X -C <username@hostname>

and all works fine. You probably will want to eliminate the -C if you are doing this over a lan - that's the command I use to ssh from my house to my office.
 
What is the complete ssh command-line you are using?

I use:

ssh -X -C <username@hostname>

and all works fine. You probably will want to eliminate the -C if you are doing this over a lan - that's the command I use to ssh from my house to my office.


Code:
ssh -X user@host
....log in.....
xterm &

I'm connecting to my server via SSH correctly, because I am able to get an xterm window to pop up on my mac. This also indicates that the DISPLAY variable is being set up correctly. The problem is, I can't type anything in the window.

The strange thing is, mouse input seems to be working fine (i.e., if I open up an emacs, I can use the file menu).
 
Sounds more like a problem with Linux side than the Mac side.
What is your default shell on the Linux side?
What is the DISPLAY variable set to?
What are the default args when one uses xterm?
What SSH Protocol are you using?
 
Sounds more like a problem with Linux side than the Mac side.
What is your default shell on the Linux side?
tcsh
What is the DISPLAY variable set to?
<the IP of my powerbook>:1
Like I said, the window pops up, I just can't type in it. This makes me think that X11 tunneling through SSH is working.
What are the default args when one uses xterm?
it's not just xterm, it's any X11 program I use on my mac. I have tried xclock, emacs, xemacs, gnome-terminal and xterm.
What SSH Protocol are you using?
I'm not sure what you're asking. I'm using SSH, which is a protocol.

I just tried something else:

I ran
Code:
/Applications/Utilities/X11.app/Contents/MacOS/X11
from my mac's command line, which creates an xterm LOCALLY (i.e., the program /usr/X11/bin/xterm on my mac).

I see the same behavior. I can't type anything in the X11 window. Therefore, it must be something in OS X, not on my linux machine.
 
Just to be sure, "X11Forwarding" is set to 'yes' on the Linux box, right?

Like I said, the window pops up, I just can't type in it. This makes me think that X11 tunneling through SSH is working.
Hmm.. is this Linux box slow to respond? A lot of router hops between you and it?

it's not just xterm, it's any X11 program I use on my mac. I have tried xclock, emacs, xemacs, gnome-terminal and xterm.
And what happens with xclock? Nothing is displayed in the window?

I'm not sure what you're asking. I'm using SSH, which is a protocol.

Actually, it's just a program. There are 2 protocol versions. You should see what version your Linux box is using. You can try forcing it to use protocol version 2 from your Mac with:

ssh -X2 username@whatever

You could also use some v flags to kick in verbose mode to see if it helps lead you to a cure.

I just tried something else:

I ran
Code:
/Applications/Utilities/X11.app/Contents/MacOS/X11
from my mac's command line, which creates an xterm LOCALLY (i.e., the program /usr/X11/bin/xterm on my mac).

I see the same behavior. I can't type anything in the X11 window. Therefore, it must be something in OS X, not on my linux machine.

Ah, no.. xterm is in /usr/X11/bin/xterm (or, if pre-Leopard, /usr/X11R6/bin/xterm)
 
Interesting.. what version of Mac OS X and where did you get/install X11 from?
Well I bought this computer in Jan of 2006 (1.67ghz powerbook g4), and I think OS 10.4.3 was the most recent OS at that time. I installed X11 at that time from my 10.4.3 install cd.

Since then I have bought leopard, and have installed the optional X11 tools included on the 10.5 install CD.
Code:
Ah, no.. xterm is in [b]/usr/X11/bin/xterm[/b] (or, if pre-Leopard, /usr/X11R6/bin/xterm)
Seems to agree with what I wrote above. Maybe I'm missing something.


Here's what I get when I try to run my LOCAL xclock (/usr/X11/bin/xclock)
Code:
Macintosh:~ mnorth$ /Applications/Utilities/X11.app/Contents/MacOS/X11 /usr/X11/bin/xclock 
X11.app: main(): argc=2
	argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11
	argv[1] = /usr/X11/bin/xclock
X11.app: Could not connect to server (DISPLAY="/tmp/launch-IKdWWz/:0", unsetting).  Starting X server.
X11.app: Launching /usr/X11/bin/startx:
	argv[0] = /usr/bin/login
	argv[1] = -fp
	argv[2] = mnorth
	argv[3] = /bin/sh
	argv[4] = -c
	argv[5] = /usr/X11/bin/startx
Last login: Tue Oct 28 13:06:15 on ttys000
font_cache: Scanning user font directories to generate X11 font caches
font_cache: Updating FC cache
xauth:  creating new authority file /Users/mnorth/.serverauth.506
xinit: Detected Xquartz startup, setting CFProcessPath=/Applications/Utilities/X11.app/Contents/MacOS/X11

X11.app starting:
Xquartz server based on X.org Release 7.2, built on 2007924
Check-in failed: Permission denied
font_cache: Done
 
Looks like you're doing this from inside Terminal.app?

Just open the X11 app and then type in xclock. Does it open properly?
 
Looks like you're doing this from inside Terminal.app?

Just open the X11 app and then type in xclock. Does it open properly?

When I execute X11.app via double click, it doesn't open properly.

I'm downloading a new XQuartz package, to see if that fixes my problem.
 
Weeeellll... my X11 runs fine and I haven't updated it. Dunno what to say there. So, it's sorted for you now, or still downloading?
 

Attachments

  • X11.jpg
    X11.jpg
    47.4 KB · Views: 649
Weeeellll... my X11 runs fine and I haven't updated it. Dunno what to say there. So, it's sorted for you now, or still downloading?

My Xquartz was built on 9-24-2007, so it looks like mine is a little older than yours. Anywho, still downloading, and I appreciate the help.

EDIT:

It worked, and it's a documented issue (via the discussions.apple.com link I posted above). Thanks again.
 
My Xquartz was built on 9-24-2007, so it looks like mine is a little older than yours.

Ah, unless you specifically selected X11 as an optional install in the Leopard installation process, that's probably the old version from Tiger, which (IIRC) doesn't work worth a **** with Leopard.

Glad you've got it working!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.