Factor out use of hcs/sys_gui external

Issue #850