diff '--color=auto' -Naur /home/greg/Tmp/fricas/src/sman/sman.c src/sman/sman.c
--- /home/greg/Tmp/fricas/src/sman/sman.c	2024-12-22 23:32:24.437858991 +0100
+++ src/sman/sman.c	2024-12-23 20:58:51.351282223 +0100
@@ -450,15 +450,19 @@
 static void
 start_the_spadclient(void)
 {
-  char command[256];
+  char *TERM;
+  char command[1024];
+  TERM = getenv("FRICASTERM");
+  if (TERM == NULL)
+    TERM = "xterm";
   if (start_clef)
     sprintf(command,
-          "xterm -sb -sl 500 -name fricasclient -n FriCAS -T FriCAS -e %s %s",
-          ClefProgram, SpadClientProgram);
+          "%s -sb -sl 500 -name fricasclient -n FriCAS -T FriCAS -e %s %s",
+          TERM, ClefProgram, SpadClientProgram);
   else
     sprintf(command,
-          "xterm -sb -sl 500 -name fricasclient -n FriCAS -T FriCAS -e %s",
-          SpadClientProgram);
+          "%s -sb -sl 500 -name fricasclient -n FriCAS -T FriCAS -e %s",
+          TERM, SpadClientProgram);
   if (tpd == 1)
     fprintf(stderr,"sman:start_the_spadclient: %s\n",command);
   spawn_of_hell(command, NadaDelShitsky);
