Thread View: comp.sys.next.software
2 messages
2 total messages
Started by Gordie Freedman
Tue, 17 Nov 1992 09:12
What is -MachLaunch, and other anomalies ?
Author: Gordie Freedman
Date: Tue, 17 Nov 1992 09:12
Date: Tue, 17 Nov 1992 09:12
77 lines
3748 bytes
3748 bytes
I came up with a trick to "autolaunch" programs without putting them in the workspace. A variant on this technique allows me to launch an app as user X from user Y's workspace (using terminal). But there are problems, and a mysterious -MachLaunch flag involved... Here's what I do: I set the default for Workspace::LaunchPaths "dwrite Workspace LaunchPaths /usr/local/bin/DiskEjectFix.daemon;/gordie/bin/.Workspace" (sorry this didn't fit on one line without Rich text), this causes the .Workspace shell script to run when the workspace starts up. Here's what is in .Workspace: --------- #! /bin/csh -f /LocalApps/NewsGrazer -NXAutoLaunch YES& --------- This launches the NewsGrazer app, and tricks it into thinking it was autolaunched, such that it "hides on autolaunch". This works fine, however, the icon is two dimensional, and the workspace ignores the icon (when another app started, the workspace stuck the new app's icon on top of the NewsGrazer icon). Actually, the NewsGrazer icon starts out normal (3-d effect), and lasts 1 - 2 seconds, and than changes to the flat version. I suspect NewsGrazer is displaying a tiff from it's binary, which for some reason doesn't work (NG changes the tiff on the icon when there is/is-not news). (* see note) If I do the following, I also get the 2-d icon: (from a terminal, like the next example with mail.app) > su - gordie > /LocalApps/NewsGrazer& Here's more: From a terminal app, actually Stuart (the workspace is from a normal login by the user "Mayumi"): > su - gordie > /NextApps/Mail.app/Mail (Note that typing "open /NextApps/Mail.app" insists on running the app as Mayumi's uid, even though I did the su.) The problem here is that PostScript files included in a NeXTMail were represented as the "unknown type" tiff, which is a black and white text with the big question mark in it. Later, when I logged in from using my own workspace, they showed up in the same mail as postscript files with the expected tiff. I don't know what other wierdnesses might occur when running mail this way. So the kicker is when I did "ps -ax" looking at the apps when they were opened from the workspace normally, (or using "open whatever.app"), they looked like this: 8122 ? S 0:03 /LocalApps/NewsGrazer -MachLaunch 17 964 So what's -MachLaunch nn nnn ??? Or why else didn't these apps work correctly when launched directly? The "nn nnn" numbers after -MachLaunch are always different, I suspect they have to meaning to either WS, mach, or the app, and I didn't want to make some up to see what will happen. ----------- * note: Also, a general problem with NewsGrazer is that the icon is the "2.1 gray" color, it starts out as the nice "3/0-blue-gray" icon, but when NG puts its icon on, it is the old grey (I checked with segedit, and the icon tiffs appear to be using transparancy). This occurs even when I launch NG normally and get the full 3-d icon. Anybody know why this happens? -- Gordie Freedman gordie@yamanote.dolphin.com -> NextMail encouraged (Disclaimer: Opinions expressed are my own and represent no one else.)
Re: What is -MachLaunch, and other anomalies ?
Author: Eric P. Scott
Date: Thu, 19 Nov 1992 06:36
Date: Thu, 19 Nov 1992 06:36
25 lines
1679 bytes
1679 bytes
In article <1992Nov17.091215.8231@dolphin.com> gordie@yamanote.dolphin.com (Gordie Freedman) writes: >So what's -MachLaunch nn nnn ??? >Or why else didn't these apps work correctly when launched directly? >The "nn nnn" numbers after -MachLaunch are always different, I suspect >they have to meaning to either WS, mach, or the app, and I didn't want to >make some up to see what will happen. When the Workspace Manager launches an application, it creates the tile; -MachLaunch passes the tile's PostScript window number [second] and a sequence number [first] used to authenticate a reply to Workspace indicating that the launch was successful and initialization completed. In the absence of -MachLaunch, the program assumes that it is not operating under the control of the Workspace Manager, and displays its own tile. Note: the distinction is more than cosmetic; e.g., see the description of powerOff: (Application). In most cases, [[NXApp appIcon] style] is probably the best way to determine if an application's been launched from the Workspace (NX_TOKENSTYLE) or not (NX_MINIWORLDSTYLE). DiskPig uses a different technique, since it wants to seize control before miniworld creation. -=EPS=-
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads