Index: trunk/Ohana/src/kii/setup/DefineLayout.c
===================================================================
--- trunk/Ohana/src/kii/setup/DefineLayout.c	(revision 5637)
+++ trunk/Ohana/src/kii/setup/DefineLayout.c	(revision 5700)
@@ -1,3 +1,5 @@
 # include "Ximage.h"
+
+static char default_colormap[] = "grayscale";
 
 void DefineLayout (Layout *layout, Graphic *graphic, int argc, char **argv) {
@@ -5,5 +7,5 @@
   int i, status, N;
   struct sockaddr_un Address;
-  char temp[100];
+  char temp[100], *temp_name;
 
   /** initiate connection with mana **/
@@ -29,5 +31,15 @@
   
   /* get the display colors */
-  MakeColormap (graphic, layout, argc, argv);
+  if (USE_XWINDOW) {
+    MakeColormap (graphic, layout, argc, argv);
+  } else {
+    temp_name = default_colormap;
+    if ((N = get_argument (argc, argv, "-cm"))) {
+      remove_argument (N, &argc, argv);
+      temp_name = argv[N];
+    }
+    layout[0].Npixels = 256;
+    SetColormap (graphic, layout, temp_name);
+  }
 
   /** set up a bunch of default things **/
@@ -51,7 +63,9 @@
   ALLOCATE (layout[0].zoom.data, char, 1);      /* allocate so later free will not crash! */
 
-  CreatePicture (layout, graphic);
-  CreateColorbar (layout, graphic);
-  CreateZoom (layout, graphic, 0, 0); 
+  if (USE_XWINDOW) {
+    CreatePicture (layout, graphic);
+    CreateColorbar (layout, graphic);
+    CreateZoom (layout, graphic, 0, 0); 
+  }
 }
 
