Tips September 29, 2004 at 3:45 pm

Saving Window Views on Remote Server Volumes

Keeping Finder views the same for your users can be a real pain in the rear.

Read on for a number of tips about getting this to work they way you want.Background: OS X Server has very specific rules for who can change the default view of a folder. If you are only a group user, you can’t change window views permanently. This, combined with the fact that the default view for any new Finder window is Icon view was driving my users to distraction. So I set down to figure out a scripted solution, and here’s my observations while doing so:

  • Only a folder’s owner can permanently save window view and window size changes for a folder.
  • You must be logged in remotely for these changes to be saved. Local view changes (ie, made on the XServe) seem to be stored in a different place?
  • You must eject the remote server volume to save the changes to window views you’ve made. Do so immediately. If the Finder crashes for any reason, all your changes are lost for any volumes you’ve done and not ejected yet.
  • Never run a script that opens and closes zillions of windows on an active server! I had a KP after attempting to use the script I ended up writing on an active server. It happened several hours later, but given that the server hasn’t crashed since, I blame the KP on something being destabilized by all the Applescript activity.
  • Try and find a single processor machine to do any remote scripting from. I can induce unexpected quits on my dual G5 within 30-60 seconds of running a Finder script on a remotely mounted server volume, but several single processor Macs I’ve tested can easily run the same scripts for hours with no Finder crashes.
  • This could probably be done more elegantly by a program that knew the DS_Store file format and could generate the proper DS_Store file for each folder (if anyone wants to write one).

In the end, I managed to create a script I call Finder NameView Changer to deal with this problem. It recursively walks all folders in the frontmost window changing them to list view and a 700×850 pixel window size.

Usage: There are some specific steps necessary to use this script effectively. Please note, your mileage may vary! I’ve made every effort to make sure the script will work reliably but use at your own risk, etc etc.

  1. It is best if this script is used by the server administrator. If you’re not the server administrator, pass the buck. 😉
  2. On the server, make sure the folder and all of its contents are owned by the person you will be logging in as across the network. Please use Workgroup Manager or “chown -R” to complete this task.
  3. Log in remotely as the user you just made owner of everything you want to change.
  4. Open the topmost folder you want all contents changed in. If you only wanted specific sub-folders changed, select them now. If you want all sub-folders changed, make sure you have deselected all the folders before starting the script.
  5. Run the script; it should spew lots and lots of windows. IF IT CRASHES, GIVE UP ON THIS MACHINE! Move on to a different remote computer and try it from there, preferably a single-processor machine if you have one. I have found that I can’t run this script successfully from a 2x2ghz G5, but can from a 1x933mhz G4. My hypothesis is the dual processors are causing threading problems.
  6. Once the script is done running, immediately eject the server volume with the changes you made. Your changes are not saved on the server until you eject the volume!
  7. Make sure that the changes you’re making are actually being saved as you intend! After doing one folder or volume, go to another machine and log in as a regular group user and check that the name view is actually sticking.

(Ed. Note. For more info on this topic you should check out Apple KB#107482.)

Leave a reply

You must be logged in to post a comment.