Changing file "kind" from document to application

How do I change a file "kind" from a document (which is opened by another program) to an executable application?

I have some .sea file from Epson that will not open with Stuffit Expander on my iMac with Tiger. I can open them on my iBook with Panther, but they open as independant applications, without Stuffit at all. (Show info does even have the choice for "open with" and under "kind" it says "application")

How can I change the settings on my iMac system so that the .sea extension also indicates an executable program?

iMac G5, Mac OS X (10.4.3)

Posted on Dec 18, 2005 8:40 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 20, 2005 11:41 AM

Thank you for the links! That makes is so much easier to troubleshoot the problem.

Okay, the files I downloaded from those links are single-file, dual-fork, Carbonized CFM applications. Or, in plain English, they're a Carbonized application that should be able to run either natively in OS X or in OS 9, or if desired, forced to run in the Classic environment by checking the "Open in Classic environment" box in the Get Info window.

Since the application is a single file, it has the file type of 'APPL', a creator code of 'STi0', and a filename extension of '.sea'. The file should be listed as an "Application", and there shouldn't be an "Open With:" section appearing in the Get Info window for it.

Why Aladdin/Allume chose to use a filename extension of ".sea" I'm not sure, as technically, since it's a single file with an 'APPL' file type, the file need not have any extension at all to work as an application.

A combination of discarding the already downloaded files, updating to the latest version of Stuffit Expander, discarding any older versions of Stuffit, rebuiding the Launch Services database properly, disabling the "com.apple.LaunchServices.plist" file, and redownloading the files should solve the problem.

It would be best to discard the files you already have, since if you've attempted to do anything to the "Open With" section of the Get Info window for the file, it alters the file by adding an 'usro' resource to the resource fork. That addition may cause the file to be treated differently after everything else is done.

Since you mentioned you already tried rebuilding the Launch Services database which didn't solve the problem, I wonder if you might want to try updating to the latest version of Stuffit. Either version 9.x or 10.x ought to be sufficient--it's just the earlier versions that I'm not sure about. The reason for this is that the information that populates the LS database is extracted directly from the applications on your Mac, so if there were any problems with the document-to-application information in the older versions of Stuffit, a rebuild in and of itself wouldn't fix the problem.

I'm not sure how Tiger Cache Cleaner will rebuild the database, but a couple of key things should happen in order for the rebuild to be what I would consider "properly done". First of all, the Finder makes extensive use of the LS database, and most likely keeps some form of it cached in its RAM. As you work with the Finder, and for example, drag a new application to your /Applications/ folder, it updates the LS information in its cached version. Then, periodically, it will save this updated LS information to the cache file on the disk. When you issue a rebuild command using the "lsregister" command-line tool, it will rebuild the cache file on disk. If the Finder is running, however, it could at a later time overwrite the cleaned LS file on disk with the information it has cached in its RAM. For that reason, the Finder should not be running while the rebuild is performed. After the rebuild is complete, you should really restart your Mac to make sure that any other applications that were relying on the LS database file by reading it into memory, will be using the proper version. I've written an AppleScript that will rebuild the LS database in this fashion, which you can get at http://homepage.mac.com/mdouma46/images/LaunchServicesDatabaseRebuild.zip (.zip, ~ 8 KB).

After the rebuild but before you restart, disable the following preference file which keeps track of any custom document-to-application bindings:

/Users/~/Library/Preferences/com.apple.LaunchServices.plist

Then restart and redownload the files and hopefully they should appear properly.

Hope this helps....

Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)
19 replies
Question marked as Top-ranking reply

Dec 20, 2005 11:41 AM in response to Michael Wolf5

Thank you for the links! That makes is so much easier to troubleshoot the problem.

Okay, the files I downloaded from those links are single-file, dual-fork, Carbonized CFM applications. Or, in plain English, they're a Carbonized application that should be able to run either natively in OS X or in OS 9, or if desired, forced to run in the Classic environment by checking the "Open in Classic environment" box in the Get Info window.

Since the application is a single file, it has the file type of 'APPL', a creator code of 'STi0', and a filename extension of '.sea'. The file should be listed as an "Application", and there shouldn't be an "Open With:" section appearing in the Get Info window for it.

Why Aladdin/Allume chose to use a filename extension of ".sea" I'm not sure, as technically, since it's a single file with an 'APPL' file type, the file need not have any extension at all to work as an application.

