Difference between revisions of "X-Win 32"

From PrattWiki
Jump to navigation Jump to search
Line 25: Line 25:
 
==Licensing==
 
==Licensing==
 
===Licensing 2011 and After===
 
===Licensing 2011 and After===
There is a PDF file that is a part of the two files you can download from OIT when installing the software.  The PDF file explains how to get X-Win 2011 licensed.
+
There is a PDF file that is a part of the two files you can download from OIT when installing the software.  The PDF file explains how to get X-Win 2011 licensed.  '''Note:''' if you are off-campus, you ''must'' use the Activation License and ''not'' the License Server.  Go to the last page of the instructions.
  
 
===Licensing 2008-2010===
 
===Licensing 2008-2010===

Revision as of 02:02, 13 September 2011

X-Win 32
Version X-Win 32 2011 (6.1 no longer licensed as of 2/2008)
Download OIT
Cost Free
Manufacturer StarNet
Pundit Updated 2/1/2011


X-Win 32 is a program that will allow you to receive and display X-Windows information from other computers. It is especially useful for doing work from your dorm room (or Krzyzewskiville) when the program you need to run lives on OIT's cluster system.

IMPORTANT NOTE: use version 9.4 or 9.5 (or later. Note that for the 2011 version, there is a totally different process from what people who learned X-Win prior to 2011 used...

Requirements

You must be using a Windows-based PC. You will also need some form of terminal program (for example, PuTTY, SSH Secure Shell, or FSecure). Note that while there are several different ways of using X-Win to connect, the method given below in Configuration and Use is...useful...in that it will not only work on campus but also over internet connections not at Duke. It is therefore the configuration recommended to Pratt students. Note, however, that off-campus students will experience a slower connection than those on-campus.

Licensing

Licensing 2011 and After

There is a PDF file that is a part of the two files you can download from OIT when installing the software. The PDF file explains how to get X-Win 2011 licensed. Note: if you are off-campus, you must use the Activation License and not the License Server. Go to the last page of the instructions.

Licensing 2008-2010

Since Spring of 2008 and through Fall of 2010, only Version 9.X is available and licensed for Duke students from the OIT site. All previous configurations for X-Win have thus been removed from this site.

To begin, you should download the program from the OIT site and install.

The first time you run it, the program will "Welcome" you. As nice a thought as that is, go ahead and select "Don't show this again" and hit the close button. Then, you will need to enter the most current license key, which is included in the text file Key.rtf in the download.

  • If X-Win does ask for this, you will be entering a Floating Node license. The license should be floating node.
  • If X-Win does not ask for this itself, it is likely using an older license. Go to the X-Win icon in the lower right of the task bar, right-click, go to Support, and then Licenses. Click the Add button, and when asked, copy and paste the text from the Key.rtf file into the window. When you get back to the License Monitor, select the license that is in use and it should state that the license is good for a while. Then close that window.

Configuration and Use

Once the license is in, you will generally want to:

  1. Open X-Win32.
  2. Cancel out of the Welcome screen if you didn't banish it earlier.
  3. Open a terminal window using PuTTY, SSH Secure Shell or FSecure. For the host, choose one of the machines you added to the security list in the step above.
    1. If you are using PuTTY, make sure that you checked the Connection->SSH->X11Enable X11 forwarding or Connection->SSH->Tunnels Enable X11 forwarding box before connecting. If you did, you do not have to use the setenv command to set the DISPLAY environment.
    2. If you are using a terminal program that does not allow automatic port forwarding, once you are connected in the terminal window, type setenv DISPLAY $REMOTEHOST\:0.0 - this should tell the oit computer you are on to send information to your computer. NOTE this step will not work correctly if you are using a router. See the next section for information on that!
  4. See if things are working by typing xterm (xterm opens a terminal window - it opens fast and you can close it once it works)

This version of X-Win defaults to allowing connections from all computers. This may or may not be a good thing. If you would like to restrict your screen to "trusted" computers only, right-click the X-Win icon and select X-Config. Go to security and choose to Allow by Address "Only allow these host addresses." You will then need to add the addresses for those machines you will allow to send graphics to your screen (for example, hudson11.oit.duke.edu).

X-Win 32 with Routers

If you are using a router, your computer is likely receiving an address from that router. The port-forwarding method above will work with a router. If you are using PuTTY or FSecure or SSH you should be all set, even with a router.

If, however, you are using a terminal program that does not allow forwarding and need to use the setenv method, note that the REMOTEHOST above will actually be the router and not your computer. And unless your router has a screen (and, really, even then), sending graphics to your router will not help. So you need to tell your router to forward all the graphical information to your particular address. Which means the following:

  1. Figure out your local machine's address and the router address. The easiest way to do this is:
    1. Go to Start->Run
    2. Type cmd in the Run window
    3. Type ipconfig in the command window
    4. The IP Address is your local machine's address
    5. The Default Gateway is your router's address as seen from your computer
  2. Figure out the administrative login and password for your router. The address will generally be something like 192.168.0.1 or 192.168.1.1. The username and password depends on the manufacturer. It's usually something cute like nothing for the login name and admin for the password. Unless you changed it - then you are on your own.
  3. Figure out how to forward the contents of port 6000 to your local machine address as seen from your router (probably the 192.168.something.something that showed up as the IP Address above).
  4. Follow the steps in Configuration and Use II above.

Note that some routers will release their addresses, especially if the power goes out or you reset the router. Your computer may not always get the same address from the router, so if you had X-Win 32 working once and now it doesn't, do the Start->Run->cmd->ipconfig trick and make sure you are forwarding port 6000 to the correct machine.

Macintosh Users

X-Win 32 does not work on Macs - use the X11R6 terminal program instead.

Troubleshooting

Restricted Network w/ 9.x

If your terminal responds that you are on a restricted network, you may need to use the Nodelocked License instead of the Floating Node. The license is available for download at the OIT site above. To enter it:

  1. Open X-Win and right-click the icon at bottom right, go to "Support" and then "Licenses".
  2. In the license section, click the "My Licenses" group in Licenses then the "Add +" button.
  3. Chose "Nodelocked (VN)" and then enter the appropriate license.
  4. Close the various X-Win wondows, then exit X-Win by right-clicking the X-Win icon and exiting.
  5. Restart X-Win.

Display 1 or higher, instead of 0, issue

Executive summary: Restarting seems to work pretty well. Inelegantly, but well.

Meanwhile - for some people, the following works:

  1. Start X-Win 32. Confirm for yourself that it's still saying "Display 1" or something larger by hovering over the icon at lower right (if it's 0 - problem solved!)
  2. ctrl-alt-delete, and pull up the Task List and then Processes
  3. Right-click the xwin process, and end process tree
  4. Roll over the X-Win icon at lower right to make it disappear
  5. Start X-Win 32. Hopefully, it is Display 0 now.

