How to run Windows GUI jobs on the visible desktop
Note: In Windows 10, build 1703 and later this feature no longer works because the "Interactive Services Detection" service was removed in that Windows release.
HTCondor is able to run GUI-based applications on the Windows operating system, so long as these applications do not block waiting for keyboard or mouse input (i.e. the GUI application must be able to run as a batch job). How this works is HTCondor dynamically creates a non-visible desktop for each slot on the execute node, and it will launch the job on this non-visible desktop. The result is the GUI job runs on the machine without windows popping up on the visible desktop, thus allowing a GUI job to effectively "run in the background" without disturbing the desktop user.
However, at times you may want HTCondor to run your GUI job on the visible desktop. For instance, perhaps you have a GUI job that appears to hang or otherwise fail - what could be happening is the job detected some problem and popped up an error window, but the only way to see this error window is to have the job run on the visible desktop. To accomplish this, as the system administrator you will need to 1) tell Windows to allow the HTCondor service to access the visible desktop if you are running on Windows Vista or above, and then 2) tell HTCondor to use the visible desktop.
The basic steps are
- Start the
Interactive Services Detection
service - Enable Allow service to interact with desktop for the condor service
- set
USE_VISIBLE_DESKTOP=True
in your condor_config and restart the condor service
The first two steps are accomplished via the Windows Services Management Console.
- Open the Services Management Console:
- Click on the Start Menu
- Open the Control Panel
- Select Administrative Tools
- Select Services
[ note: If the Services option is missing, you could also type "start services.msc" from a command prompt ]
- Enable interactive services using Services Management Console:
- Find the Interactive Services Detection service
- Bring up its properties by double-clicking on it
- Change the Startup type to Automatic
- Click on the Start button below the Service status label
- Click OK
- Make the HTCondor service interactive using Services Management Console:
- Find the condor service
- Bring up its properties by double-clicking on it
- Switch to the Log On page
- Check the Allow service to interact with desktop option
- Click OK
- Tell HTCondor to use the visible desktop:
- Add
USE_VISIBLE_DESKTOP=True
to your condor_config - Restart the HTCondor service via "net stop condor" followed by "net start condor"
- Add
Thanks to Ben Burnett for this information which was copied from his original post on his Wiki -http://ben.versionzero.org/wiki/Condor_Enable_Visible_Desktop_on_Vista