![]() |
JoelNelson, you are correct, that will work. the bug i refered to is that if you do not "rebless" os 9.2.2 and try and launch classic mode, it tells you u dont got OS 9 at all, not a pretty sight. to fix this all i did was rebless (with the script) the 9.2.2 folder and i was good to go. classic mode started right up and i was using my classic apps without a hitch. i dont know why this is, but im just sayin this is the way it is.
|
Another AS to set the startup disk.
Here's a commented enhanced script that I wrote for those who don't feel like editing. I just need to find a way to get the currently blessed system folder so I can have it selected by default.
Code:
tell application "Finder" |
WOW, cool. ok i was doing the same thing to mine, im glad i was on the write track. here is the snippet i am using to get the current blessed folder.
Code:
|
meancode --
in order for classic to work, you must specify both an OS X and a classic system folder in your command when switching from OS 9 to OS X. I believe this should work... Code:
sudo /usr/sbin/bless -folder "/System/Library/CoreServices" -folder9 "/System Folder" -setOFUsing bless -info / will confirm that setting only the OS X folder will leave "No OS Classic + X blessed 9 folder" while using both will show "Classic blessed folder is /System Folder" in addition to setting the Blessed System Folder. |
I'm not personally interested in searching for available startup disks since that is what the Startup Disk preference panel does already. I know exactly what Systems I have on my computer and wanted a way to point them out quickly and easily.
Below is an example of the final version I am using (incorporating other posters suggestions as well as my own). A few things... I removed references to Finder because I call the script from the "Script Menu" menu extra and see no reason why the Finder should be brought forward. I prefer to pop up the dialog over whatever app I am currently using. Also, for simplicity and brevity, I set it up using only 2 system folders (even though I have 4). I think it should be obvious how to add more System choices if you like, but if it's not clear let me know. I also used my OS X and OS 9 folders on the same partition to avoid having Volume Name references in the script. Again, you will have to customize the paths to your System Folders and add additional passes through each routine if you have more than 2 system folder choices. Just wanted something short I could post to show all of the features I incorporated. This script will tell you what system you are currently set to boot from and ask if you would like to change. You are given a button for each choice. If you are currently set to boot into X, then the default button will be 9. If you are currently set for 9 then the default button will be X. Click a button (or hit return to pick default) and that's it. My apologies that I have not commented the various routines but I wanted to get this done and posted in a hurry. Of course, this also means I may have missed something. Feedback is appreciated if I have left out or overlooked anything discussed above (before too many people rely on my mistakes!!) Code:
do shell script "/usr/sbin/bless -info / | grep -c 'Blessed System Folder is /System/Library/CoreServices';echo $output"BTW, I have added my other systems back in and all still works fine. I now have the options of 9.2.2, 9.1, 10.1.2, or 10.1.3. You just have to decide what criteria you want for determining the default button. I alternate between the two I boot into most (9.2.2 and 10.1.3) Finally, bless does not seems to work with a System Folder prior to 9.1 (i.e. 9.0.4). If anyone can get that to work, let me know. |
I am getting a little confused with all the posts! :) I do plan to use Classic, more often even than the OS 9 mode. OS X 10.1.3 is my default OS. Which script is the best one for me to use?
|
Quote:
Having said that, if you have a simple two OS system (with 10.1.3 and 9.2.2 on the same partition) you can probably use my script posted just above without alteration (aside from substituting your actual admin PW in the two places it currently says "AdminPassword". Any variation from that basic setup will require customizing the paths to your system folders, the text indicating OS names (e.g. change 9.2.2. to 9.1 if that is what you are running), and so forth. Because I wanted my script to be as descriptive as possible, while also keeping it brief, it requires customization. There are ways to write this that require no customization (i.e. have the script find your System folders for you, and have the script determine the version of those system folders) but that kind of robust functionality already exists in the Startup Disk control panel. My goal is to create a streamlined version that savrifices automated functionality for speed. You have to pick the version that does what you want done (based on our descriptions, or based on trying them out). I don't know if any of the others are fully useable yet since I haven't tried them -- just been working on my own. |
Maclaw: Good point. The script I wrote almost does exactly what the Startup Disk pane does!:eek: My script is a bit quicker and requires fewer clicks, though. This is on my G4 450DP with only 3 partitions, so I imagine it will slow down quite a bit on slower systems with more disks/partitions. I would like to point out that telling the Finder to do something doesn't bring it to the front unless there is an activate in there.
Meancode: I'm glad to see you are discovering the joys of scripting. That code snippet only appears to work on a single partition (or maybe my system is being flakey). I'm looking to get the path of the folder, not just a true/false, though. I noticed that this wasn't metioned yet, so here goes: The Startup Disk pane can be accessed more quickly if /System/Library/PreferencePanes/StartupDisk.prefPane is put in the dock. I think I saw something similar on my other favorite site once. |
I use OS 9 mode for Virtual PC and Norton Utilities/AntiVirus but everything else runs in OS X native or Classic. Thanks for the script; I will give it a try.
Regarding the tip posted at http://www.macosxhints.com/article.p...10416184548354 I used the following script to try to reboot from OS 9 to X and got the following error when trying to check syntax: A application constant or consideration can't go after this application constant or consideration. "Startup system folder" was highlighted when the error came up. tell application "Startup Disk" activate set startup system folder alias to alias "Macintosh HD:System:Library:CoreServices:BootX" quit end tell tell application "Finder" restart end tell |
A security hole in this method
The procedure of many answers to the question of how to restart automatically OS X in OS 9 using a AppleScript, can have a security hole, provided you have multiple users in your computer. If you bless the system 9 folder with a run-only script with contains the administrator password and other users can start this script (not to read it), then they have access to all the information of the computer after restart, because OS 9 loses the folder privileges.
If this scenario is a problem, there are several solutions: 1) Set the privileges of the script for use of the administrator only. 2) Store the script in a reserved folder. 3) Do not store the password in the script. I am waiting for your answers. Jaime. |
| All times are GMT -5. The time now is 06:21 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.