diff --git a/scripts/init_cl.py b/scripts/init_cl.py
index e8874c63f996b169318e181e40304ff68f20bd61..9ea4150443406ebc7b1e91dc02b84194e96f444c 100644
--- a/scripts/init_cl.py
+++ b/scripts/init_cl.py
@@ -24,8 +24,10 @@ import os.path
 HistoryFile=os.path.expanduser('~/.ost_history')
 InGUIMode=False
 
-  
-gfx.set_offscreen_mode()
+try:  
+  gfx.set_offscreen_mode()
+except NameError:
+  pass
 sys.ps1='ost> '
 sys.ps2='..... '
 print ''