A combination of discarding the already downloaded files, updating to the latest version of Stuffit Expander, discarding any older versions of Stuffit, rebuiding the Launch Services database properly, disabling the "com.apple.LaunchServices.plist" file, and redownloading the files should solve the problem.

It would be best to discard the files you already have, since if you've attempted to do anything to the "Open With" section of the Get Info window for the file, it alters the file by adding an 'usro' resource to the resource fork. That addition may cause the file to be treated differently after everything else is done.

Since you mentioned you already tried rebuilding the Launch Services database which didn't solve the problem, I wonder if you might want to try updating to the latest version of Stuffit. Either version 9.x or 10.x ought to be sufficient--it's just the earlier versions that I'm not sure about. The reason for this is that the information that populates the LS database is extracted directly from the applications on your Mac, so if there were any problems with the document-to-application information in the older versions of Stuffit, a rebuild in and of itself wouldn't fix the problem.

I'm not sure how Tiger Cache Cleaner will rebuild the database, but a couple of key things should happen in order for the rebuild to be what I would consider "properly done". First of all, the Finder makes extensive use of the LS database, and most likely keeps some form of it cached in its RAM. As you work with the Finder, and for example, drag a new application to your /Applications/ folder, it updates the LS information in its cached version. Then, periodically, it will save this updated LS information to the cache file on the disk. When you issue a rebuild command using the "lsregister" command-line tool, it will rebuild the cache file on disk. If the Finder is running, however, it could at a later time overwrite the cleaned LS file on disk with the information it has cached in its RAM. For that reason, the Finder should not be running while the rebuild is performed. After the rebuild is complete, you should really restart your Mac to make sure that any other applications that were relying on the LS database file by reading it into memory, will be using the proper version. I've written an AppleScript that will rebuild the LS database in this fashion, which you can get at http://homepage.mac.com/mdouma46/images/LaunchServicesDatabaseRebuild.zip (.zip, ~ 8 KB).

After the rebuild but before you restart, disable the following preference file which keeps track of any custom document-to-application bindings:

/Users/~/Library/Preferences/com.apple.LaunchServices.plist

Then restart and redownload the files and hopefully they should appear properly.

Hope this helps....

Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)

Dec 19, 2005 9:31 AM in response to Michael Wolf5

As you have noticed, changing the extension to .app is one way to tell Tiger these files should be treated as apps. Another that may work is to change the four letter type code to "APPL." To do this, you can use a third party utility like "FileWiz," freeware you can download from http://www.hi-voltage.com.au/filewiz.php.

Type codes are the legacy method used by the old Mac OS to determine file types. Tiger supports both extensions & type/creator codes, giving preference to the codes if present. Because of this, it is best to use this method only for Classic files.

To change an application to open in Classic OS9 instead of OSX, it must be one that supports both. These are rare & mostly date from the transision period when OS 9 was still popular. (One example is Photoshop Elements 2, circa 2002.) If you use "Get Info" on one of these apps, you will see in the "General" section a checkbox to open it in the Classic environment. Otherwise, you would need both OS X & Classic OS 9 versions of the app.

Dec 18, 2005 8:56 AM in response to Michael Wolf5

.sea's are self-extracting archives that are Classic applications. Do you have the Classic environment installed on both Macs? If the Classic environment isn't installed on the iMac, OS X might not have any other choice but to regard the item as a document rather than a Classic application.

Hope this helps....

Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)

Dec 20, 2005 6:16 AM in response to Michael Wolf5

Hi all

May I join the party?

Mark

The .sea file opens natively in my case (OS 10.4.3, no classic installed).

Michael. I cannot offere any better advice but I can sure echo Mark. There's probably a problem with you LaunchServices database and/or preference file. Get rid of them. and restart. Additionally launch termin al and type the following:

ls -aol

Leave a space after the "-aol" switches and drag the problematic .sea file ( not the fixed one) onto the terminal window. Press return. Is the execute bit intact?

Dec 20, 2005 10:31 AM in response to Michael Wolf5

Michael,

I see two downloads at the link. The TWAIN driver/scan utility is for v10.2.x - 10.3.9. The printer driver (v2.5aA) is for v10.2.x - 10.4.x. Which file are you talking about? Also, did you download it with the Panther Mac?

I tried downloading both with 10.4.3. Both are applications with "Open with..." listed as themselves. Neither has a Classic checkbox. The first (for 10.3.9) expands into a folder but it is empty. The second expands into a .dmg file & a PDF without problems.

My guess is the first file is not Tiger compatible, which may explain why Tiger doesn't recognize it if you have copied it from the laptop. In any event, it isn't listed as being for Tiger, so it probably won't work even if you do succeed in expanding its contents.

