r25 - 07 Jun 2011 - 19:57:04 - ColleenBrabenderYou are here: TWiki >  StatDocs Web  >  StatLaptop > UsinglaptopApps > UsinglaptopXwindows

Using an X Windows Manager on Windows XP (Xming)

Please note that procedures for Xming on this page also work with Windows Vista.

* Legacy Information - Using Xwindows on Legacy Laptops (Cygwin/X for Win2000)

Xming has an extremely useful feature that allows you to copy and paste blocks of text between Windows and Linux applications. For that reason alone, you should learn how to get Xming running on your laptop and/or home computer. Please Note...current version of Xming works on Windows XP and Vista computers, but NOT on Windows 2000 computers.

Using Xming in Conjunction with SecureCRT (Manual Startup)

In the previous SecureCRT instructions, an example Xwindows enabled session was configured for public01 per the following:

Go to File->Connect. Left-click the New Session icon (third over on the top). Do not use the Wizard if it is offered. For the "Connection" panel, you can put public01.stat.wisc.edu in the Name box. The Protocol box should be set to the default of SSH2. Select the "SSH2" panel (from the list on the left) and enter public01.stat.wisc.edu in the Hostname box, and your user ID in the Username box. Other setting should be good as the defaults (Port box is 22 and Firewall is None). Select the "Remote/X11" panel (from the list on the left) and select Forward X11 packets. This allows Xwindowing operations on the terminal session. Click on OK at the bottom to save the entry and exit SecureCRT.

For a manual startup of a Xwindows application, first start Xming from either the Start -> Xming -> Xming path, or from an icon originally placed on your Windows desktop or start menu. DO NOT use XLaunch. Now, start SecureCRT from the Start menu or from a desktop icon. Click on the Connect icon (top left) if the Connect menu did not already come up. Then click on the public01.stat.wisc.edu entry to connect to the public01 server. Enter a valid password and a terminal session will be started. It is better to work from an Xterminal than from the SecureCRT window, so at the command line, type:

xterm &

You can then do all of your work from the Xterminal window.

For greater flexibility, start the Applications pull-down menu by executing:

/p/stat/bin/Applications

in the SecureCRT window. Once this is done, the SecureCRT window should no longer be used and can be minimized. The pull-down menu that appears allows opening of multiple Xwindows and most of the applications typically used from the servers like public01.

When the session is completed, it is best to clean up the Xwindows environment but shutting down the SecureCRT window (leave open other windows you may be using for printer authorization). Then be sure to shut down Xming. To do this, right click on the Xming icon in the Windows task bar and select Exit. The automatic setups described below start up applications automatically and clean up automatically at the end of the session.

Configure Xming launch Files for Automatic Startup

To configure the Xming session, make sure you have SecureCRT? 6.0 or newer installed and do the following steps. Do not include quote marks.

1. Start SecureCRT? from the desktop or programs menu.

2. Create a new session. Do not use the Wizard.

3. Under Connection:

  1. Set "Name" to "server_xterm" (or "server_xmenu", etc.) b. Select the "SSH2" protocol (default).
4. Under Connection--SSH2:
  1. Set "Hostname", probably as best-statdesk.stat.wisc.edu b. Set "Username" to your login.
5. Under Connection--Port Forwarding--Remote/X11:
  1. Check "Forward X11 Packets".
6. Under Terminal:
  1. Check "Close on disconnect". b. Check "Minimize to Activator" (repeat until check mark).
7. Under Terminal--Appearance--Window:
  1. Check "Session window always on top".
8. Under Connection-- Logon Actions:
  1. Check "Automate logon" and "Send initial carriage return".
    b. Delete all entries in Expect/Send/Hide box.
    c. Add new "Send" entries as indicated for the desired configuration (one per line):
9. Click OK to save the configuration.

Once you have done this for one configuration, you can Copy and Paste to create new sessions with the same settings. Once you have done this for one configuration, you can Copy and Paste to create new sessions with the same settings.

SecureCRT? X Menu Configuration

To configure an X Menu that provides a pull-down menu of host applications on your laptop screen, set the Connection Name to "server_xmenu" and set the "Send" entries in the Logon Actions to:

/p/stat/bin/Applications exit

SecureCRT? X Terminal (individual windows) Configuration

To configure the simple X windows session, set the Connection Name to "server_xterm" and set the "Send" entries in the Logon Actions to:

xterm -sb exit

SecureCRT? FVWM Configuration

