Sun-Spots-Request@RICE.EDU (William LeFebvre) (04/17/88)
SUN-SPOTS DIGEST Saturday, 16 April 1988 Volume 6 : Issue 54 Today's Topics: Re: fstab swap entries? (2) Re: Problems with 'mailtool'/'textedit' (really shelltool) Re: Need advice on SUN - VAX connection Faster version of draw_circles (Submitted c. March 25th). Compiling "bitdump" slowdown in performance Two bugs: csh "filec" and rlogin xon/xoff Need dsun: troff processor for Sun Need more groups get backissues how? blanket windows and gfxsubwindows with SunView? Detecting suntool invocation? Send contributions to: sun-spots@rice.edu Send subscription add/delete requests to: sun-spots-request@rice.edu Bitnet readers can subscribe directly with the CMS command: TELL LISTSERV AT RICE SUBSCRIBE SUNSPOTS My Full Name Recent backissues are available via anonymous FTP from "titan.rice.edu". For volume X, issue Y, "get sun-spots/vXnY". They are also accessible through the archive server: mail the request "send sun-spots vXnY" to "archive-server@rice.edu" or mail the word "help" to the same address for more information. ---------------------------------------------------------------------- Date: Thu, 7 Apr 88 09:34:22 EDT From: Bernard Silver <bs30@gte.com> Subject: Re: fstab swap entries? (1) Reference: v6n43 I asked Sun this recently. They gave me an answer which seems to work. The entry in /etc/fstab should be /dev/sd0b swap swap rw 0 0 Not exactly obvious from the documentation! Bernard ------------------------------ Date: Thu, 7 Apr 88 18:41:42 CDT From: vixen!ronbo@cs.utexas.edu (Ron Hitchens) Subject: Re: fstab swap entries? (2) Reference: v6n43 In v6n43 ted@braggvax.arpa asks: > What should a swap entry in /etc/fstab look like? This will do it: /dev/sd1b /nodir swap rw 0 0 The second field, which specifies a directory mount point for normal filesystem mounts, is not used for a swap partition specification, but the code which parses the fstab file is apparently generalized to the point that it will reject any entry whose second field doesn't begin with a slash. You can put anything you like in there, as long as it starts with a slash. Ron Hitchens ronbo@vixen.uucp hitchens@cs.utexas.edu [[ Thanks also to Alan Edwards <moss!ihlpm!kae@att.arpa> for a similar suggestion. --wnl ]] ------------------------------ Date: Thu, 07 Apr 88 09:46:03 EDT From: ted@braggvax.arpa Subject: Re: Problems with 'mailtool'/'textedit' (really shelltool) >From: Nathan H. Hillery <nhh@cs.duke.edu> > I wouldn't mind being able to change the menus that appear > ~within~ windows... You don't have to live without that cabability; that's exactly what the "braggtools" patch to shelltool does for you. You get user definable walking menus in the shelltool (possibly with different menus on a per window basis). This makes it easy to do menu interfaces to traditional unix tty programs, like vi, emacs, MH and the like. If you can ftp, it's in the sun-spots archives, or I can mail you a copy. Ted Nolan ted@braggvax.arpa ------------------------------ Date: Thu, 7 Apr 88 14:10:52 -0100 From: unido!fkihh!marcus@uunet.uu.net (Marcus Moehrmann) Subject: Re: Need advice on SUN - VAX connection Here is my own answer on my "Need advice.." article: After getting several hints on that topic I have been able to connect a Sun 2 (SunOS 3.0) and a Vax 780 (VAX/VMS 4.7) via terminal line. The connection is based on a 3-wired V.24 line, so that hardware-handshake is not needed (and not possible). To the Vax, the Sun is a terminal. The problem was the handshake between Sun and Vax, which is based on XON/XOFF (Ctrl-S and Ctrl-Q). This didn't work properly, so that data was lost. On the Vax-side, the terminal buffer must be made bigger: SET TERMINAL/PERMANENT/ALTYPEAHD This requires some privileges and a *direct* line, e.g. doesn't work with SET HOST <host>. After logging out and in again the setting is active. For permanent setting make an entry in STARTUP.COM. For data exchange with the Sun the terminal must be set the right way, e.g. /HOSTSYNC/TTSYNC for XON/XOFF. On the Sun-side, the line (e.g. /dev/ttya) must be set to TANDEM (defined in /usr/include/sys/ioctl.h), so that XON/XOFF is honored. On a heavy loaded Sun some "silo overflow"s can occur, so data from the Vax will be lost. So I start the data exchange program with nice -10 <command> (in a cshell) to give it a higher priority (must be super user). This works until now (I also set the t-bit for the data exchange program (chmod a+t <file>)). We use this connection to run UUCP (uucico) with the F-protocol. The G-protocol can also be used, but therefor XON/XOFF bust be switched off (no TANDEM; /NOHOSTSYNC/NOTTSYNC), because Ctrl-S and Ctrl-Q is data ! Marcus Marcus Moehrmann UUCP: marcus@fkihh.UUCP TeX: M\"{o}hrmann) PHONE: +49-40-4123-2573 ni Hamburg, W. Germany +49-40-5202464 ------------------------------ Date: Tue, 5 Apr 88 14:02:50 bst From: Robin Boswell <robin%aiva.edinburgh.ac.uk@nss.cs.ucl.ac.uk> Subject: Faster version of draw_circles (Submitted c. March 25th). /* Here is a slightly less inefficient version of the program I sent you a couple of weeks ago. Since mailing the original, I have discovered that the 'optimizing compiler' isn't as intelligent as I had hoped, so I have optimized the source instead. The program now runs faster, but is otherwise unchanged. */ /* The following program implements a simple graphical algorithm described in the "Computer Recreations" column a few years ago. It produces a rasterfile suitable for loading as a background to suntools. The default values for the arguments are chosen so as to give an attractive result. --X----X----X----X----X----X----X----X----X----X----X----X----X----X----X--- */ /* File: draw_circles.c Author: Robin Boswell Updated: Tuesday Apr 5 13:06 (1988) Purpose: Create pretty background rasterfile for monochrome SUN2's and SUN3's Compile with: -lpixrect Usage: draw_circles [-m modulus] [-s scale] [-i] [-f] The -f (frame-buffer) option causes the program to display its output directly on the screen. Otherwise, it writes a rasterfile to the standard output. The -i (invert) option gives a predominantly light background; the default is predominantly dark. A large value for scale gives large circles The default values of the arguments are: modulus = 7, scale = 13. Note: It takes a while. */ #include <pixrect/pixrect_hs.h> #include <stdio.h> #define WIDTH 1152 #define HEIGHT 900 #define DEFAULT_SCALE 13.0 #define DEFAULT_MODULUS 7 struct rasterfile picture = {RAS_MAGIC, WIDTH, HEIGHT, 1, (WIDTH * HEIGHT)/8, RT_STANDARD, RMT_NONE, 0}; main(argc, argv) int argc; char *argv[]; { struct pixrect *pr; int i, j, modulus, half_width, half_height, invert, frame; float scale; float y[HEIGHT], x[WIDTH]; modulus = DEFAULT_MODULUS; scale = DEFAULT_SCALE; invert = 0; frame = 0; while (--argc > 0 && (*++argv)[0] == '-'){ switch((*argv)[1]){ case 'm': if (! (--argc > 0 && sscanf(*++argv, "%d", &modulus) && modulus != 0)){ fprintf(stderr, "modulus must be non-zero integer\n"); exit(-1); } break; case 's': if (! (--argc > 0 && sscanf(*++argv, "%f", &scale) && scale != 0.0)){ fprintf(stderr, "scale must be non-zero float\n"); exit(-1); } break; case 'i': invert = 1; break; case 'f': frame = 1; break; default: fprintf(stderr, "unknown option: %s\n", *argv); exit(-1); } } if (frame) pr = pr_open("/dev/fb"); else pr = mem_create(WIDTH, HEIGHT, 1); /* Each pixel (x,y) becomes white (default) iff modulus divides the floor of x^2 + y^2 (Co-ordinates are scaled, with the origin in the centre of the screen) */ half_width = WIDTH /2; half_height = HEIGHT /2; for (i=0; i < WIDTH; ++i){ x[i] = (i - half_width)/scale; x[i] = x[i] * x[i]; } for (i=0; i < HEIGHT; ++i){ y[i] = (i - half_height)/scale; y[i] = y[i] * y[i]; } pr_rop(pr,0,0,WIDTH,HEIGHT, - (! invert),0,0,0); for (i=0; i < WIDTH; ++i){ for (j=0; j < HEIGHT; ++j){ if (! (((int) (x[i] + y[j])) % modulus)) pr_put(pr, i, j, invert); } } if (frame) pr_close(pr); else { pr_dump_header(stdout, &picture, 0); pr_dump_image(pr, stdout, &picture); } } ------------------------------ Date: Thu, 7 Apr 88 10:59:05 EDT From: ufnmr!gareth@bikini.cis.ufl.edu (Gareth J. Barker) Subject: Compiling "bitdump" A few weeks ago I posted a FIG to screendump filter called 'bitdump'. Unfortunately I neglected to mention how to compile it, so for the record: cc bitdump.c -o bitdump -lpixrect should work. (This will generate a couple of 'type mismatch' type errors - ignore them, they're not fatal. If anyone can tell me what's wrong with my cast operators, I'd be interested to know : 'C' isn't my strong point). My appologies for not replying directly to at least one person out there who wrote to me about this - a typing mistake on one of our non-unix systems here deleted all my mail before I could get the return addresses. Gareth J. Barker, University of Florida, Department of Radiology. BITNET : GJBARKER@UFFSC.BITNET INTERNET : ufnmr!gareth@BIKINI.CIS.UFL.EDU UUCP : ...gatech!uflorida!ufnmr!gareth [[ bitdump.c is short (about 2K) and is in v6n35. --wnl ]] ------------------------------ Date: Thu, 7 Apr 88 09:23:09 EDT From: sunlakes!xox!jeff@sun.com (Jeff Henslin) Subject: slowdown in performance Recently I upgraded my Sun O.S. from 3.2 to 3.5. I also installed yellow pages and added a sun 3/60 to our network (other machines: 3/160's, 3/50's, total of 7) Since that time my X (V 10.4) application programs have slowed considerably, to the point where they are useless. I am wondering if anyone out there may have a clue as to why this is happening. ANY suggestions are welcomed. Jeff Henslin XOX Corporation UUCP: ...!sun!sunlakes!xox!jeff ...!cornell!xox!jeff MAIL: 609 W. Clinton St. Ithaca, NY 14850 PHONE: (607) 277-6661 ------------------------------ Date: Sun, 3 Apr 88 14:59:19 EDT From: mrd%erc1.mcs@omnigate.clarkson.edu Subject: Two bugs: csh "filec" and rlogin xon/xoff I have two bugs for Sun 3.4 and 3.5 and would like to know if anyone know anything about them (eg. how to fix) 1) csh. filename completion. from a client if there is a user, say foo, and I so something to the effect of ls ~fo<esc> this will just return with outgiving the directory. It will complete the file name but won't ever fork ls. I DO NOT get any directory. This does not happen automaticly but will happen if given enough tries. I have tried this under two different systems and 3.4 and 3.5 [[ If I understand what you are saying, you expect ~fo<ESC> to give you a list of possibilities (i.e.: an "ls") that could be filled in at that point and you are disappointed that it does not. But it is working exactly as the documentation says it should. <ESC> only fills in the characters that are not ambiguous. The end-of-file character (^D) gives you a list. Check the manual page for csh(1). --wnl ]] 2) rlogin. xon, xoff. If I rlogin from a sun to any other unix box and use emacs (eg. sun -> sun) and exit emacs with a ^Z, there is a random possibility that when I resume using emacs (using fg) that ^S and ^Q will be turned on as flow control characters (normally emacs uses ^S and ^Q). If suspend emacs again and fg it there is a random possibility that ^S and ^Q will work properly again (from emacs point of view). On the other hand if I rlogin from anything other than a sun this problem will not occur (eg. uVax II 4.3 -> sun works). I have tried this under 3.4 but have not noticed it under 3.5 but we have not had 3.5 very long and I try to avoid suspending emacs when I do. ------------------------------ Date: 6 Apr 88 15:47 -0700 From: Donna Hrynkiw <donna%envy.kwantlen.bcc.cdn@ean.ubc.ca> Subject: Need dsun: troff processor for Sun I'm looking for a troff processor who's output can be displayed on a Sun workstation. My boss tells me there has been mention of a program called 'dsun' in one of the 'sources' groups. There's a "dsun.diff" in the sun-sources archives, but no mention of 'dsun'. Any leads to or volunteers for the dsun source would be gratefully appreciated. Donna Hrynkiw (Relatively new reader of comp.sys.sun) Systems & Computing - Kwantlen College PO Box 9030, Surrey BC Canada V3T 5H8 donna@envy.kwantlen.bcc.cdn ------------------------------ Date: 6 Apr 88 14:59:55 GMT From: robert@pvab.pvab.se (Robert Claeson) Subject: Need more groups I need to be in many groups on my Sun. At login, I get the message "initgroups: too many groups". Is the per-user group count tunable in the Sun kernel? [[ Yes......maybe. /usr/include/sys/param.h has a preprocessor constant called "NGROUPS" which is defined to be 8. Changing this might work, but you can only do so by recompiling the kernel, which you can't do if you don't have source. You should probably also recompile every program that includes param.h (such as login). --wnl ]] ------------------------------ Date: Wed, 6 Apr 88 09:57:26 PDT From: well!gby@uunet.uu.net (Grebgory B. Yates) Subject: get backissues how? As a naive net user I don't understand exactly how to get at the back-issues of sun-spots (v.6n.1, to be precise) from way over here on the Well usenet node in the San Francisco bay area. Is it done via "mail", or do I need a phone number to dial in? Can I use "anonymous FTP" from the Well somehow? Is this something a local guru might be expected to know? A one-sentence reply of some kind would be greatly appreciated. Thanks, Greg Yates Smith-Kettlewell Eye Research Institute [[ "Anonymous FTP" can only be used by those who have direct access to the ARPANet. FTP is a method used on the ARPANet for transferring files between machines, and "anonymous" FTP is a method of doing so without an account on the remote machine. Those who are not on the Usenet can access the archives only through the archive server. This is an automatic mail response program. You can get a specific issue, such as volume 6 issue 1 by sending a message containing the line "send sun-spots v6n1" to the (ARPANet) address "archive-server@rice.edu". Sometimes the server cannot reply to a request because the mail header of the request has an inappropriate return address in it (in an ideal world, this would not happen). Once you send a request, you should get at least an acknowledgement within 24 hours. If you do not, then send another request with the additional line "path address" where "address" is what you think would be an appropriate address for someone AT RICE to send mail to you. If you want more information about the archive server, send it a message containing the line "help". Sorry that this wasn't just one sentence. --wnl ]] ------------------------------ Date: 6 Apr 88 13:32:00 CDT From: "ASUIPF::MC" <mc%asuipf.decnet@spacvax.rice.edu> Subject: blanket windows and gfxsubwindows with SunView? Is there any way to take an existing window over with a new base frame in SunView? This functionality used to be provided with the old gfxsubwindow in SunTools back in the dark ages before 2.0. There's some stuff in the SunView System Programmer's Guide about blanket windows, but it's hard to relate that to the stuff in the SunView Programmer's Manual. I'm using the 3.0 release and the 3.0 manuals, so maybe things have gotten better in the documentation since then. thanks, Mike Caplinger ASU/Caltech Mars Observer Camera Project mc@moc.jpl.nasa.gov or mc%asuipf.decnet@spacvax.rice.edu ------------------------------ Date: 6 Apr 88 18:53:55 GMT From: pixar!fishkin@ucbvax.berkeley.edu (Ken Fishkin) Subject: Detecting suntool invocation? Does anybody know how to have a .login know whether it is being executed a) from console .login versus b) from suntools window creation I have commands I wish executed in one case, but not the other. Please e-mail me any responses; I'll post the answer if anybody requests it. thanks, Ken Fishkin ..ucbvax!pixar!fishkin [[ That one is easy! It's always (a). When suntools starts up a cmdtool or shelltool, the shell it starts doesn't read the .login. It only reads the .cshrc. Honest! The only difficult case is executing stuff in a suntools shell but not at initial login time: the .cshrc is read in both cases and is always read first. Probably the best solution is to check the output of the "tty" command. If it produces "/dev/console" then the current shell is not running under suntools. --wnl ]] ------------------------------ End of SUN-Spots Digest ***********************