SheepShaver (Linux) appears to ignore prefs file

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
Labsky
Space Cadet
Posts: 3
Joined: Sun Nov 03, 2019 4:33 am

SheepShaver (Linux) appears to ignore prefs file

Post by Labsky »

Greetings all,

I have run into a problem. I built SheepShaver on my minimal Debian Linux machine with:

Code: Select all

$ git clone https://github.com/cebix/macemu
$ cd macemu/SheepShaver
$ make links
$ cd src/Unix
$ NO_CONFIGURE=1 ./autogen.sh
$ ./configure
$ make
$ strip SheepShaver
I also added the line

Code: Select all

vm.mmap_min_addr = 0
to /etc/sysctl.conf and did the following:

Code: Select all

# echo 0 > /proc/sys/vm/mmap_min_addr
$ cp SheepShaver /usr/bin
to (1) avoid having to run SheepShaver as root and (2) gain the ability to run SheepShaver from the command line or from dmenu.

Now I have a valid ROM file called 'Mac OS ROM' which lives in a directory other than the one the SheepShaver binary is located. So I edited ~/.sheepshaver_prefs and added the line:

Code: Select all

rom /home/labsky/emu/mac-stuff/'Mac OS ROM'
However, when I run SheepShaver, I get the following:

Code: Select all

SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
ERROR: Cannot open ROM file.
X Error of failed request:  BadValue (integer parameter out of range for operation)
   Major opcode of failed request:   105 (X_ChangePointerControl)
   Value in failed request:   0x0
   Serial number of failed request:   9
   Current serial number in output stream:   10
So evidently SheepShaver is ignoring the prefs file. I know this because when I place the ROM in the same directory as the executable and run SheepShaver with a Mac OS 8 install disk in my CD-ROM drive, it boots as expected. But when I remove the CD-ROM and try to add a prefs line such as

Code: Select all

disk /full/path/to/bootable/disk/image 
SheepShaver will start, but give me the infamous folder with flashing ?.

Why is SheepShaver ignoring my preferences file?

NOTE: I have a minimal Debian installation that only has X and i3; no GTK libraries and no desktop environment. Thus I am only able to change preferences by editing ~/.sheepshaver_prefs .
Labsky
Space Cadet
Posts: 3
Joined: Sun Nov 03, 2019 4:33 am

Re: SheepShaver (Linux) appears to ignore prefs file

Post by Labsky »

Hate to do this but does no one have any idea why /usr/bin/SheepShaver wouldn't be able to see the prefs file in my home directory? This makes using SheepShaver a complete non-starter, which is a shame because I have all kinds of backups and disk images from when it worked on Windows ...
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SheepShaver (Linux) appears to ignore prefs file

Post by adespoton »

Where is it looking for the prefs file when it runs? Do you get any debug output on that? Have you tried running it while your working directory is your home dir? Have you tried to pass the path to the prefs file on the command line? Are permissions set correctly?
Labsky
Space Cadet
Posts: 3
Joined: Sun Nov 03, 2019 4:33 am

Re: SheepShaver (Linux) appears to ignore prefs file

Post by Labsky »

EDIT: It works now! Evidently SheepShaver does not like it when you include single quotes ' in filepaths within the prefs file. I renamed the disk image file and it worked. Now to figure out how to build for fullscreen ...
adespoton wrote:Where is it looking for the prefs file when it runs? Do you get any debug output on that? Have you tried running it while your working directory is your home dir?
I deleted the binary from /usr/bin and moved it to my home directory instead. When I run it from the home directory I get the following output:

Code: Select all

$ ./SheepShaver
SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
Reading ROM file...
WARNING: Cannot open 'os9.iso' (No such file or directory)
WARNING: Cannot open /dev/mixer (No such file or directory)
WARNING: Cannot open /dev/dsp (No such file or directory)
WARNING: No audio device found, audio output will be disabled.
Detected CPU features: MMX SSE SSE2 SSE3 SSSE3
PowerPC CPU emulator by Gwenole Beauchesne
In my prefs file, I point to the 'os9.iso' file in my home directory, which is a bootable OS9 install disk image (works on Windows SheepShaver.) So I know it must be using the prefs file in my home directory now.

Or is it? It says it can't find /dev/mixer or /dev/sdp, but I took the offending lines out of the prefs file when it first reported those errors. Now it still looks for them automatically.
adespoton wrote:Have you tried to pass the path to the prefs file on the command line? Are permissions set correctly?
I haven't been able to find anything on command line arguments for SheepShaver. And I'm not sure what permissions need to be set.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SheepShaver (Linux) appears to ignore prefs file

Post by adespoton »

If you're running it in userland, it'll need user rw permissions; if you're running it su for the networking, user rw should still be good enough, as su trumps user privs.

Ignore the /dev/ errors: those are compiled in by default. Commenting them out just uses the defaults -- you'd have to change them to a different output. So you're using the correct prefs file.

but what filepath are you using for os9.iso? /home/<user>/os9.iso? or just os9.iso? It's reading your rom file, so that's in the correct default location.
Post Reply