home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / software / 2685 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  3.6 KB

  1. Xref: sparky comp.sys.next.software:2685 comp.sys.next.sysadmin:6547
  2. Newsgroups: comp.sys.next.software,comp.sys.next.sysadmin
  3. Path: sparky!uunet!usc!sdd.hp.com!spool.mu.edu!umn.edu!csus.edu!netcom.com!netcomsv!dolphin!yamanote!gordie
  4. From: gordie@yamanote.dolphin.com (Gordie Freedman)
  5. Subject: What is -MachLaunch, and other anomalies ?
  6. Message-ID: <1992Nov17.091215.8231@dolphin.com>
  7. Keywords: MachLaunch, NewsGrazer, Mail.app
  8. Sender: gordie@dolphin.com
  9. Reply-To: gordie@yamanote.dolphin.com
  10. Organization: Dolphin Software
  11. Date: Tue, 17 Nov 1992 09:12:15 GMT
  12. Lines: 78
  13.  
  14. I came up with a trick to "autolaunch" programs without putting them in  
  15. the workspace. A variant on this technique allows me to launch an app as  
  16. user X from user Y's workspace (using terminal). But there are problems,  
  17. and a mysterious -MachLaunch flag involved...
  18.  
  19. Here's what I do:
  20.  
  21. I set the default for Workspace::LaunchPaths
  22. "dwrite Workspace LaunchPaths  
  23. /usr/local/bin/DiskEjectFix.daemon;/gordie/bin/.Workspace" (sorry this  
  24. didn't fit on one line without Rich text), this causes the .Workspace  
  25. shell script to run when the workspace starts up. Here's what is in  
  26. .Workspace:
  27. ---------
  28. #! /bin/csh -f
  29.  
  30. /LocalApps/NewsGrazer -NXAutoLaunch YES&
  31. ---------
  32.  
  33. This launches the NewsGrazer app, and tricks it into thinking it was  
  34. autolaunched, such that it "hides on autolaunch". This works fine,  
  35. however, the icon is two dimensional, and the workspace ignores the icon  
  36. (when another app started, the workspace stuck the new app's icon on top  
  37. of the NewsGrazer icon). Actually, the NewsGrazer icon starts out normal  
  38. (3-d effect), and lasts 1 - 2 seconds, and than changes to the flat  
  39. version. I suspect NewsGrazer is displaying a tiff from it's binary, which  
  40. for some reason doesn't work (NG changes the tiff on the icon when there  
  41. is/is-not news). (* see note)
  42.  
  43. If I do the following, I also get the 2-d icon:
  44.  
  45. (from a terminal, like the next example with mail.app)
  46. > su - gordie
  47. > /LocalApps/NewsGrazer&
  48.  
  49.  
  50. Here's more:
  51.  
  52. From a terminal app, actually Stuart (the workspace is from a normal login  
  53. by the user "Mayumi"):
  54.  
  55. > su - gordie
  56. > /NextApps/Mail.app/Mail
  57.  
  58. (Note that typing "open /NextApps/Mail.app" insists on running the app as  
  59. Mayumi's uid, even though I did the su.)
  60.  
  61. The problem here is that PostScript files included in a NeXTMail were  
  62. represented as the "unknown type" tiff, which is a black and white text  
  63. with the big question mark in it. Later, when I logged in from using my  
  64. own workspace, they showed up in the same mail as postscript files with  
  65. the expected tiff. I don't know what other wierdnesses might occur when  
  66. running mail this way.
  67.  
  68. So the kicker is when I did "ps -ax" looking at the apps when they were  
  69. opened from the workspace normally, (or using "open whatever.app"), they  
  70. looked like this:
  71.  
  72. 8122 ?  S     0:03 /LocalApps/NewsGrazer -MachLaunch 17 964
  73.  
  74. So what's -MachLaunch nn nnn ???
  75. Or why else didn't these apps work correctly when launched directly?
  76. The "nn nnn" numbers after -MachLaunch are always different, I suspect  
  77. they have to meaning to either WS, mach, or the app, and I didn't want to  
  78. make some up to see what will happen.
  79.  
  80. -----------
  81.  
  82. * note: Also, a general problem with NewsGrazer is that the icon is the  
  83. "2.1 gray" color, it starts out as the nice "3/0-blue-gray" icon, but when  
  84. NG puts its icon on, it is the old grey (I checked with segedit, and the  
  85. icon tiffs appear to be using transparancy). This occurs even when I  
  86. launch NG normally and get the full 3-d icon. Anybody know why this  
  87. happens?
  88. -- 
  89. Gordie Freedman gordie@yamanote.dolphin.com   ->   NextMail encouraged
  90. (Disclaimer: Opinions expressed are my own and represent no one else.)
  91.  
  92.