How to set which preferences file to use

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

How to set which preferences file to use

Post by afberendsen »

Is there a way that I can call SheepShaver using a preferences file that is not the ~/.sheepshaver_prefs file?
This will help me a lot to have more than one instance of SheepSahver running at the same time.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: How to set which preferences file to use

Post by Ronald P. Regensburg »

One can use .sheepvm virtual machines to have different setups, each with its own prefs file, see the the description in the setup guide:
http://www.emaculation.com/doku.php/she ... l_machines

To run the VMs at the same time, you will need multiple instances of SheepShaver application and launcht the VMs by dragging them each onto a different instance of SheepShaver.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: How to set which preferences file to use

Post by adespoton »

Instead of having multiple copies of SheepShaver, you can also write a script that calls

Code: Select all

open -n MySheepVM.sheepvm
where -n signals it to launch in a new instance of the application instead of an already running instance.
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: How to set which preferences file to use

Post by afberendsen »

Almost...

In each folder for each virtual machine, I have a .sheepshaver_prefs. The launch should be

Code: Select all

cd "$( dirname "${BASH_SOURCE[0]}" )" && HOME="$(pwd)" open -n ../SheepShaver.app
The use of HOME is to force SheepShaver to use the preferences file from the VM folder.
This script also ensure that SheeepShaver is called from within the folder where the start scrip is located.
I just tested and works. I can have multiple SheepShaver VMs running at the same time.
Contents of each .sheepvm folder is as follows

Code: Select all

-rw-r--r--+  1 afberendsen  staff        8192 26 Jul 00:19 .sheepshaver_nvram
-rw-r--r--+  1 afberendsen  staff         754 26 Jul 00:21 .sheepshaver_prefs
-rw-r--r--+  1 afberendsen  staff         667 23 Jul 23:59 .sheepshaver_prefs.backup
lrwxr-xr-x   1 afberendsen  staff          26 22 Jul 14:04 Mac OS ROM -> ../mac_oldworld_rom4mb.rom
-rw-r--r--@  1 afberendsen  staff  1073741824 26 Jul 00:22 MacOS76.dsk
-rwxr-xr-x+  1 afberendsen  staff          51 26 Jul 00:21 start
File reference inside the _prefs file should use absolute path references.
Image
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: How to set which preferences file to use

Post by Ronald P. Regensburg »

Follow the setup of the VMs exactly as described in the setup guide.

You start with each folder containing:
An empty prefs file that should be named "prefs", not .sheepshaver_prefs.
A rom file Mac OS ROM

The startup volume can be in the folder.
A keycodes file can be in the folder if needed.

Then you add the extension .sheepvm to the folder name. The folder will turn into a package and will get the SheepShaver icon. The name for a VM with System 7.5.3 setup could thus be "System-7.5.3.sheepvm"

When you double-click that VM, SheepShaver will launch and you can set up the VM as you would a regular setup, using the files inside the VM package. The settings will be written to the "prefs" file inside the VM. Also a "nvram" file will be created inside the VM.

If you have multiple VMs, you can use the script to run them simultaneously.

To open the "System-7.5.3.sheepvm" VM, you use the command:
open -n System-7.5.3.sheepvm
SheepShaver will use the prefs file inside that VM.

Edit: You do not open the VMs simultaneously, you open them separately but you can keep them running at the same time.
Edit: To use the VMs, you do not launch SheepShaver itself, but you start the VMs.
Last edited by Ronald P. Regensburg on Tue Jul 25, 2017 8:20 pm, edited 3 times in total.
Reason:  
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: How to set which preferences file to use

Post by afberendsen »

I will try again following the instructions.
Initially I had an outcome that my preference files were overwritten.
Post Reply