On 8/3/07, Andreas Höschler <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> >> now that the major issues are fixed I am going for the minor ones. :-)
>
> I just continue to let you know what I encounter in the hope that it
> will be of help to someone. I spent some time on logout now which still
> fails for me following the standard procedure. I fire up my session
> with the following script (exec etoile in dtlogin)
>
> pico /usr/local/bin/etoile
>
> #!/bin/sh
> . /opt/GNUstep/System/Library/Makefiles/GNUstep.sh
> etoile_system
>
> chmod a+x /usr/local/bin/etoile
>
> The system comes up fine. When I click on Log Out in EtoileMenuServer
> noting happens. I followed the chain of method calls up to the
> following method in ApplicationManager:
The logout is supposedly to be handed by both etoile_system and
EtoileBehavior.
It gives applications a chance to interrupt logout if there are
document unsaved.
Do you have EtoileBehavior in your user default as user bundles ?
If so, I guess we need to look at the problem.
Yen-Ju
>
> - (void)terminateAllApplicationsOnOperation: (NSString *) operation
> {
> /* If we are already in a log out procedure we discard any other log
> out
> requests. This acts as a primitive lock that coalesces log out
> requests. */
>
> NSLog(@"%@ terminateAllApplicationsOnOperation %@ asas %d", self,
> operation, logOut);
> if (logOut) return;
>
> /* We set up a pool in case the method has been called in a thread */
> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
> NSArray *ommitedApps = [[SCSystem serverInstance] maskedProcesses];
> NSEnumerator *e = [launchedApplications objectEnumerator];
> NSDictionary *appEntry = nil;
> NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
>
>
> NSLog(@"launchedApplications %@", launchedApplications);
> NSLog(@"ommitedApps %@", ommitedApps);
> NSLog(@"workspace %@", workspace);
>
> NSDebugLLog(@"ApplicationManager", @"Trying to terminate all apps
> except: %@",
> ommitedApps);
>
> /* We clean old application proxy list to be sure it's really empty
> */
> [waitedApplications removeAllObjects];
>
> logOut = YES; /* Entering log out procedure */
>
> /* First case, no applications running */
> NSLog(@"userApplications %@", [self userApplications]);
> if ([[self userApplications] count] == 0)
> {
> [[SCSystem serverInstance]
> performSelectorOnMainThread:
> @selector(replyToLogOutOrPowerOff:)
>
> withObject: nil
> waitUntilDone: NO];
> }
>
> /* Second case, some applications running */
> while ((appEntry = [e nextObject]) != nil)
> {
> NSString *appName = [appEntry objectForKey: @"NSApplicationName"];
> NSApplicationTerminateReply reply = -1;
> id app = nil;
>
> NSLog(@"appName %@", appName); // the first app encountered here
> is Terminal.app
>
> /* Skip System tasks */
> if ([ommitedApps containsObject: appName]) continue;
>
> // FIXME: -connectToApplication:launch: from WorkspaceCommKit
> doesn't
> work,
> // wrongly triggering an NSConnection method something like
> // _services:forwardToProxy:. Therefore we use a private
> NSWorkspace
> method
> // for now.
> app = [workspace _connectApplication:appName];
>
> NSLog(@"app %@", app); // this is never logged out
> ...
> }
>
> Since app is never logged out I guess that [workspace
> _connectApplication:appName] is either hanging or raising an exception.
> I haven't followed this any further but instead did the following:
>
> pico
> /usr/src/Etoile-0.2/Build/WorkspaceCommKit/NSWorkspace+Communication.m
>
> - (id)connectToWorkspaceApplicationLaunch:(BOOL)launchFlag
> {
> NSString *appName = [[NSUserDefaults standardUserDefaults]
> objectForKey: @"GSWorkspaceApplication"]; // <------
> if (appName == nil) appName = @"/etoilesystem";
> NSLog(@"appName %@", appName);
> result = [self connectToApplication: appName launch: launchFlag]; //
> this returns SCSystem (etoile_system)
> NSLog(@"result %@", result);
> return result;
> }
>
> I am setting
>
> defaults write NSGlobalDomain GSWorkspaceApplication Finder
>
> and implementing logout in the application delegate of Finder as
> follows:
>
> - (void)logOut
> {
> system("pkill etoile &");
> }
>
> This is a hack - never work as root or your collegues will be against
> you - but I am at least able to log out this way. :-) May be you guys
> should implement something like that in Outerspace.app as well and let
> the user decide - by defining GSWorkspaceApplication or not - whether
> he wants the default behaviour - which does not seem to be stable yet -
> or this fallback solution.
>
> Now that logout works for me as well I am a happy Etoile user!!!
>
> Regards,
>
> Andreas
>
>
>
>
>
>
>
>
> _______________________________________________
> Etoile-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-discuss
>
_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss