Re: "Double-click apps"
Re: "Double-click apps"
- Subject: Re: "Double-click apps"
- From: "Torrey T. Lyons" <email@hidden>
- Date: Mon, 10 Nov 2003 17:15:32 -0800
At 8:41 AM -0800 11/6/03, Ernest Prabhakar wrote:
On Nov 5, 2003, at 10:01 PM, email@hidden wrote:
http://www.apple.com/macosx/features/x11/ mentions this feature:
"Double-click apps Launch X11 applications directly in the Finder"
but there doesn't appear to be any documentation about it. Does anyone
know if this is this something more than what people have been doing
using AppleScript applets (I'm assuming yes based on the document
bundle references in Info.plist), and, if so, is there a provided
interface for doing this or is it simply a matter of creating bundles
by hand?
This is a feature of Launch Services in Panther. It works with
any UNIX binary. The process is:
a) When Finder is trying to associate an icon with a file, it checks
if (i) it has the execute bit set, plus (ii) it does not already
have an extension. If both are true, it tags it as a UNIX
executable.
b) When you actually double-click the file, it sniffs the binary to
see if it links against X11. If so, it assigns the virtual
extension '.x11app'; otherwise, it assigns it as type '.command'.
c) Based on that extension (which you could also assign manually),
Launch Services searches for the appropriate application.
d) Apple's X11.app claims the .x11app extension, and thus it treats
X11 binaries as one of its documents. Other X11 GUIs could also
claim that extension, and handle binaries similarly. You can
change the default application by using Get Info on a file with that
explicit extension.
Unfortunately, this does not work in practice. Here are some of the
problems you run into:
1. Everything in /usr/X11R6/bin and most other places you are likely
to find X11 binaries will be in a directory owned by root. You can't
use "Get Info" to change the default application in a directory owned
by root.
2. If you have OroborOSX installed, the popup menu for "Open with:"
will show OroborOSX and only OroborOSX. X11.app or XDarwin do not
even appear. Of course, you can't actually select OroborOSX because
of #1, but its an interesting glitch. I believe the problem is that
OroborOSX has decided it is important enough to be an "Editor" of X11
executables rather then just a "Viewer", which X11.app and XDarwin
register as.
3. Because X11.app lists itself as "LSIsAppleDefaultForType" and the
"Open with" preference is unchangeable, you always get X11.app if it
is installed on your system.
4. One thing that works reliably is that you can drag an executable
onto the icon of your X server of choice.
This new idea of treating binaries as documents is very cool.
However, for it to be useful #1 has to be fixed.
--Torrey
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.