diff -Nur GWorkspace-0.8.6.orig/GWMetadata/MDFinder/main.m GWorkspace-0.8.6.initWithArguments/GWMetadata/MDFinder/main.m --- GWorkspace-0.8.6.orig/GWMetadata/MDFinder/main.m 2007-01-07 04:39:04.000000000 -0700 +++ GWorkspace-0.8.6.initWithArguments/GWMetadata/MDFinder/main.m 2008-11-19 22:03:02.000000000 -0700 @@ -29,7 +29,13 @@ int main(int argc, char **argv, char **env) { CREATE_AUTORELEASE_POOL (pool); - NSApplication *app = [NSApplication sharedApplication]; + NSApplication *app; +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: env]; +#endif + + app = [NSApplication sharedApplication]; + [app setDelegate: [MDFinder mdfinder]]; [app run]; diff -Nur GWorkspace-0.8.6.orig/GWorkspace/main.m GWorkspace-0.8.6.initWithArguments/GWorkspace/main.m --- GWorkspace-0.8.6.orig/GWorkspace/main.m 2006-06-26 05:34:07.000000000 -0600 +++ GWorkspace-0.8.6.initWithArguments/GWorkspace/main.m 2008-11-19 22:03:02.000000000 -0700 @@ -30,8 +30,15 @@ int main(int argc, char **argv, char **env) { CREATE_AUTORELEASE_POOL (pool); - GWorkspace *gw = [GWorkspace gworkspace]; - NSApplication *app = [NSApplication sharedApplication]; + GWorkspace *gw; + NSApplication *app; + +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: env]; +#endif + + gw = [GWorkspace gworkspace]; + app = [NSApplication sharedApplication]; [app setDelegate: gw]; [app run]; diff -Nur GWorkspace-0.8.6.orig/Recycler/main.m GWorkspace-0.8.6.initWithArguments/Recycler/main.m --- GWorkspace-0.8.6.orig/Recycler/main.m 2006-06-20 10:53:53.000000000 -0600 +++ GWorkspace-0.8.6.initWithArguments/Recycler/main.m 2008-11-19 22:03:02.000000000 -0700 @@ -32,6 +32,9 @@ int main(int argc, char **argv, char **env) { CREATE_AUTORELEASE_POOL (pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: env]; +#endif Recycler *recycler = [Recycler recycler]; NSApplication *app = [NSApplication sharedApplication]; diff -Nur GWorkspace-0.8.6.orig/Tools/ddbd/ddbd.m GWorkspace-0.8.6.initWithArguments/Tools/ddbd/ddbd.m --- GWorkspace-0.8.6.orig/Tools/ddbd/ddbd.m 2007-02-07 05:36:10.000000000 -0700 +++ GWorkspace-0.8.6.initWithArguments/Tools/ddbd/ddbd.m 2008-11-19 22:03:02.000000000 -0700 @@ -496,9 +496,13 @@ } -int main(int argc, char** argv) +int main(int argc, char** argv, char** env) { CREATE_AUTORELEASE_POOL(pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: +env]; +#endif NSProcessInfo *info = [NSProcessInfo processInfo]; NSMutableArray *args = AUTORELEASE ([[info arguments] mutableCopy]); static BOOL is_daemon = NO; diff -Nur GWorkspace-0.8.6.orig/Tools/fswatcher/fswatcher-inotify.m GWorkspace-0.8.6.initWithArguments/Tools/fswatcher/fswatcher-inotify.m --- GWorkspace-0.8.6.orig/Tools/fswatcher/fswatcher-inotify.m 2007-03-07 17:57:26.000000000 -0700 +++ GWorkspace-0.8.6.initWithArguments/Tools/fswatcher/fswatcher-inotify.m 2008-11-19 22:03:02.000000000 -0700 @@ -1041,6 +1041,10 @@ int main(int argc, char** argv) { CREATE_AUTORELEASE_POOL(pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: +env]; +#endif NSProcessInfo *info = [NSProcessInfo processInfo]; NSMutableArray *args = AUTORELEASE ([[info arguments] mutableCopy]); static BOOL is_daemon = NO; diff -Nur GWorkspace-0.8.6.orig/Tools/fswatcher/fswatcher.m GWorkspace-0.8.6.initWithArguments/Tools/fswatcher/fswatcher.m --- GWorkspace-0.8.6.orig/Tools/fswatcher/fswatcher.m 2007-02-16 11:41:00.000000000 -0700 +++ GWorkspace-0.8.6.initWithArguments/Tools/fswatcher/fswatcher.m 2008-11-19 22:03:02.000000000 -0700 @@ -825,9 +825,13 @@ @end -int main(int argc, char** argv) +int main(int argc, char** argv, char** env) { CREATE_AUTORELEASE_POOL(pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: +env]; +#endif NSProcessInfo *info = [NSProcessInfo processInfo]; NSMutableArray *args = AUTORELEASE ([[info arguments] mutableCopy]); static BOOL is_daemon = NO; diff -Nur GWorkspace-0.8.6.orig/Tools/lsfupdater/lsfupdater.m GWorkspace-0.8.6.initWithArguments/Tools/lsfupdater/lsfupdater.m --- GWorkspace-0.8.6.orig/Tools/lsfupdater/lsfupdater.m 2006-10-14 06:15:45.000000000 -0600 +++ GWorkspace-0.8.6.initWithArguments/Tools/lsfupdater/lsfupdater.m 2008-11-19 22:03:02.000000000 -0700 @@ -1192,9 +1192,14 @@ @end -int main(int argc, char** argv) +int main(int argc, char** argv, char** env) { CREATE_AUTORELEASE_POOL (pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: +env]; +#endif + if (argc > 1) { NSString *conname = [NSString stringWithCString: argv[1]]; diff -Nur GWorkspace-0.8.6.orig/Tools/searchtool/searchtool.m GWorkspace-0.8.6.initWithArguments/Tools/searchtool/searchtool.m --- GWorkspace-0.8.6.orig/Tools/searchtool/searchtool.m 2006-10-14 06:12:12.000000000 -0600 +++ GWorkspace-0.8.6.initWithArguments/Tools/searchtool/searchtool.m 2008-11-19 22:03:02.000000000 -0700 @@ -394,9 +394,12 @@ @end -int main(int argc, char** argv) +int main(int argc, char** argv, char** env) { CREATE_AUTORELEASE_POOL (pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: env]; +#endif if (argc > 1) { NSString *conname = [NSString stringWithCString: argv[1]]; diff -Nur GWorkspace-0.8.6.orig/Tools/thumbnailer/main.m GWorkspace-0.8.6.initWithArguments/Tools/thumbnailer/main.m --- GWorkspace-0.8.6.orig/Tools/thumbnailer/main.m 2006-06-20 10:52:02.000000000 -0600 +++ GWorkspace-0.8.6.initWithArguments/Tools/thumbnailer/main.m 2008-11-19 22:03:02.000000000 -0700 @@ -654,9 +654,12 @@ @end -int main(int argc, char** argv) +int main(int argc, char** argv, char** env) { CREATE_AUTORELEASE_POOL(pool); +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: env]; +#endif NSProcessInfo *info = [NSProcessInfo processInfo]; NSMutableArray *args = AUTORELEASE ([[info arguments] mutableCopy]); static BOOL is_daemon = NO; diff -Nur GWorkspace-0.8.6.orig/Tools/wopen/wopen.m GWorkspace-0.8.6.initWithArguments/Tools/wopen/wopen.m --- GWorkspace-0.8.6.orig/Tools/wopen/wopen.m 2006-06-20 10:51:37.000000000 -0600 +++ GWorkspace-0.8.6.initWithArguments/Tools/wopen/wopen.m 2008-11-19 22:03:16.000000000 -0700 @@ -36,6 +36,10 @@ NSString *fullPath = nil; BOOL isDir = NO; id gworkspace = nil; + +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments: argv count: argc environment: env_c]; +#endif pool = [NSAutoreleasePool new]; fm = [NSFileManager defaultManager];