[Pharo-project] Some questions about pharo

Alexander Lazarević laza at blobworks.com
Mon Oct 18 16:41:21 EDT 2010


2010/10/18 Adrien BARREAU <abarreau.dev at live.fr>:
> - If I run a headless Pharo, is it possible to display the graphical
> interface after? (for example, if something raises an exception, I want to
> open the GUI and use the debugger)

It depends. If your headless Pharo image is running on a unix VM you
could utilize the genius OSProcess/XDisplayControl plugin available
for this VM. Load the appropriate packages from [1] into your Pharo
image and then you can close and reopen the window even on another
machine if it's running X11. For example this

OSProcess thisOSProcess closeXDisplay.
(Delay forSeconds: 5) wait.
OSProcess thisOSProcess displayOnXServer: ':0.0'.

will close the Window (headless) and reopen it (headful) again on the
local X server after five seconds.
If you're using Seaside in that image you could trigger window
open/close via Seaside or you could change the default handler for
errors to make the window open on the local display as a default, ...

Alex

[1] http://www.squeaksource.com/OSProcess




More information about the Pharo-dev mailing list