*BSD News Article 23002


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!xlink.net!scsing.switch.ch!swidir.switch.ch!univ-lyon1.fr!frmug!renux.frmug.fr.net!keltia.frmug.fr.net!roberto
From: roberto@keltia.frmug.fr.net (Ollivier Robert)
Newsgroups: comp.os.386bsd.questions
Subject: Re: SMALL Xterms AND Window Managers
Date: 27 Oct 1993 17:04:54 GMT
Organization: Private FreeBSD Usenet Site
Lines: 142
Distribution: world
Message-ID: <2am9o4$37d@keltia.frmug.fr.net>
References: <2ajpvi$c60@news.u.washington.edu> <CFIovw.MLn@ucdavis.edu>
NNTP-Posting-Host: keltia.frmug.fr.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: TIN [version 1.2 PL2]

Jason Gabler (ccjason@othello.ucdavis.edu) wrote:
> I was hoping someone had a list/review of different xterm rewrites and window
> managers that are smaller than xterm and twm.

For the window managers,  try fvwm, it  has a Motif-like look, and consumes
very  little memory (around  300 KB againt ctwm  3.5  MB :-)). Available on
sunsite.unc.edu in /pub/Linux/X11/window-managers as fvwm-0.99-src.tar.gz.

For  xterm, try   rxvt, current  version is  1.4,   again on  sunsite  into
/pub/Linux/X11/xutils/terms (not sure, check).  Memory consumption is about
400 KB per rxvt (against  1.2 MB for  xterm). Needs a  patch for c_cc array
(beginning of command.c to put control  characters in the proper order) and
another patch for TIOCSETA instead of TCSETA.

Patch follows.

diff -r -u rxvt/Makefile rxvt-new/Makefile
--- rxvt/Makefile	Thu Oct 14 20:26:59 1993
+++ rxvt-new/Makefile	Sun Oct 24 17:08:37 1993
@@ -1,11 +1,11 @@
 # @(#)Makefile	1.4 21/9/92 (UKC)
 #
-CC= gcc
+CC= cc
 
 #usually, DESTDIR is empty
-MANDIR=$(DESTDIR)/usr/man/man1
+MANDIR=$(DESTDIR)/usr/local/man/man1
 BINDIR=$(DESTDIR)/usr/bin/X11
-USRLIBDIR=$(DESTDIR)/usr/lib/X11
+USRLIBDIR=$(DESTDIR)/usr/X386/lib
 INCROOT=$(DESTDIR)/usr/include/X11
 
 # Rxvt now include optional utmp support.
@@ -21,9 +21,9 @@
 
 # This define makes SYSV type systems to include utmp support ("who");
 # This is ok for Linux
-DEFS = -DUTMP_SUPPORT -DUTMP=\"/etc/utmp\" 
+#DEFS = -DUTMP_SUPPORT -DUTMP=\"/etc/utmp\" 
 # Using this defines adds in UTMP support for Sun OS 4.1.x
-#DEFS = -DUTMP_SUPPORT -DUTMP=\"/etc/utmp\" -DBSD
+DEFS = -DUTMP_SUPPORT -DUTMP=\"/var/run/utmp\" -DBSD
  
 
 # for most systems:

diff -r -u rxvt/command.c rxvt-new/command.c
--- rxvt/command.c	Tue Oct 12 19:10:53 1993
+++ rxvt-new/command.c	Sun Oct 24 22:58:55 1993
@@ -28,7 +28,7 @@
 #include <sys/wait.h>
 #include <sys/stat.h>
 #include <stdlib.h>
-
+#include <sys/ioctl.h>
 #include "rxvt.h"
 #include "command.h"
 #include "screen.h"
@@ -89,25 +89,30 @@
   OPOST | ONLCR ,
   B9600 | PARENB | CS8 | CREAD,
   ISIG | IEXTEN | ICANON | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE,
-  0,
   {
-    003,	/* VINTR */
-    034,        /* VQUIT */
-    0177,       /* VERASE */
-    025,        /* VKILL */
     004,        /* VEOF */
-    000,        /* VTIME */
-    001,        /* VMIN */
-    000,        /* VSWTC */
+    000,        /* VEOL */
+    000,   	    /* EOL2 */
+    010,        /* VERASE */
+    027,        /* VWERASE */
+    025,        /* VKILL */
+    022,        /* VREPRINT */
+    000,    	/* spare 1 */
+    003,	    /* VINTR */
+    034,        /* VQUIT */
+    032,        /* VSUSP */
+    031,    	/* VDSUSP */
     021,        /* VSTART */
     023,        /* VSTOP */
-    032,        /* VSUSP */
-    022,        /* VEOL */
-    022,        /* VREPRINT */
+    026,        /* VLNEXT */
     017,        /* VDISCARD */
-    027,        /* VWERASE */
-    026         /* VLNEXT */
-    }
+    001,        /* VMIN */
+    000,        /* VTIME */
+    000,    	/* VSTATUS */
+    000,    	/* spare 2 */
+    },
+  0,
+  0
 };
 
 /*  Variables used for buffered command input.
@@ -249,7 +254,7 @@
 	close(ttyfd);
       if(mask == 0x7f)
 	ttmode.c_cflag = B9600 | PARENB | CS7 | CREAD;
-      ioctl(0,TCSETS,(char *)&ttmode);
+      ioctl(0,TIOCSETA,(char *)&ttmode);
       scr_get_size(&width,&height);
       tty_set_size(0,width,height);
       setgid(getgid());

diff -r -u rxvt/rxvt.c rxvt-new/rxvt.c
--- rxvt/rxvt.c	Mon Oct 11 20:28:23 1993
+++ rxvt-new/rxvt.c	Sun Oct 24 17:08:54 1993
@@ -13,7 +13,6 @@
  * he guarantee anything whatsoever.
  */
 #include <stdio.h>
-#include <malloc.h>
 #include <stdlib.h>
 #include <string.h>
 #include <Xlib.h>

diff -r -u rxvt/utmp.c rxvt-new/utmp.c
--- rxvt/utmp.c	Tue Oct 12 02:03:17 1993
+++ rxvt-new/utmp.c	Sun Oct 24 17:14:58 1993
@@ -42,7 +42,7 @@
 #include <utmp.h>
 #include <unistd.h>
 #ifdef BSD
-#include <lastlog.h>
+/*#include <lastlog.h>*/
 #include <strings.h>
 #endif
 #include <pwd.h>

--
Ollivier ROBERT                          Ollivier.Robert@keltia.frmug.fr.net
A FreeBSD & PERL addict...                    PGP 2.3a Public Key on request