LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 09-13-2006, 02:48 PM   #1
Asmor
Newbie
 
Registered: Sep 2006
Posts: 0

Rep: Reputation: 0
xterm doesn't seem to work, using cygwin/x


Hey, sorry if this is not the right place to be asking this sort of thing...

Anyways, I'm a student working for my college's CS department, and right now I've been asked to try and figure out how to get cygwin working. I've got practically no Cygwin experience. We're running Windows XP (yeah, I know, not Linux. Like I said, sorry if this is the wrong place to ask)

As near as I can tell, it seems like something with our installation may have been botched. I wasn't involved with installing it, and I'm told that 1: It was installed from a CD and 2: Whoever installed it basically just kept hitting next. So I'm assuming everything is at its default settings. I've been told reinstalling isn't a good idea, because it takes an extraordinarily long time.

So anyways, xterm windows never come up. I've tried running the startxwin.bat, and I get the tray icon, and both Xwin.exe and xterm.exe show up in the processes list in the task manager, but there is nothing [obvious] I can do to get the xterm window which I assume I should be seeing.

I've also tried opening the bash prompt command line thingie and starting xterm from there, but it says it can't open display. I try to set DISPLAY=127.0.0.1:0 but that doesn't have any effect (I get same error and when I echo $DISPLAY it's a blank line).

I've tried ssh-ing to our server (err, client, I guess? Server meaning the remote machine) and am able to log in there, and that works. I am even able to set the DISPLAY variable and export it, although then I get a totally different error. If I set the display to my IP address and, say, type in xterm& or xclock&, it seems like it accepts the command fine and says something like "[1] 2684", but nothing shows up. A few minutes later if I just leave it there, it tells me that it "Can't open display: [my IP address]:0"

So, does anyone have any ideas about what I should do? The computer's frozen, so I can't restart, but I can muck around with the registry and such with impunity. Like I said, this is entirely new territory for me, so even if you could suggest some questions I should be asking, it would be much appreciated.

Last edited by Asmor; 09-13-2006 at 02:51 PM.
 
Old 09-13-2006, 03:02 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Not real familiar with Cygwin/X. We have successfully installed Xming which is based on Cygwin and it DOES let us open X windows from our UNIX/Linux servers to our XP desktops.

A few things:

Don't put the ampersand (&) after xterm when youu login to the server. This puts it in the background so all you are seeing is the PID it started and its eventual failure. Without the ampersand you'll see everything it says.

It complains about not being able to open your DISPLAY rather than it not being set. This indicates a permission issue. Some things to try:
-Type xhost+ on the server to allow all X windows.
-Verify you've allowed ports 6000-6010 in the XP firewall. It may be the XP is refusing the connection.
-Try pinging your XP from your server just to insure it allows for it.
-Try doing "telnet XP 6000" from the server where XP is your XP machine's IP address. This will let you know if it is able to open port 6000. You may be prohibited via an internal switch firewall rule.
-You can try opening an ssh tunnel to the server with PuTTY then see if the DISPLAY that automatically sets allows your xterm to work. This will get around the need for ports 6000-6010.
 
Old 09-13-2006, 03:09 PM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Try issuing /usr/X11R6/bin/startx. Or add /usr/X11R6/bin to your PATH. Here is the Cygwin/X users' guide.
 
Old 09-13-2006, 11:25 PM   #4
Asmor
Newbie
 
Registered: Sep 2006
Posts: 0

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlightner
Not real familiar with Cygwin/X. We have successfully installed Xming which is based on Cygwin and it DOES let us open X windows from our UNIX/Linux servers to our XP desktops.

A few things:

Don't put the ampersand (&) after xterm when youu login to the server. This puts it in the background so all you are seeing is the PID it started and its eventual failure. Without the ampersand you'll see everything it says.

It complains about not being able to open your DISPLAY rather than it not being set. This indicates a permission issue. Some things to try:
-Type xhost+ on the server to allow all X windows.
-Verify you've allowed ports 6000-6010 in the XP firewall. It may be the XP is refusing the connection.
-Try pinging your XP from your server just to insure it allows for it.
-Try doing "telnet XP 6000" from the server where XP is your XP machine's IP address. This will let you know if it is able to open port 6000. You may be prohibited via an internal switch firewall rule.
-You can try opening an ssh tunnel to the server with PuTTY then see if the DISPLAY that automatically sets allows your xterm to work. This will get around the need for ports 6000-6010.
Many thanks for the suggestions and info.