Dec 19, 2005 6:17 PM in response to Michael Wolf5

True traditional .sea files are not OS X applications, they are Classic 68k applications that use the old 68k 'CODE' executable resource. The file is dual-fork with the archive in the data fork and the executable code which decodes the archive in the resource fork. The file will have a file type of 'APPL' signifying that it's an application. These files can, in a sense, be treated as either a document or an application. You can use Stuffit Expander, running natively in OS X, to expand the archive portion of the .sea file. In that case, the file is treated as if it were a document. You could also execute the .sea file as an application, though it will launch under the Classic environment, to expand the archive through the built-in method.

As far as I know, there are no .sea files which could be launched natively in OS X to expand themselves.

Stuffit 10 can create OS X native equivalents to self extracting archives, however, they do not use the .sea filename extension. They use the bundled application format, meaning they are not a single file, but a package of many files which appear as one file. The test archive I just created has a filename extension of ".app".

"Okay, I just made a useful discovery. If I change the extension of those Epson .sea files to .app, they work perfectly (in OSX)! So I have a nice workaround, but I would still like to know how to tell my system that .sea files are to be executed, not opened by other programs."

What do you mean by they work perfectly? You can launch them to have them extract themselves, or you were able to open them in Stuffit Expander, or?

Do you have a link to where you obtained the file in question? I'd be interested to take a look at it. I'm still confused about what exactly your looking at.

It sounds as though your Launch Services database could be corrupted, though I'm not sure.

Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)

Dec 20, 2005 8:24 AM in response to Michael Wolf5

Hi, Y'all!

I have a really low-tech idea, Michael:

Call Epson's tech. support!
Their live tech. support phone # in the US is (562) 276-4382, M-F 6AM-6PM (PT). Otherwise, check their website.
Here're the reasons I urge you to try this:
(a) I've had to do so several times, and their instructions for troubleshooting Mac installations are more convoluted than Perseus' path to the Medusa! Absolutely incredible. There may be more problems afoot than are being discussed here.
(b) I think they've ported a lot from another platform — which probably explains (a) and why a lot of normal "Mac-logic" is useless
(c) The call's free for some months (3?) after purchase, then becomes ~$10. Not too bad, when your printer or other peripheral won't work...
Regards,
Dean
p.s. They also provide email and recorded phone support for free — but I'm guessing "live" would be the most help in a case where they've done something this screwy...

Dec 19, 2005 6:25 PM in response to Michael Wolf5

Ahah, okay, I think I know what's going on. By changing the name of the item, you caused a change to take place that would require the item to be re-registered with Launch Services. In other words, Launch Services, by way of its database cache file, was considering a file with a file type of 'APPL', filename extension of '.sea', and whatever creator code was present, as a document file and not one that could be executed. This is most likely caused by a corruption in the Launch Services cache file. When you changed the filename extension from '.sea', to '.app', it was enough to cause Launch Services to rediscover and parse the file again, this time gathering the information properly and regarding the file as an application. Since you're using OS X 10.4.3, the file should say "Application (Classic)" for Kind. Is that correct?

Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)

Dec 21, 2005 9:34 AM in response to Michael Wolf5

While I was playing around in the Finder doing some experiments, for a brief period, I was able to obtain the same similar situation as you. I created an empty file and was playing around with setting the file type to 'APPL', and changing the filename extension do different ones. At one point it looked as though the file was indeed regarded as an application, yet the Open With section did appear, and I believe 3 applications showed in the pop-up menu, one of which was Script Editor. Then, as suddenly as this behavior had appeared, the Open With section disappeared. This may be evidence of an underlying bug in Launch Services.

Okay, I just did some further testing. and am able to produce the odd behavior similar to yours. I first created an empty file on my Desktop using 'touch ~/Desktop/testFileApp' in the Terminal. I then used the Finder to make a copy of the file. I opened the copy in XRay, and set the file type to 'APPL' as in the following image:

User uploaded file

I saved the changes and then returned to the Finder. To the right is the Get Info window for this file, which is listed as an Application yet there's an Open With that appears. (The reason this file is considered a Classic application rather than a native application is because Launch Services checks the resource fork to look for any signs that the app might be Carbonized, and since this file is empty, nothing is found and it assumes that it's Classic). As you can see, Script Editor appears in the popup menu. Now, if I take this file and create duplicate it, select that copy, and open a Get Info window, this is what appears:

User uploaded file

Notice that the information displayed is properly reflecting that the item is indeed an application, and there's no Open With section in the Get Info window.

If I quit the Finder and relaunch it, the information for both the first "testFileApp copy" and "testFileApp copy 1" are displayed properly like in the second image above. The Finder seems to be holding onto some information about the first file from before and after the changes XRay made, and you end up with some weird hybrid situation where it thinks it's a little bit of both. What we're seeing right here is probably evidence of a bug in the Finder.

I'm not sure what to suggest in your case, but if the Open With section of the Get Info window is displaying, I wouldn't use it to try remapping it to open with any other thing, including itself. What I mean is, I don't think that will help anything. What you really want is for the Finder and Get Info window to appear as in the second image, where the file is fully treated as an application. How you go about achieving that, I'm not exactly sure, since it should be happening automatically.

My bad about removing that "com.apple.LaunchServices.plist" file after the rebuild. I forgot that the Finder wouldn't be running. I would remove it before the rebuild.

By disabling it, I meant set it aside somewhere where it wouldn't be used, such as the Desktop. I guess I'm just hesitant to tell you to delete it outright.

If you have another account (create one if necessary) and log in as that user, do you experience the same problem?

Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)

Dec 20, 2005 4:38 AM in response to MarkDouma®

The file kind is not application (classic), just application (but there is a checkbox to choose if it should open in classic or OSX). On my laptop, it very definitely opens natively, as an application, and not as a stuffit document.

The link to the files (drivers for the Epson Stylus CX4200) is:
http://www.epson.com/cgi-bin/Store/support/supDetail.jsp?BV_UseBVCookie=yes&oid= 58605&prodoid=56291068&infoType=Downloads&platform=Macintosh

Btw, I tried to rebuild my LS database with Tiger Catche Cleaner, but there was no change.

Dec 20, 2005 11:58 AM in response to hyphen

Just a note. Since the application uses the OS 9 executable format (Code Fragment Manager (CFM)), I don't think the file permissions matter as they do on an actual Mach-O file. (I believe that's because when launching a CFM app, what actually "launches" first is the /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp helper tool). I know I've seen documentation on this somewhere but can't find it at the moment....


Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.3)

Dec 20, 2005 3:23 PM in response to MarkDouma®

First of all, thanks to all of you for all your help, and especially you, Mark, for such a comprehensive post.

The problem I've described affects both files on the Epson site for which I provided links. They were downloaded separately on each system, with Tiger on the iMac and with Panther on the iBook. They are Tiger compatible, because changing their extensions to .app works on Tiger (as native apps).

Mark, I redownloaded the files and used your script with the following results: the "show info" now indeed says that the .sea files are "applications" (no mention of classic), but there is still an "open with" pop-up that is set on script editor (which of course doesn't work)!! Why in the world should an application have an "open with" option (why do we even have this lever?) If I set the "open with" to stuffit expander 10, then, as before, nothing happens when I double-click the .sea files. (Actually, something does happen...the icon grows in size and become transparent, giving the impression that something further will happen, but nothing does). After this attempt, the kind was set back to "stuffit expander document", so... back to your script. (By the way, how do I "disable" the preference after the rebuild and before the restart? There is no Finder. Should I start Finder before I restart to trash the preference file, or trash it before the Finder is quit? Is erasing even what you meant by "disable"?)

After the second run, I tried to set the .sea file to "open with" itself, but even after changing the chooser pop-up from "recommended applications" to "all applications", the .sea files were still greyed out, even though the "kind", according to show info, is "application"!

I also tried the ls -aol command for both files. The result was -rw-r--r-- both times. (Which means?)

I'm on my way to the States in a few hours, so please forgive me if I'm a little slow in getting back to any new posts.

Thanks again!

Dec 19, 2005 7:19 AM in response to bdmarsha

Thanks for the suggestions. The Epson .sea files in question do open properly in OSX, not classic, on my laptop with Panther. I've tried Expander as bd suggested -- Expander lets me drag and drop the Epson files into its window, but nothing happens afterward. I've tried other .sea files, which all worked properly. Just to be sure, I tried opening the Epson files in classic OS, but it didn't work there either.

So as I see it, it boils down to this: my iMac (Tiger) "thinks" the Epson .sea files are documents, not OSX applications. How can I let it "know" that these files should be executed, not opened, so that when I show info for them, the "kind" is "application"? Is there some kind of "flag" I can set? And, while we're at it, how could I change an application to open in classic OS9 instead of OSX?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Changing file "kind" from document to application

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.