To configure the server_fvwm session, set the Connection Name to "server_xterm" and set the "Send" entries in the Logon Actions to:

/p/stat/bin/.xsessionfvwm

These instruction start up the FVWM2 windows manager from your Linux computer on your local X root window. To make sure your FVWM2 configuration is correct, you may want to update your configuration file in ~/.fvwm/.fvwm2rc. Instructions for doing this are at the Customizing FVWM page.

The FVWM_2Mon option uses the same SecureCRT? setup (server_FVWM) but shows the FVWM screen on the second monitor of a 2 monitor system. It is initially configured for use with a 1280 X 1024 resolution second monitor. For other resolutions, see the Advanced Method - Edit launch Files section.

Quick Method - Copy Preconfigured Files

The quick way to set up automatic startup is to copy preconfigured files Xmenu.Xlaunch, Xterm.Xlaunch, FVWM.Xlaunch, GNOME.Xlaunch and/or FVWM_2Mon.Xlaunch or GNOME_2Mon.Xlaunch to your Desktop. These will work for recent installations of SecureCRT where the path to the application is C:\Program Files\VanDyke Software\SecureCRT\securecrt. If you have an older installation that uses the previously recommended path (C:\Program Files\SecureCRT\securecrt), check with SCL staff for the correct preconfigured Xming launch files.

It is safer to use Firefox as your browser when downloading these files. For both Firefox and Internet Explorer under Windows XP or Vista, make sure that the file extension is preserved during download. The extension is Xlaunch. So, for example, Xterm.Xlaunch should be saved as Xterm.Xlaunch. XP and Vista may attempt to save this with an .xml extension (Xterm.Xlaunch.xml) which will not work. If you try to save it to the desktop, and the icon looks like a piece of paper rather than an XMing object (X with red "swoosh" though it), you will need to make some changes to Windows XP or Vista to show extensions. Use the following method in that case:

Open My Computer (or equivalent)
On Windows XP Click Tools -> Folder Options -> View
On Windows Vista Click Organize -> Folder and Search Options -> View
Make sure the Hide extensions for known file types is NOT selected
Select OK at the bottom

If the .xml extension appears on the downloaded file, erase those 4 characters before completing the download. If you like to normally have extensions hidden, go back and reselect the Hide extensions option after the downloads are complete.

The FVWM_2Mon.Xlaunch and GNOME_2Mon.Xlaunch files may need to be modified to fit your external monitor resolution. They are preconfigured to 1280 X 1024 resolution. See the Advanced Method - Edit launch Files section, or talk to SCL staff about where changes can be made.

Configure SecureCRT for Automatic Startup

For each of these cases, a named SecureCRT session is automatically called to start the associated desktop environment with an Xming launcher.

SecureCRT X Menu Configuration

X Menu provides a pull-down menu of host applications on your laptop screen. To configure the simple X Menu session, (assuming SecureCRT 6.0 or newer), start SecureCRT from the desktop or programs menu. Create a new session. Do not use the Wizard. Under Connection, name it server_xmenu and select the SSH2 protocol (default). Under Connection - SSH2, configure your preferred server name and your user ID. Under Connection - Remote/X11, check the Forward X11 Packets option. This enables X windowing functions in the X Menu session. Under Terminal, check the Close on disconnect option. This cleans up the X Menu session by terminating it if the X Menu window is closed. Also check the Minimize to Activator in the system tray option until check mark is shown. This minimizes the SecureCRT window while you are using Xming. Under Connection - Logon Actions (or Logon Scripts), check the Automate logon and Send initial carriage return options, and clear out entries in the Expect and Send areas. Also clear out any Hide checkmarks. In sequential Send areas, add (one per line):

/p/stat/bin/Applications
exit

Select OK to save the configuration

SecureCRT X Terminal (individual windows) Configuration

To configure the simple X windows session, (assuming SecureCRT 6.0 or newer), start SecureCRT from the desktop or programs menu. Create a new session. Do not use the Wizard. Under Connection, name it server_xterm and select the SSH2 protocol (default). Under Connection - SSH2, configure your preferred server name and your user ID. Under Connection - Remote/X11, check the Forward X11 Packets option. This enables X windowing functions in the X windows session. Under Terminal, check the Close on disconnect option. This cleans up the X windows session by terminating it if the root X window is closed. Also check the Minimize to Activator in the system tray option until check mark is shown. This minimizes the SecureCRT window while you are using Xming. Under Connection - Logon Actions (or Logon Scripts), check the Automate logon and Send initial carriage return options, and clear out entries in the Expect and Send areas. Also clear out any Hide checkmarks. In sequential Send areas, add (one per line):