How do I ping? Does it work just like in windows (i.e. ssh to server and type ping xxx.xxx.xxx.xxx)?

Anyways, I don't work again til Friday so I won't know if any of this stuff works until then.
 
Old 09-14-2006, 11:25 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Yes just "ping IPADDR".

No it is NOT like Windows! Windows TCP/IP was adapted from UNIX so it is fairer to say Windows is like UNIX (and Linux) rather than vice-vera. Most Windows networking command line stuff is directly from UNIX TCP/IP. netstat, ping, nslookup etc...

Back in the old days there was no TCP/IP at all on Windows. A lot of the early "PC networking" was done using IPX/SPX with Novell fileservers. There were also things like Banyan Vines though I never worked with that. Even Novell now uses TCP/IP instead of IPX/SPX for the most part.

Of course I also remember working on SCO UNIX (I know...) when TCP/IP was an add on package that we didn't buy because we did everything over serial ports.

P.S. An old AT&T guy (they invented UNIX in their Bell Labs division) said MS-DOS was an acronym for:
Micrsoft Stole our Damn Operating System

Last edited by MensaWater; 09-14-2006 at 11:29 AM.
 
Old 09-14-2006, 11:44 PM   #6
Asmor
Newbie
 
Registered: Sep 2006
Posts: 0

Original Poster
Rep: Reputation: 0
Hmm... On the one hand, I feel the need to post something snarky like, "Thanks for the info, Captain Pedant."

On the other hand, I, too, get mad when people say something like, "Puzzle Bobble/Bust-a-Move? Isn't that that game like Snood." so I guess I can't get too mad.

So I'll just say that I have nothing to say. Ph34r my paradox fu.
 
Old 09-15-2006, 12:05 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in Gneral and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 09-15-2006, 08:29 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Captain Pendant - Sounds like a good online ID.

I wasn't mad - just pointing out. Having been a professional (at least in my opinion) UNIX Systems Administrator since around 1991 I tend to sardonically view MS as "the evil empire". This attitude wasn't formed until they created Windows NT which seemed to me to be clearly designed to try to take over the UNIX midrange niche. It has often amazed me when people would go from an OS that allowed multiple platforms and was obtainable from different vendors to an OS that is proprietary and runs on only one basic platform (x86).

The funny thing to me is that NT seemed to have more impact on Novell than on UNIX. Linux now seems to be making inroads against Windows in the x86 space and of course like UNIX can be run on other platforms as well.

 
Old 09-16-2006, 05:27 AM   #9
Asmor
Newbie
 
Registered: Sep 2006
Posts: 0

Original Poster
Rep: Reputation: 0
Well, I didn't get to do much work on it Friday as other stuff popped up that was more important, but I made some in-roads.

One of the things I had done was to analyze the startxwin.bat file. Basically, all it did was set a bunch of environmental variables, run xwin, and then run xterm. It never worked. All I would get was the icon in the system tray, and both xwin and xterm would show up in the task manager but otherwise seemed to not be doing anything.

Yet, if I opened the bash prompt and just started xwin from there, rootless or not, it worked right. I was then able to go and get xterm running from the link in the start menu.

After I got xterm running (connected to 127.0.0.1), I used that to ssh into the server (again, I'm talking the server machine, so technically I think it's the X client?) and was able to get the display set semi-correctly. I used "export DISPLAY=ipaddress:0" and then when I tried to run xclock or anything else I would get refused by the server. The original bash prompt I'd used to start xwin would have a message I can't remember off the top of my head about the connection, though, so it was definitely making it back.

Oddly, I wasn't able to ping myself from the server. I'd issue the ping, wait a few seconds and nothing happened, then I hit ctrl+c and it said something like 15 pings and no response.
 
Old 09-16-2006, 01:37 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Just use 'ssh -X" which will turn X forwarding on and should save you
the hassle of having to export DISPLAY and the xhost + stuff on the
local machine (your cygwin).


Cheers,
Tink
 
  


Reply



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
deadkeys don't work in xterm or xemacs polemon Linux - Software 4 07-01-2006 07:18 PM
GNU global source code tagging system doesnot work on cygwin! tuxfood Linux - Software 0 06-28-2006 04:50 AM
cygwin remote X text input doesn't work Thinking Linux - Software 0 08-18-2005 08:53 AM
Cursor keys don't work in Joe/Xterm erraticassassin Linux - Software 0 09-10-2004 02:11 PM
Kernel 2.6 eterm xterm don't work b0rcked Debian 5 04-03-2004 06:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 11:41 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