If not, try this:

  1. Start X-Win 32. Confirm for yourself that it's still saying "Display 1" or something larger by hovering over the icon at lower right (if it's 0 - problem solved!)
  2. ctrl-alt-delete, and pull up the Task List and then Processes
  3. Be careful at this point not to roll over the X-Win icon at lower right
  4. Re-start x-win 32. Now roll over the X-Win icons. One should go away, and the other will be Display 2. Possibly even 3.
  5. Shut down and re-start your computer
  6. Once re-started, start x-win while simultaneously thinking happy thoughts...

If that does not work - which is to say, every time you start your machine and run X-Win 32 it comes up Display 1 - there is an answer:

  1. Start X-Win 32. Confirm for yourself that it's still saying "Display 1" - if the number is higher, restart your computer and see if it is 1 the next time around.
  2. Start PuTTY. Load you favorite session, but do not connect. In categories, go to X11 if it exists or Tunneling if not.
  3. In the X display location, enter
    :1.0
    
    that is, "colon one point zero" - note, if you aren't getting Display 1 when you start up, change the 1 to whatever you are getting.
  4. Double-check to make sure the X11 Forwarding is still checked.
  5. In PuTTY, go to the Sessions category and save this session.
  6. Double click the name of the session.

Also - if you need to use this last type, send Dr. G an e-mail with your name, kind and model of computer, operating system and bit type.

xterm works; MATLAB crashes

Sometimes, MATLAB needs a buddy, apparently... If xterm works but MATLAB crashes the X11 connection-

  1. Restart X-Win 32; MATLAB probably took it out when it crashed
  2. Type xterm & to get an xterm running. Do not close it.
  3. Type matlab &. Secure that its friend xterm will be along for the ride, MATLAB should now work

152.16 Only

If X-Win reports that it can only accept connections from 152.16, you need to use the other license value in the license file.

  1. Open X-Win
  2. Open xconfig (right-click X icon and select xconfig)
  3. Select the license tab
  4. If you still have the downloaded zip file from OIT, open it and open the license file. If not, download it as linked above and...open the license file. Use the 152.3 license
  5. Apply and hit OK
  6. Close X-Win by right-clicking the X icon and selecting close
  7. Restart X-Win

Firewalls and Routers

If you are totally sure you did everything correctly, X-Win 32 is running, X-Config has the OIT machine you connected to on its security list, you are not on a router (or if you are you have compensated for it), then you likely have a firewall issue and need to figure out how to allow incoming traffic on port 6000 through.

Here are the instructions on how to do this if you have Trend Micro PC-cillin Internet Security. You may have to modify this process slightly depending on your firewall software.

  1. Open the main virus protection console
  2. Click the "Network Security" tab
  3. Select which profile you are using and then click "Edit"
  4. Click the "Exceptions" tab
  5. Click "Add"
  6. Select "incoming" as your connection and "allow" as your action
  7. Select "Specified Port(s)" and Type "6000"
  8. Click "Okay"

For the Windows Firewall, follow basically the same process AND make sure the "Block all connections" or "Ignore Exceptions" or something with that kind of wording is not checked.

Fatality

If you end up getting an error related to "fatality" - specifically:

StarNet Communications Corp
X-Win32 2010
Build: 1155
A fatal error has occurred and X-Win32 2010 will now exit. Please open xwin.0.log for more information.

and the log file says

Cannot establish any listening sockets - Make sure an X server isn't already running

one program that has caused this problem is an AOL firewall. Try turning that off and see what happens.

Problems with the setenv command

These will only happen if you are not using port forwarding. For the Class of 2012 and after, the issues below should really never crop up:

REMOTEHOST: Undefined variable.

If you type the setenv DISPLAY $REMOTEHOST\:0.0 line and the computer replies

REMOTEHOST: Undefined variable.

you will need to connect to a different OIT machine. You probably logged onto teer1.oit.duke.edu.

Can't open display

If the computer replies

Can't open display: blah.blah.duke.edu :0.0

note the extra space between the edu and the :0.0; that means you put a space after the slash during setenv (i.e. you said $REMOTEHOST\ :0.0 instead of $REMOTEHOST\:0.0)

Questions

Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links

References