How to deactivate graphical interface?