home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aux / 4579 < prev    next >
Encoding:
Text File  |  1993-01-09  |  2.8 KB  |  63 lines

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