xterm -sb
exit

Select OK to save the configuration

SecureCRT FVWM Configuration

To configure the server_fvwm session (assuming SecureCRT 6.0 or newer), start SecureCRT from the desktop or programs menu. Create a new session. Do not use the Wizard. Under Connection, name it server_fvwm and select the SSH2 protocol (default). Under Connection - SSH2, configure your preferred server name and your user ID. Under Connection - Remote/X11, check the Forward X11 Packets option. This enables X windowing functions in the server_fvwm session. Under Terminal, check the Close on disconnect option. This cleans up the server_fvwm session by terminating it if the X root window is closed. Also check the Minimize to Activator in the system tray option until check mark is shown. This minimizes the SecureCRT window while you are using Xming. Under Connection - Logon Actions (or Logon Scripts), check the Automate logon and Send initial carriage return options, and clear out entries in the Expect and Send areas. Also clear out any Hide checkmarks. In sequential Send areas, add (one per line):

/p/stat/bin/.xsessionfvwm

Select OK to save the configuration

These instruction start up the FVWM2 windows manager from your Linux computer on your local X root window. To make sure your FVWM2 configuration is correct, you may want to update your configuration file in ~/.fvwm/.fvwm2rc. Instructions for doing this are at the Customizing FVWM page.

The FVWM_2Mon option uses the same SecureCRT setup (server_FVWM) but shows the FVWM screen on the second monitor of a 2 monitor system. It is initially configured for use with a 1280 X 1024 resolution second monitor. For other resolutions, see the Advanced Method - Edit launch Files section.

SecureCRT GNOME Configuration

To configure the GNOME desktop session, (assuming SecureCRT 6.0 or newer), start SecureCRT from the desktop or programs menu. Create a new session. Do not use the Wizard. Under Connection, name it server_gnome and select the SSH2 protocol (default). Under Connection - SSH2, configure your preferred server name and your user ID. Under Connection - Remote/X11, check the Forward X11 Packets option. This enables X windowing functions in the server_gnome session. Under Terminal, check the Close on disconnect option. This cleans up the server_gnome session by terminating it if the X root window is closed. Also check the Minimize to Activator in the system tray option until check mark is shown. This minimizes the SecureCRT window while you are using Xming. Under Connection - Logon Actions (or Logon Scripts), check the Automate logon and Send initial carriage return options, and clear out entries in the Expect and Send areas. Also clear out any Hide checkmarks. In sequential Send areas, add (one per line):

/p/stat/bin/.xsessiongnome

Select OK to save the configuration.

Please note that GNOME takes a lot of resources to run and is slow across even a fairly fast network (50Mbit, for example). So it is not a preferred option for laptop users. The

The GNOME_2Mon option uses the same SecureCRT setup (server_GNOME) but shows the GNOME screen on the second monitor of a 2 monitor system. It is initially configured for use with a 1280 X 1024 resolution second monitor. For other resolutions, see the Advanced Method - Edit launch Files section.

Starting Xming Sessions Directly from Launch Files

Double Click one of the launch files you downloaded or created. If you start it in its own virtual desktop (Desk3 for example), it will have a separate screen space to work with. A SecureCRT session will automatically start and you may be asked for a password. You can eliminate the password step by choosing the save password option (see Security WARNING).

Using the Xming sessions

For FVWM2 and GNOME, your screen will go black and be covered with the root X window and an Xterm, and the FVWM2 or GNOME environment will be displayed. You will now have a full desktop session with pull down menus available. To hide the X root window, click the Xming button in the MS windows task bar. To bring it back, click it again. If all this didn't work, send Email to lab@stat.wisc.edu.

When you start the individual windows alternative, you will see a functional X Terminal running from your server that has all the familiar features of an X Terminal that runs locally on the Stat Linux systems. Three button operations work properly in this X Terminal where they do not work properly in a SecureCRT session window. From the X Terminal window, you can run any other X or command line application you would run on a Linux station, including editors, web browsers and mail packages. For example, if public01 is used as the server:

public01% xemacs &
public01% firefox &
public01% thunderbird &

Again, if you start Xterm.Xlaunch in its own virtual desktop (Desk3 for example), the Linux windows can stay segregated from the MS windows and make usage easier to track.

