home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aux
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!rs6000.cmp.ilstu.edu!ejbehr
- From: ejbehr@rs6000.cmp.ilstu.edu (Eric Behr)
- Subject: Re: AUX Problem STRANGE!!! curses client
- Message-ID: <1993Jan09.184555.17480@rs6000.cmp.ilstu.edu>
- Date: Sat, 09 Jan 1993 18:45:55 GMT
- Reply-To: behr@math.ilstu.edu (Eric Behr)
- Organization: Central Illinois Surfing Club
- Lines: 52
-
- dgaraffa@bigmac.mskcc.org (Dave Garaffa) writes:
- >
- >I have a VERY strange proble with the curses client of gopher 1.1:
- >
- >When I run as non-root (dgaraffa) everything is just fine!
- >
- >BUT
- >
- >When I run as root (or do a su from dgaraffa) the client will not respond
- >to cursor movement or 'capture' any of the single key commands.
- [...]
-
- I'm posting because I hope others may shed some light on this weirdness.
-
- I've seen identical behavior, except in my case some of the beta clients
- behaved better after su - and worse when run by a regular user under csh.
- The fact that the problem suddenly appears may have something to do with
- the presence/absence of the .gopherrc file; another user reported that he
- noticed the relationship. I could not determine a strong correlation, but I
- know that some versions of the client create the file whether it's needed
- or not, while others only create it when you use bookmarks. So the problem
- can conceivably show up only after days of normal behavior.
-
-
- There were two problems in my case: one was that the ordinary user saw the
- menu misaligned:
- --> 1. Item a
- 2. Item b
- 3. Item c,
- i.e. only the current item was indented properly. Root under sh saw a
- properly aligned menu. After hours of eliminating differences between the
- two environments I found that a variable EDITOR which was set to /usr/bin/vi
- in users' .login and undefined for root made the difference. I got rid of
- it and the problem disappeared. Why can that be???
-
- Second problem was precisely the one that Dave describes. Curses seemed to
- have trouble going into the cbreak mode after the gopher window was
- initialized. However, I noticed that sending the gopher an interrupt, and
- then answering "no" (don't quit) -- thus going back into the client -- made
- the cursor keys start behaving properly. The only thing I could see in the
- source is that in this sequence of events, the CURinit() function got
- called twice compared to just once in normal circumstances. So I added a
- second call to CURSetScreen(cur, initscr()) in CURinit(), just under the
- one which was already there (this is all in the file CURcurses.c). Voila,
- the client started working fine, for regular users and root alike.
-
- Naturally, I still have no idea what is going on, and I'd like to know
- because I hate such kludgey fixes!
-
- --
- Eric Behr, Illinois State University, Mathematics Department
- behr@math.ilstu.edu or behr@ilstu.bitnet (please avoid!)
-