I tried the script but I get an error. Below is what I did and the error:
Andreis-MacBook-Pro-3:pharobug andrei$ ./pharo Pharo.image eval "Smalltalk snapshot: true andQuit: true"
Andreis-MacBook-Pro-3:pharobug andrei$ ./resizesqueakwindow Pharo.image 840 640
0+1 records in
4+0 records out
1 truncated record
4 bytes transferred in 0.000708 secs (5651 bytes/sec)
Andreis-MacBook-Pro-3:pharobug andrei$ ./pharo-ui Pharo.image
2017-03-29 21:07:38.977 Pharo[53599:3054457] Error (1000) creating CGSWindow on line 281
2017-03-29 21:07:38.979 Pharo[53599:3054457] (
�� �� �� �� 0 �� CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x96699c63 __raiseError + 195
�� �� �� �� 1 �� libobjc.A.dylib �� �� �� �� �� �� �� �� �� �� 0x9018da2a objc_exception_throw + 276
�� �� �� �� 2 �� CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x96699b7d +[NSException raise:format:] + 141
�� �� �� �� 3 �� AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9ad410a5 _NSCreateWindowWithOpaqueShape2 + 1728
�� �� �� �� 4 �� AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9ad3f06d -[NSWindow _commonAwake] + 2227
�� �� �� �� 5 �� AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9adcef30 -[NSWindow _makeKeyRegardlessOfVisibility] + 104
�� �� �� �� 6 �� AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9adcee86 -[NSWindow makeKeyAndOrderFront:] + 35
�� �� �� �� 7 �� Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x000b07b0 -[sqSqueakOSXOpenGLView drawThelayers] + 212
�� �� �� �� 8 �� Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x000b718b -[sqSqueakScreenAndWindow ioForceDisplayUpdate] + 196
�� �� �� �� 9 �� Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x000b6e60 ioForceDisplayUpdate + 61
�� �� �� �� 10 ��Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x0007a66d primitiveShowDisplayRect + 212
�� �� �� �� 11 ��Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x0003c1cd interpret + 25816
�� �� �� �� 12 ��Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x000452e2 enterSmalltalkExecutiveImplementation + 135
�� �� �� �� 13 ��Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x00035f7b interpret + 646
�� �� �� �� 14 ��Pharo �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x000b68d0 -[sqSqueakMainApplication runSqueak] + 476
�� �� �� �� 15 ��Foundation �� �� �� �� �� �� �� �� �� �� �� �� ��0x988ea0ae __NSFirePerformWithOrder + 416
�� �� �� �� 16 ��CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x965a481e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
�� �� �� �� 17 ��CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x965a4760 __CFRunLoopDoObservers + 400
�� �� �� �� 18 ��CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x965960c2 __CFRunLoopRun + 946
�� �� �� �� 19 ��CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x96595aa6 CFRunLoopRunSpecific + 390
�� �� �� �� 20 ��CoreFoundation �� �� �� �� �� �� �� �� �� �� ��0x9659590b CFRunLoopRunInMode + 123
�� �� �� �� 21 ��HIToolbox �� �� �� �� �� �� �� �� �� �� �� �� �� 0x993a38f8 RunCurrentEventLoopInMode + 262
�� �� �� �� 22 ��HIToolbox �� �� �� �� �� �� �� �� �� �� �� �� �� 0x993a3503 ReceiveNextEventCommon + 192
�� �� �� �� 23 ��HIToolbox �� �� �� �� �� �� �� �� �� �� �� �� �� 0x993a342c _BlockUntilNextEventMatchingListInModeWithFilter + 99
�� �� �� �� 24 ��AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9ad2cb41 _DPSNextEvent + 742
�� �� �� �� 25 ��AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9ad2c1e5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 350
�� �� �� �� 26 ��AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9ad20b9c -[NSApplication run] + 907
�� �� �� �� 27 ��AppKit �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��0x9ac95fa0 NSApplicationMain + 2082
�� �� �� �� 28 ��libdyld.dylib �� �� �� �� �� �� �� �� �� �� �� 0x9a6a66d9 start + 1
�� �� �� �� 29 ��??? �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� 0x00000002 0x0 + 2
)
^C