There are often queries about using the WMQ Explorer from a desktop (without a WMQ install), to admin back-end queue managers.

If you have a back-end Windows installation of WMQ, RDC is a good option.
But what about when you’ve got a back-end Linux installation of WMQ?

Well, here’s an option:
Run the WMQ Explorer on the server, but using the X server of your desktop…

What you’ll need:

  • A Linux x86 Server with WMQ V6.0 installed (including MQSeriesIES30 and MQSeriesConfig packages)
  • An X server running on your Windows/Linux desktop
    • Hummingbird Exceed is a commercial product for Windows that can do this
    • Cygwin also has an X server (make sure you tick the options during setup). On my install I simply run
      C:\cygwin\usr\X11R6\bin\startxwin.bat (X appears in the taskbar).
      Then run the following from a cygwin prompt to disable xhost security:
      export DISPLAY=:0
      xauth +
    • Got a Linux desktop? see the bottom of this post (and the comments)
  • To know the hostname or IP address of your desktop machine (as it can be
    contacted by the Linux server)
  • A fast network connection between server and desktop – I find it painfully slow over dial-up, or even broadband

1. Telent/SSH to the Linux-86 server

You want to be logged in as the user you use to admin WMQ (for example, su to ‘mqm’)

2. Export your DISPLAY environment variable

The DISPLAY environment variable tells all X applications run from that session (such as the WMQ Explorer) to use the X Server on your desktop machine.

Examples are as follows:
export DISPLAY=mydesktop.mydomain.com:0
export DISPLAY=10.0.0.50:0

Look on the web for more about the “:0” – if you’ve got a standard setup on your desktop, this will always be :0, and your X Server will be listening on port 6000.

3. Start the WMQ Explorer

strmqcfg

4. Not working? Try debugging with a simpler X application…

For example try typing xterm
Most machines should have xterm installed, it’s simple to run and should give you an error message to work from.
If it works, you’ll get a terminal open on your desktop.

Error messages tend to be in two categories:

  1. Can’t contact server (or resolve hostname etc.):
    • Check you can ping the IP address or hostname of your desktop
    • Check port 6000 is open on your desktop’s firewall
    • Windows desktops:
      Check your X server is running, and there’s a XXX:6000 XXX:0 LISTENING line in “netstat -a” output
    • Linux desktops: Read on to “Is your Desktop Linux?”…
  2. Not authorised / server refused connection / no protocol specified:
    • Windows desktops: Investigate the documention of your X server
    • Linux desktops: Read on to “Is your Desktop Linux?”…

Is your Desktop Linux?

Great. Glad to hear it!

Here’s a quick-start guide to setting up a Linux desktop X Server to accept TCP/IP connections (lots more on this available on the web for your specific distro – but this should get you started):
Also see the comments below for an alternative.

  • Modern Linux distributions disable TCP/IP listening for their X servers.
    Most commonly, you need to set DisallowTCP=false (line may be commented out as true is the default – don’t you love those double negatives) in the GDM display manager config (try /etc/X11/gdm/gdm.conf) and restart your machine (or telinit 3, then telinit 5 as root to restart GDM).
  • You need to have the port open in any firewall (port 6000).
  • Security: Most machines have one or both of the following:
    • xhost host-based security:
      Allow connections from the specific server you are interested in using:
      xhost + linuxserver.yourdomain.com
      Allow connections from any server with:
      xhost +
    • xauth magic-cookie based authentication (modern distros):
      On your desktop run the following from a terminal window:
      xauth list

      Find the entry that looks like the local X server for your desktop. For example:
      mydesktop.mydomain.com/unix:0 MIT-MAGIC-COOKIE-1 5e5c6a13264d0f02fda42d1a92e7cdc0
      Copy this whole line to the clipboard.
      Go to a terminal session (SSH/Telnet) on the Linux server and run xauth add <pasted line>
      For example:
      xauth add mydesktop.mydomain.com/unix:0 MIT-MAGIC-COOKIE-1 5e5c6a13264d0f02fda42d1a92e7cdc0
      Note: mydesktop.mydomain.com should be the hostname or IP address that the Linux server can use to
      contact your desktop.