Launching a cocoa app from a print daemon
Launching a cocoa app from a print daemon
- Subject: Launching a cocoa app from a print daemon
- From: Stéphane Puybareau <email@hidden>
- Date: Fri, 05 May 2006 18:27:11 +0200
Hi,
I come from the printing mailing list...
I want to launch a Cocoa App (with a GUI) when a user print on a special
printer...
I've found tea4cups, and it seems to be suitable for this purpose.
Its a backend for CUPS that allow me to run command for each print.
I wrote a small Cocoa App with Xcode and i want tea4cups to launch it.
Firt, i try to launch my app with
/Application/MyApp.app/Contents/MacOS/MyApp &> /test.txt
in this case, when i print, the app say :
# cat /test.txt
2006-05-04 15:01:43.377 tea4cups[26685] No Info.plist file in
application bundle or no NSPrincipalClass in the Info.plist file, exiting
and exit
I also try to use the open command :
/usr/bin/open /Application/MyApp.app
In this case, when I print, the application bounce in the dock and quit
immediately... I don't see any crash reporter window (the crash report
level is set to Developer).
I also try to add a su -c /usr/bin/open /Application/MyApp.app $TEAUSERNAME
($TEAUSERNAME is an environment var thar contain the name of the user
who ask the print)
How can I manage to properly launch my application when I print ?
Is there a way to catch the standard output and the standard error from
MyApp when it's launched with open ?
I understand that the backend and the user may not be on the same host.
But in my case, it's not...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden