Login  •  Register


The time is now: Sun Jul 23, 2017 6:46 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 2 [ 40 posts ]    Go to page 1, 2  Next
Print view Previous topic  |  Next topic
Author Message
PostPosted: Fri Mar 14, 2014 11:11 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
In the process of upgrading my system to Mountain Lion I have set up SheepShaver as print server according to the instructions at http://emaculation.com/doku.php/sheepshaver_virtual_print_server. Though these instructions are based on my own guide, I do not manage to establish a connection from the LPD printer in OS X 10.8.5 to SheepShaver. This results in Print66 not receiving any print job.

When opening the printer's queue it says "Establishing connection to the printer" but then it fails with "Printer does not respond".

Are there maybe some additional options to set in Mountain Lion to make it work? Maybe on the end of the printer/CUPS or on the end of SheepShaver in order to have the rights set correctly for incoming connections?

I can see my printer in the Chooser in SheepShaver, so the problem is not with the configuration of AppleTalk for SheepShaver.

I'm using the 20140201 build.

EDIT:
I've tried the 20120715 build as well (I actually copied it from the Snow Leopard volume - including the hard disk image file with OS 8.6 - where it worked fine as print server). I've edited the prefs, zapped the pram and set the AppleTalk control panel back to "Ethernet" after starting SheepShaver. Same behaviour in Mountain Lion as with the new build (which has OS 9.0.4 installed).

EDIT 2:
It appears when I ping the IP address I use for SheepShaver, no response is received.
Where in OS X could I look to investigate the problem further? Any suggestions?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Mar 15, 2014 10:33 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4765
Location: Amsterdam, Netherlands
I have absolutely no idea what the problem may be, but I can offer some thoughts:

- Did you set up SheepShaver AppleTalk for Mountain Lion (without IPNetrouterX): http://www.emaculation.com/doku.php/app ... ntain_lion

- Did you make sure that SheepShaver launches in 32bit mode and, if necessary edit the script accordingly?

- When you set up the printer in OSX, was the choice for Line Printer Daemon - LPD available? http://support.apple.com/kb/PH11478

- Have you looked at firewall settings in OSX that could possibly interfere?


Last edited by Ronald P. Regensburg on Sat Mar 15, 2014 10:34 am, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Mar 15, 2014 1:23 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
Yes, I did the setup according to the guide (that is, without IPNetRouterX). I can see my printer when I click on 'LaserWriter 8' in the Chooser, so AppleTalk is fine.

I did install it as an LPD printer in OS X.

The firewall is off.

I didn't have to bother about 32 bit or 64 bit mode in Snow Leopard, so I didn't pay attention to this when I did the setup in Mountain Lion. I now tried to start SS in 32 bit mode, but when I add "-arch i386" to the Terminal command, this is the response:

Code:
markuss-mac-pro:~ markus$ sudo /Applications/SheepShaver_UB_20140201/SheepShaver.app/Contents/MacOS/SheepShaver -arch i386
SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
Unrecognized option '-arch'
Usage: /Applications/SheepShaver_UB_20140201/SheepShaver.app/Contents/MacOS/SheepShaver [OPTION...]



And then it displays a list of Unix options, general options, and platform-specific options.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Mar 15, 2014 2:08 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4765
Location: Amsterdam, Netherlands
For the second line in the script, instead of:
Code:
sudo /path-to-SheepShaver.app/Contents/MacOS/SheepShaver & sleep 5
try:
Code:
sudo  arch -arch i386 /path-to-SheepShaver.app/Contents/MacOS/SheepShaver & sleep 5


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Mar 15, 2014 3:59 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
Thank you for the entry. It worked and I have amended the script. However, that did not resolve the printing problem.
Also pinging SheepShaver still does not produce a response.

It must be something IP related. It is an old version of the AppleTalk protocol Print66 and my printer use to communicate with each other, which is not IP based. That's why I can see the printer in the Chooser.

I just don't have a clue where to look for an answer to the problem.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Mar 16, 2014 10:10 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4765
Location: Amsterdam, Netherlands
Cat_7 wrote the AppleTalk for SS/BII guide. Maybe he has an answer.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Mar 17, 2014 7:18 am 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4140
Location: Sittard, The Netherlands
Hi,

I've been investigating the problem assuming that being able to ping SheepShaver would solve the problem. However, I have not been able to set parameters for the bridging command in such a way that pings are exchanged. Perhaps running ipnetrouter is the only solution. But I can't say whether that is true, as I have only limited understanding of routing/bridging.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Mar 17, 2014 9:40 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
Hi Cat_7,

Now at least I know that it is not due to some setting on my machine, as it doesn't work on your end either. I have searched a bit on the web, but couldn't find anything helpful. But I have to admit that my understanding of networking is surely much less than yours.

Since upgrading to Mountain Lion I have installed Snow Leopard Server and the Windows XP license from my broken PC as VM's in Parallels. I have installed AppleTalk capabilities into XP according to this post and set up my LaserWriter 4/600 PS in XP as shared printer. SheepShaver would have been the more elegant solution, but I don't want to make use of IPNetRouterX.

Many thanks for your effort!


mabam


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri May 26, 2017 11:26 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
Cat_7 wrote:
… I have not been able to set parameters for the bridging command in such a way that pings are exchanged. Perhaps running ipnetrouter is the only solution.

It has been a while, but I have looked into this again. And this is what I have found: http://drupal.bitfunnel.net/drupal/macosx-bridge-qemu

Under "Creating the bridge device" it says:
Quote:
Image
The diagram shows the Network Preferences pane from System Preferences on Mac OS X. Instead of having a physical network device (en0) in the list of interfaces, we see bridge0 (circled). This is a virtual interface and we create it by first clicking the cog button on the bottom left of the pane (circled). We then select "Manage Virtual Interfaces...", add a "New Bridge...", associate it with en0 and give it a name.

This new interface takes the place of our physical interface in the preferences pane and we configure its address and other parameters just as we would for the physical interface.

The point is that the host machine is not accessing the network directly, but via the same bridge as the VM or emulator does. That site is actually describing how to then add QEMU VM's to the bridge. But it works just as well with any other VM or emulator using a tap device.

The possibility to add a network bridge via System Preferences was introduced with Mavericks (10.9). Mountain Lion (which I am still running) does not offer that possibility. But based on a hack I found on https://stackoverflow.com/questions/874 ... n-mac-os-x I managed to manipulate /Library/Preferences/SystemConfiguration/preferences.plist to show the bridge instead of en0. With a bash script as startup item that creates the bridge and adds en0 to it (which it doesn't do automatically 'cause I used a hack, I suppose), my host system still works fine. But as it is now only accessing the network through the same bridge (and that bridge's IP address) as SheepShaver (and not, next to that, directly with an own IP address anymore), it can find SS on the network.

So SheepShaver as virtual print server works again on newer versions of OS X.

Is this something that could be added to the AppleTalk for SheepShaver guide for OS X Lion and up? (Or at least for the version that introduced adding a bridge via System Preferences?)


Last edited by mabam on Sat May 27, 2017 11:28 pm, edited 4 times in total.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri May 26, 2017 11:35 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
mabam wrote:
With a bash script as startup item that creates the bridge and adds en0 to it, my host system still works fine.

Actually, can anyone tell me what is the best way to run this script? It would be great if it could be ran invisibly.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri May 26, 2017 11:47 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1679
Yes; you want to run the script as a Launch Daemon:

https://developer.apple.com/library/con ... dJobs.html


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat May 27, 2017 1:14 am 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
adespoton wrote:
Yes; you want to run the script as a Launch Daemon:

https://developer.apple.com/library/con ... dJobs.html

Thanks, I'll look into that.
How would I have my Sudo-password entered automatically? So far I used an AppleScript for those cases doing that via key codes.


mabam wrote:
Is this something that could be added to the AppleTalk for SheepShaver guide for OS X Lion and up?

Well, on second thought this doesn't make much sense as Classic MacOS and modern OS X don't have network protocols in common.

But it would make sense to add it to the SheepShaver as virtual print server guide for access via LPR.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat May 27, 2017 4:07 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1679
mabam wrote:
How would I have my Sudo-password entered automatically?


That's the beauty of this method: you chown root:wheel the bash script, and with the Launch Daemon plist file you create, it will automatically run it as root, as the process running it runs as root. Just make sure to create a system-wide plist in the /Library/Launch Daemons/ folder, and not in the ~/Library/Launch Daemons/ folder.

Further details explaining all of this are in the link I provided.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun May 28, 2017 10:31 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
Thanks for the link. I don't quite understand it the way it is explained there, but you pointed me to the right direction.

I find the following two websites quite useful:
http://www.launchd.info
http://www.mulle-kybernetik.com/weblog/ ... n_eth.html

This is what the plist file I created looks like:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
       <dict>
                <key>Label</key>
                <string>de.mabam.bridge.en0</string>
                <key>ProgramArguments</key>
                <array>
                        <string>/sbin/ifconfig</string>
                        <string>bridge0</string>
                        <string>create</string>
                        <string>addm</string>
                        <string>en0</string>
                </array>
                <key>RunAtLoad</key>
                <true/>
                <key>LaunchOnlyOnce</key>
                <true/>
        </dict>
</plist>
That way I don't need a bash script to work with the plist file.

This is equivalent to entering manually in Terminal:
Code:
sudo ifconfig bridge0 create addm en0
I don't need to do "ifconfig bridge0 up". The system takes care of that automatically as bridge0 is stored in the network preferences.

What's missing is to reconnect en0 after waking up from sleep. So far I'm doing that manually:
Code:
sudo ifconfig bridge0 deletem en0; sudo ifconfig bridge0 addm en0
This doesn't change anything in what entering "ifconfig" outputs. But if I don't delete and then re-add en0, the network doesn't work after waking up from sleep.

I've found a command line tool called SleepWatcher that I want to call from a LaunchDaemon. But the above entry is actually two commands put on one line and probably means I cannot put them in a plist at once? (I want to avoid calling a bash script.) Haven't figured out this one yet.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon May 29, 2017 8:03 am 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
The way SleepWatcher works is that it calls another executable upon an event such as sleep or wake up. However, as it can't call it with command line options, I have to make the plist execute a bash script anyway:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>de.mabam.bridge.sleepwatcher</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/sbin/sleepwatcher</string>
                <string>-w /etc/wakeup.mabam.re-add.en0.sh</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>KeepAlive</key>
        <true/>
</dict>
</plist>

This will execute the following script when the machine wakes up from sleep:
Code:
#!/bin/sh

ifconfig bridge0 deletem en0 & sleep 1
ifconfig bridge0 addm en0
(Had to insert "& sleep 1" as it doesn't work when en0 is re-added too quickly.)

SheepShaver still works after waking up, so there is no need to re-add tap0.

All works fine now.
Thanks again for your help!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue May 30, 2017 8:04 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1679
I'm pretty sure launch daemons can trap wake events too; you could set a plist to take the bridge down and bring it back up on wake.

See: http://paul.annesley.cc/2012/09/mac-os- ... d-is-cool/ (search for 'asleep').

The difference is that you can set a timer from the wake event to trigger the action; set it to 10 seconds or so to let the network interface come up cleanly first, and you should be good to go.

[edit] actually, there's even a cleaner method: do it based on network state!

Use this event trigger: NetworkState — network (other than localhost) is up (or if false, down). So, if your bridge is down, kill it and bring it back up :)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue May 30, 2017 11:11 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
adespoton wrote:
I'm pretty sure launch daemons can trap wake events too; you could set a plist to take the bridge down and bring it back up on wake.

See: http://paul.annesley.cc/2012/09/mac-os- ... d-is-cool/ (search for 'asleep').
That 'asleep' seems to belong to a passage explaining that if the starting time of a scheduled LaunchDaemon happens to be during sleep, it will be postponed until the machine woke from sleep. This wouldn't actually be of any help to me. I didn't find anything about a wake event trigger for LaunchDaemons.

Next, adespoton wrote:
The difference is that you can set a timer from the wake event to trigger the action; set it to 10 seconds or so to let the network interface come up cleanly first, and you should be good to go.
The LaunchDaemon I posted earlier works fine, so I don't have a timing issue.

And last but not least, adespoton wrote:
Actually, there's even a cleaner method: do it based on network state!

Use this event trigger: NetworkState — network (other than localhost) is up (or if false, down). So, if your bridge is down, kill it and bring it back up :)
This is what I've found regarding NetworkState: https://stackoverflow.com/questions/579 ... connection
Not very clear to me. And my connection isn't 'officially' down – that is, the ifconfig output doesn't change. It still seems to think the network is running as before. I actually never do 'ifconfig bridge0 up'. After boot my first LaunchDaemon creates bridge0 and adds en0. OS X is bringing up the bridge automatically due to the system preferences I tweaked. I figured it is still up on wake (or maybe brought up automatically again by OS X) and I only have to delete and re-add en0, and en0 only. If SheepShaver was running and therefore tap0 active before sleep, it will continue working after wake without re-adding it.

I have configured bridge0 with a manual IP address which OS X can be reached at once en0 is added to the bridge. The thing is probably that en0 doesn't have an own IP address as I have removed it from the network preferences, whereas tap0 has its own IP address. For some reason OS X can reach SheepShaver on the network that way, but not if en0 connects to the network directly with an own IP address next to being on the same bridge with SheepShaver's tap0.

SleepWatcher would be superfluous for my needs if this LaunchDaemon for OS X Lion would be amended to meet Mountain Lions requirements: https://apple.stackexchange.com/questio ... p-and-wake (scroll down a bit, there's only one spot with code on the page).
I suppose only the path to the log file with sleep entries would have to be fixed. But I don't know what it's called and where to find it on Mountain Lion.


By the way: If you run a networked version of QEMU with some PPC version of OS X, is macOS Sierra or some other recent version able to connect to it simply by adding a bridge between the two as described under "Bridging a tap device" at http://www.emaculation.com/doku.php/ppc ... networking (so without actually removing en0 from the network settings)? 'Cause according to the article I referred to in my earlier post, it wouldn't work without the special network setup, but that article is three years old and talks about Mavericks.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 31, 2017 12:09 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1679
Like you say, your current config works, best to stick with what works.

As for qemu, I haven't tried, but will do so the next time I have a free block of time... it sounds quite promising actually!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 31, 2017 12:33 am 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
You might also use 'script' and 'downscript' as described under the link I provided earlier, triggered by the '-net' lines for QEMU provided there. That way you don't have to run a separate script manually to connect the tap device to the bridge (which you don't need to create manually as from Mavericks OS X should do that automatically once set up in system preferences).

If your test shows this is required for QEMU to be reachable from the host, this might be something for the QEMU forum and setup guide.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jun 01, 2017 4:08 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
Let me add: A while ago I had downloaded Cat_7's unofficial QEMU build with networking and OS X 10.3 for testing. I had the same issue as with SheepShaver: I couldn't even ping it from the host. So this is not SheepShaver specific. That is, under Mountain Lion.

Curious whether it is the same under recent versions.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jun 01, 2017 5:35 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4140
Location: Sittard, The Netherlands
Do you mean not being able to ping with slirp networking in SheepShaver and -net user networking in Qemu ?

(For user networking Qemu also implements slirp, but a version that has been developed actively)

If so, this is normal behaviour. I've seen some patches on the Qemu development list allowing ping with user networking, but haven't applied them to the code. These might be included in future versions though.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jun 01, 2017 8:10 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
No, it was with tap networking because there's no AppleTalk when using slirp. I just looked up my post from last year about that:
viewtopic.php?f=34&t=7047&start=525#p52457
On Feb 14, 2016 mabam wrote:
However, "hsp qemu" does appear under "Places" in the sidebar in Mountain Lion but fails to connect when I click on it.

So it seems I remembered that wrongly. If it appeared in the sidebar, obviously the host OS X was also able to ping it. The host couldn't connect to it, however.

When using tap the way you described it in your setup guide, are you able to connect from your host (with a recent version of OS X) to OS X in QEMU?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jun 02, 2017 12:24 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4140
Location: Sittard, The Netherlands
i tried to ping the hosts sierra and el capitan from qemu running 10.3 using the realtek and sungem networking device. No deal.
I even built the latest tuntaposx code on el capitan and installed the kexts. Also no deal.
I gave the bridge and tap0 ip addresses, but that also changes nothing.

When you give the tap device an ip address and enable windows sharing in PPC OSX, the name of the machine shows up, but you cannot connect to it.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jun 02, 2017 4:02 pm 
Offline
Mac Mechanic

Joined: Wed Apr 10, 2013 9:32 am
Posts: 156
And if you set up the network the way it is described here: http://drupal.bitfunnel.net/drupal/macosx-bridge-qemu (as linked in my post further up this page), does it work then?

With this setup, I can ping my host from within SheepShaver using OTTool (not sure whether that works without above network setup).
I can also ping Mac OS in SheepShaver from my host. That did not work before changing the setup to the above one.

If this only makes a difference for SheepShaver and not for QEMU, it might make sense to either
- add it as an alternative way to the AppleTalk for SheepShaver/Basilisk II for OS X guide,
or
- add it to my SheepShaver as virtual print server for AppleTalk-only printers guide.

I wonder whether the former would be of any use as modern OS X and Mac OS 9 do not have any networking protocols in common (at least not compatible versions of them). And also because successful pinging does not yet mean that connecting to volumes would actually work (I tried to make it work using Samba by installing DAVE for Mac OS 9, but it failed to connect).

Else the latter is definitely of use to the millions of people out there desperately trying to print to their beloved old AppleTalk printers from modern OS X! I'd be happy to add it to the guide.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jun 02, 2017 8:50 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1679
I still haven't had a chance to try all this, but...

For supported common networking protocols, the only ones that exist are FTP and WebDAV, but WebDAV can be tricky to get working on both platforms.

Using the AppleShare VirtualBox VM that was mentioned on here a month or so back, it should be possible to use it as a bridge between the old AppleTalk guest OSes and the host, as long as a vlan is selected that both guests and host can see. Setting up a bridge might be necessary to support this, such as what we've been discussing. Such a solution should allow for IIgs network-capable guests to talk to SheepShaver and qemu guests as well, AND allow them all to see the host since they'd be using a bridged vlan to shove all their network communications through a guest that can already talk with the host and all the guests that support AppleTalk.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 2 [ 40 posts ]    Go to page 1, 2  Next


Who is online

Users browsing this forum: Baidu [Spider] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group