When you start the X Menu alternative, you will see a pull-down menu tray on your screen titled Applicatons with on Server <your server> in the push-button area. Click on the button, and you will see a selection of applications you can run from the server that will display graphically on your local screen. Select each application that you want, probably starting with xterm. This menu is similar to the ones you find in FVWM and GNOME. If you have virtual desktops, you can choose to have this pull-down tray on all desktops so you can select applications anywhere in your virtual screen space. You can still segregate your Linux windows from MS windows as you prefer.

To stop all versions of Xming, right-click in the X icon in the MS Tray (lower right) and select Exit.

Additional Convenience Options for Xming

Because the -clipboard option was used when starting Xming, it is possible to copy and paste text between applications running under Xwindows and applications running under Microsoft Windows. From Linux, just highlight what you want to copy. Then move to a Microsoft application and use the Paste command or Ctrl-V (on Vista, there may be a problem that requires hitting Ctrl-V several times to complete the Paste function). From Windows, highlight what you want to copy, then use the Copy command or Ctrl-C to capture it. Go to a Linux application, position to where you want to paste, then hit the middle mouse button.

If you want one of the X environments to automatically start up every time you reboot or start a new login on your laptop, add a shortcut for that environment to the Startup folder. Left click on the desktop launch icon you want to use and Copy (Cnrtl-C). Open the Startup folder by starting Explore with right-click on the Start button (lower left) then left-click  Explore. Left-click the + sign in front of the Programs folder and left-click the Startup folder. Paste (Ctrl-V) the shortcut into the Startup folder. Next time you login or reboot, the X environment will automatically start. I will likely start in the wrong virtual screen, so you will need to move it after it starts.

WARNINGS

If you try to run firefox and thunderbird through the X session, you should make sure you are not still running copies on another Linux system in the department. If you have other copies open, you may get an error message that another copy is running. If you still want to run a new copy, you can use the -cleanup option, but that may cause problems on your original running copy.

Advanced Method - Edit launch Files

The Xming launch file for the X Menu configuration (Xmenu.Xlaunch) has the following XML entries:

<?xml version="1.0"?>
<XLaunch
xmlns="http://www.straightrunning.com/XmingNotes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.straightrunning.com/XmingNotes XLaunch.xsd"
WindowMode="Multiwindow"
ClientMode="StartProgram"
Program="c:\program files\vandyke software\securecrt\securecrt /S server_xmenu"
ClientStart="Local"
Display="0"
Clipboard="true"
/>

The first four lines are the instructions that start up Xming. The remaining lines are arguments for running Xming.

WindowMode="Multiwindow" tells Xming to use multiple, individual Windows XP/Vista windows to run X applications

ClientMode="StartProgram" tells Xming to also start the program specified on the next line

The Program= line specifies the startup of SecureCRT using the Session named server_xmenu (the /S option)

ClientStart and Display are pretty standard

Using Clipboard="true" allows copy and paste between Windows applications and Linux X applications through the Windows clipboard

For comparison, here is the file used to start 2 monitor FVWM (FVWM_2Mon.Xlaunch):

<?xml version="1.0"?>
<XLaunch
xmlns="http://www.straightrunning.com/XmingNotes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.straightrunning.com/XmingNotes XLaunch.xsd"
WindowMode="Nodecoration"
ClientMode="StartProgram"
Program="c:\program files\vandyke software\securecrt\securecrt /S server_fvwm"
ClientStart="Local"
Display="0"
Clipboard="true"
ExtraParams="-screen 0 1280x1024@2"
/>

Many statements are the same. The WindowMode remains as "Nodecoration". This specifies that all X activity will occur in a single, base X window that covers the second monitor rather than using multiple windows managed by Win XP/Vista. Then there is a special parameter line that specifies geometry for the second monitor (@2) on the specified display screen (-screen 0). The FVWM screen can't be manipulated (no scroll bars or decorations), but it can be minimized from the Windows task bar. The single, base X window will be located on the second monitor screen. For screens of different dimensions, just put the correct max-resolution numbers in place of "1280x1024" For example, a 1920x1200 monitor would use the line:

ExtraParams="-screen 0 1920x1200@2"

This same script text can be used for a GNOME screen by changing "server_fvwm" to "server_gnome" in the "Program" line. Rename the file "GNOME_2Mon.xlaunch".

Users interested in further customization of Xming startups should work with these examples and look in the Xming documentation. Other options are available for starting different programs and setting alternative X geometries.

-- Main.Me - 22 Jul 2009

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r25 < r24 < r23 < r22 < r21 | More topic actions
 
Statistics Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback