Monday, June 29, 2015

CLX on Microsoft Windows - Xming and Cygwin - Notes

As at least a novelty in in development of graphical user interface (GUI) applications, it's possible to develop applications of CLX on Microsoft Windows platforms, using one of the X Window server implementations available on the same platform -- such as Xming or one of the Cygwin  xorg-server implementations.

When Xming installed and initialized, the appropriate display address for the CLX OPEN-DISPLAY function can be determined from the Xming log file. The log file is available via the context menu provided by the Xming icon in the Microsoft Windows system tray

Example: Xming.0.log

Welcome to the Xming X Server
Vendor: Colin Harrison
FreeType2: 2.3.4

C:\Program Files (x86)\Xming\Xming.exe :0 -clipboard 

XdmcpRegisterConnection: newAddress
winCheckDisplayNumber - Xming is already running on display 0

Fatal server error:
InitOutput - Duplicate invocation on display number: 0.  Exiting.

winDeinitMultiWindowWM - Noting shutdown in progress

Although, in this example,  some of the content of the log file might seem somewhat ambiguous, as to whether there is or is not an X server initialized on the host, but in observing the IPv4 address that is indicated as the newAddress value -- in this example,, an IP address on a local area network -- that address may be applied as the display address to the CLX OPEN-DISPLAY function. Alternately, an address may be provided when Xming is initialized, with the Xming '-from' argument -- for example, as the target value in a Microsoft Windows shortcut object, with some additional command line options provided:
Example: Xming launch command

"C:\Program Files (x86)\Xming\Xming.exe" :0 -clipboard -multiwindow -from -logverbose 1

Subsequently, the address may be provided to CLX.

With Xming initialized to the loopback address,, of course that would allow XLib requests from XLib client peers that may bind to the loopback address on the same operating system. This configuration does not require XAUTHORITY configuration. It may be suitable for application in CLX development, in non-networked applications.

SSH may be applied, furthermore, for transport layer security in networked applications of XMing in -- consulting XMing documentation (cached by Google).

Example: CLX "Hello World"

(let* ((clx-sys (asdf:find-system '#:clx))
       (clx-p (asdf:component-pathname clx-sys)))
  (setf (logical-pathname-translations "clx")
        (list (list "**;*.*.*" 
                     (make-pathname :directory
                                    '(:relative :wild-inferiors)
                                    :name :wild
                                    ::type :wild
                                    :version :newest)
  (asdf:operate 'asdf:load-op clx-sys)
  (load "clx:demo;hello")
  (xlib::hello-world ""))

When working with Cygwin, an X server may be installed with the Cygwin 'xorg-server' package. Documentation is available in the Cygwin 'xorg-docs' package.The X server installed from the 'xorg-server' package may then be initialized with the shell command, 'X'. For information about the implementation of the X server in Cygwin, the reader may also wish to refer to the Cygwin/X Contributor’s Guide.

No comments:

Post a Comment