Emaculation.com

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
appletalk_printserver_macos_and_osx [2018/02/18 14:58] – [CUPS configuration and PAP backend] mabamappletalk_printserver_macos_and_osx [2023/06/25 12:19] (current) – [[OPTIONAL] Configuring Samba shares] mabam
Line 26: Line 26:
 <code>This is an entry.</code> <code>This is an entry.</code>
 Except for a few cases when you are asked to substitute parts of an entry, just select all text within the box and copy-paste it into Terminal. Except for a few cases when you are asked to substitute parts of an entry, just select all text within the box and copy-paste it into Terminal.
-<file>A dark blue box does not represent an entry, but output to be expected from Terminal.</file>+<code text [highlight_lines_extra="1"]>Highlighted lines do not represent an entry, but output to be expected from Terminal.</code>
 ===== Prerequesites ===== ===== Prerequesites =====
 ==== ==== ==== ====
Line 177: Line 177:
  
 If only disk "''/dev/sda''" is shown, but no "''sdb''", your SD card is probably not connected to the VM (or not via USB). "''/dev/sda''" is the system disk of the VM – at least it is in my case. Among other output, your SD card should be displayed as "''/dev/sdb''" in a bold line like this: If only disk "''/dev/sda''" is shown, but no "''sdb''", your SD card is probably not connected to the VM (or not via USB). "''/dev/sda''" is the system disk of the VM – at least it is in my case. Among other output, your SD card should be displayed as "''/dev/sdb''" in a bold line like this:
-<file>Disk /dev/sdb: 15.1 GiB, 16172187648 bytes, 31586304 sectors</file>+<code text [highlight_lines_extra="1"]>Disk /dev/sdb: 15.1 GiB, 16172187648 bytes, 31586304 sectors</code>
 You can recognize it by its size. I use a 16 GB SD card which in reality has 15.1 GB capacity. That is reflected in above line. If you use an 8 GB SD card (which is more than enough), the line above should report a bit more than 7 GB capacity. For the virtual machine we had created a hard disk image of 32 GB, so "''sdb''" must be your SD card in this case. You can recognize it by its size. I use a 16 GB SD card which in reality has 15.1 GB capacity. That is reflected in above line. If you use an 8 GB SD card (which is more than enough), the line above should report a bit more than 7 GB capacity. For the virtual machine we had created a hard disk image of 32 GB, so "''sdb''" must be your SD card in this case.
  
Line 188: Line 188:
 //(If necessary, substitute "''sdb''" in this entry for the appropriate value in your system.)//\\  //(If necessary, substitute "''sdb''" in this entry for the appropriate value in your system.)//\\ 
 This should return something like This should return something like
-<file>dd if=/root/output/images/Armbian_5.27_Bananapi_Debian_jessie_default_3.4.113.img of=/dev/sdb bs=1M</file>+<code text [highlight_lines_extra="1"]>dd if=/root/output/images/Armbian_5.27_Bananapi_Debian_jessie_default_3.4.113.img of=/dev/sdb bs=1M</code>
 If it does, write the Armbian image to your SD card //(again substitute "''sdb''" if necessary)//: If it does, write the Armbian image to your SD card //(again substitute "''sdb''" if necessary)//:
 <code>dd if=/root/output/images/$(ls /root/output/images/) of=/dev/sdb bs=1M</code> <code>dd if=/root/output/images/$(ls /root/output/images/) of=/dev/sdb bs=1M</code>
Line 289: Line 289:
 <code>echo $(ls -1 /dev/disk/by-id/|head -n 2|tail -n 1)</code> <code>echo $(ls -1 /dev/disk/by-id/|head -n 2|tail -n 1)</code>
 The response should contain your HDD's id preceded by "''ata-''" and appended by "''-part1''" like this: The response should contain your HDD's id preceded by "''ata-''" and appended by "''-part1''" like this:
-<file>ata-WDC_WD7500BFCX-68N6GN0_WD-WX31A761ZDF9-part1</file>+<code text [highlight_lines_extra="1"]>ata-WDC_WD7500BFCX-68N6GN0_WD-WX31A761ZDF9-part1</code>
 If it does, make the HDD auto-mount at "''/srv/A2SERVER''" by appending it to "''/etc/fstab''" (if you had to substitute the digit "''2''" in the last entry, don't forget to also do it in the following one): If it does, make the HDD auto-mount at "''/srv/A2SERVER''" by appending it to "''/etc/fstab''" (if you had to substitute the digit "''2''" in the last entry, don't forget to also do it in the following one):
 <code>echo "/dev/disk/by-id/$(ls -1 /dev/disk/by-id/|head -n 2|tail -n 1) /srv/A2SERVER ext4 defaults 0 0" >> /etc/fstab</code> <code>echo "/dev/disk/by-id/$(ls -1 /dev/disk/by-id/|head -n 2|tail -n 1) /srv/A2SERVER ext4 defaults 0 0" >> /etc/fstab</code>
Line 397: Line 397:
 <code>sudo cat /etc/netatalk/AppleVolumes.default</code> <code>sudo cat /etc/netatalk/AppleVolumes.default</code>
 In my case the last lines of the response look like this: In my case the last lines of the response look like this:
-<file>/srv/A2SERVER/music music ea:ad+<code text [highlight_lines_extra="1,2,3"]>/srv/A2SERVER/music music ea:ad
 /srv/A2SERVER/share share ea:ad /srv/A2SERVER/share share ea:ad
-/srv/A2SERVER/software software ea:ad</file>+/srv/A2SERVER/software software ea:ad</code>
  
 For Netatalk to properly handle the newly shared volume(s), have it create .volinfo and AppleDouble files for them: For Netatalk to properly handle the newly shared volume(s), have it create .volinfo and AppleDouble files for them:
Line 412: Line 412:
 <code>nbplkup</code> <code>nbplkup</code>
 Terminal should return something like this: Terminal should return something like this:
-<file>                       bananapi:ProDOS16 Image                     1.19:3+<code text [highlight_lines_extra="1,2,3,4,5,6,7,8,9,10"]>                       bananapi:ProDOS16 Image                     1.19:3
                        bananapi:Apple //e Boot                     1.19:3                        bananapi:Apple //e Boot                     1.19:3
                        bananapi:Apple //gs                         1.19:3                        bananapi:Apple //gs                         1.19:3
Line 421: Line 421:
             Asant?Talk 94B88903:Asant?Talk                         1.39:252             Asant?Talk 94B88903:Asant?Talk                         1.39:252
            LaserWriter 4/600 PS:LaserWriter                        1.40:128            LaserWriter 4/600 PS:LaserWriter                        1.40:128
-USER_NAME@bananapi:~$</file>+USER_NAME@bananapi:~$</code>
 My printer and its LocalTalk-to-Ethernet bridge are recognized as "''LaserWriter 4/600 PS''" and "''AsantéTalk''". Everything else is provided by A2SERVER. My printer and its LocalTalk-to-Ethernet bridge are recognized as "''LaserWriter 4/600 PS''" and "''AsantéTalk''". Everything else is provided by A2SERVER.
  
Line 460: Line 460:
  
 Terminal should respond with something like this: Terminal should respond with something like this:
-<file>[SHARED_VOLUME1]+<code text [highlight_lines_extra="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24"]>[SHARED_VOLUME1]
     path = /srv/A2SERVER/SHARED_VOLUME1     path = /srv/A2SERVER/SHARED_VOLUME1
     browsable = yes     browsable = yes
Line 483: Line 483:
     create mask = 0666     create mask = 0666
     force user = USER_NAME     force user = USER_NAME
-USER_NAME@bananapi:~$</file>+USER_NAME@bananapi:~$</code>
  
 Now start Samba: Now start Samba:
Line 493: Line 493:
  
 Change to your home folder and download the archive containing the PAP backend((There are at least three other PAP backends available on the net (Duncan Gibb [based on Rupi]: [[ftp://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/pap|download]] · [[http://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/pap_backend_with_cups.txt|instructions]] · [[http://www.openprinting.org/printer/Apple/Apple-LaserWriter_Pro_630|info]] · [[http://web.archive.org/web/20030814084608/http://vt.oeh.uni-linz.ac.at:80/~rupi/pap/|Rupi's original]] [info] · [[ftp://fr2.rpmfind.net/linux/Mandriva/official/9.1/SRPMS/cups-1.1.19-0.5mdk.src.rpm|archive with Rupi's backend and docu]] [next to other stuff] | Derrik Pates: [[https://sourceforge.net/p/netatalk/mailman/attachment/1057229915.3f040c5b6eb9a%40www.dsdk12.net/1/|download]] · [[https://sourceforge.net/p/netatalk/mailman/message/12429430/|description]] · [[http://www.philippwesche.org/200811/doc/apple_talk_print.html|setup 1]] · [[http://www.topoftheworld.org/linux/laserwriterIIg_cups.htm|setup 2]] | SRZ Berlin: [[http://web.archive.org/web/20050514184744/http://www.srz.de/Members/bla/cups/backend/pap/|download and description]]), but the one from Thomas Kaiser is the most advanced and automated one. The original can be found [[https://translate.google.com/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Fkaiser-edv.rexdev.de%2Fde%2Ftipps-und-tricks%2Fcups%2Fappletalk-backend.html&sandbox=1|here]]. To meet the development status of today's Linux systems, emaculation.com is hosting an updated version that is downloaded and installed with the following entries.)) there: Change to your home folder and download the archive containing the PAP backend((There are at least three other PAP backends available on the net (Duncan Gibb [based on Rupi]: [[ftp://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/pap|download]] · [[http://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/pap_backend_with_cups.txt|instructions]] · [[http://www.openprinting.org/printer/Apple/Apple-LaserWriter_Pro_630|info]] · [[http://web.archive.org/web/20030814084608/http://vt.oeh.uni-linz.ac.at:80/~rupi/pap/|Rupi's original]] [info] · [[ftp://fr2.rpmfind.net/linux/Mandriva/official/9.1/SRPMS/cups-1.1.19-0.5mdk.src.rpm|archive with Rupi's backend and docu]] [next to other stuff] | Derrik Pates: [[https://sourceforge.net/p/netatalk/mailman/attachment/1057229915.3f040c5b6eb9a%40www.dsdk12.net/1/|download]] · [[https://sourceforge.net/p/netatalk/mailman/message/12429430/|description]] · [[http://www.philippwesche.org/200811/doc/apple_talk_print.html|setup 1]] · [[http://www.topoftheworld.org/linux/laserwriterIIg_cups.htm|setup 2]] | SRZ Berlin: [[http://web.archive.org/web/20050514184744/http://www.srz.de/Members/bla/cups/backend/pap/|download and description]]), but the one from Thomas Kaiser is the most advanced and automated one. The original can be found [[https://translate.google.com/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Fkaiser-edv.rexdev.de%2Fde%2Ftipps-und-tricks%2Fcups%2Fappletalk-backend.html&sandbox=1|here]]. To meet the development status of today's Linux systems, emaculation.com is hosting an updated version that is downloaded and installed with the following entries.)) there:
-<code>cd sudo wget http://www.emaculation.com/pap_tkaiser_v0.1.4.tgz</code>+<code>cdsudo wget http://www.emaculation.com/pap_tkaiser_v0.1.4.tgz</code>
 Extract the downloaded archive: Extract the downloaded archive:
 <code>tar -xvzf pap_tkaiser_v0.1.4.tgz</code> <code>tar -xvzf pap_tkaiser_v0.1.4.tgz</code>
Line 515: Line 515:
 BrowseLocalProtocols CUPS dnssd pap' /etc/cups/cupsd.conf</code> BrowseLocalProtocols CUPS dnssd pap' /etc/cups/cupsd.conf</code>
  
-To prevent the spool folder at /var/spool/cups from growing endlessly, change its maximum size:((See http://www.linuxquestions.org/questions/linux-software-2/how-to-prevent-var-spool-cups-from-becoming-full-901965/#post4466619)) +To prevent the spool folder at /var/spool/cups from growing endlessly, configure CUPS to delete print jobs once they have been handled
-<code>sudo sed -i "/MaxLogSize/c\MaxLogSize 52428800" /etc/cups/cupsd.conf</code> +<code>sudo sed -i "/MaxLogSize/a PreserveJobHistory No" /etc/cups/cupsd.conf</code> 
-That way, if the size of the spool folder exceeds a certain limit, any print jobs you have sent will automatically be deleted from the Banana Pi after they have been processed. I have chosen a limit of 50 MB, converted into bytes. (Setting the MaxLogSize to 0 will not make CUPS delete a print job after finishing it, but make it actually keep all of them.)+You could also choose to keep the job files for a certain amount of time((See https://opensource.apple.com/source/cups/cups-327/cups/doc/help/ref-cupsd-conf.html.in#PreserveJobHistory.)).
  
 Finally restart CUPS: Finally restart CUPS:
Line 530: Line 530:
  
 In the browser, click on "Add Printer" (this is only to trigger the authentication dialog -- you may have to do this twice until the auth dialog appears). Login with your username and password for the Banana Pi. Click on the "back" button of your browser and then on "Find New Printers". After a moment your AppleTalk printer should appear among the available printers. Click on "Add This Printer" next to it. In the browser, click on "Add Printer" (this is only to trigger the authentication dialog -- you may have to do this twice until the auth dialog appears). Login with your username and password for the Banana Pi. Click on the "back" button of your browser and then on "Find New Printers". After a moment your AppleTalk printer should appear among the available printers. Click on "Add This Printer" next to it.
-On the following page, you may amend name, description and location to your needs. Click on "Share This Printer" and "Continue".+On the following page, you may amend name, description (which will appear as printer name in OS X) and location to your needs. Click on "Share This Printer" and "Continue".
  
-On the next page, do not choose a PPD file (you want OS X to handle that). Choose "Make: -> Raw" and click on "Continue". Then choose "Model: -> Raw Queue (en)" and click on "Add Printer".+On the next page, do not choose a PPD file (you want OS X to handle that)((It is also possible to have CUPS on the Banana Pi handle it. That is especially useful if you use the printer from more than one computer or if you want to use AirPrint (to print from an iPhone or iPad). If you want that, click the button behind "Or Provide a PPD File:", choose the file on your computer and click "Add Printer". Due to a bug in the PostScript interpreter of the LaserWriter 4/600 PS (and possibly also the Personal LaserWriter 320), it will only produce empty pages if the Banana Pi handles the PPD. This can be fixed by a workaround as reported at https://bugzilla.redhat.com/show_bug.cgi?id=1304869#c12. The first option there will use a different PDF to PostScript renderer for all PostScript printers handled by the Banana Pi (in case you use it for more than one), the second option will do that for a particular printer only -- if you opt for that, restart cups after you're finished. At this point the printer can be used by an iPhone or iPad -- our Debian system is automatically sharing it as an AirPrint device using avahi -- see https://wiki.debian.org/AirPrint.)). Choose "Make: -> Raw" and click on "Continue". Then choose "Model: -> Raw Queue (en)" and click on "Add Printer".
 Now you are asked to set the default options for your printer. Just click on "Set Default Options". Now you are asked to set the default options for your printer. Just click on "Set Default Options".
  
Line 538: Line 538:
 ==== Adding the printer to OS X ==== ==== Adding the printer to OS X ====
 === === === ===
-Add your printer via "Printers & Scanners" in the OS X System Preferences. Click on the "+" and choose "Add Printer or Scanner" from the menu. (Choosing "LaserWriter 4/600 PS @ bananapi" from the menu does not work at this point as there is no PPD assigned.) In the following window, choose "LaserWriter 4/600 PS @ bananapi" and choose "Other…" from the menu behind "Print Using:" (or just "Use:" depending on your OS X version). Navigate to your printer's PPD file on OS X and click "Open", followed by "Add" when you're back at the former window.+Add your printer via "Printers & Scanners" in the OS X System Preferences. Click on the "+" and choose "Add Printer or Scanner" from the menu. (Choosing "LaserWriter 4/600 PS @ bananapi" from the menu does not work at this point as there is no PPD assigned.((Except if you did so following the footnote in the last paragraph under "Share your AppleTalk printer to the network". In that case do so and ignore the remaining instructions under "Adding the printer to OS X" -- they will be performed automatically.))) In the following window, choose "LaserWriter 4/600 PS @ bananapi" and choose "Other…" from the menu behind "Print Using:" (or just "Use:" depending on your OS X version). Navigate to your printer's PPD file on OS X and click "Open", followed by "Add" when you're back at the former window.
  
-It is also possible to have the Banana Pi manage the PPD. But I got empty pages when trying to print that way.((Next to that this only works for printers with [[https://en.wikipedia.org/wiki/PostScript#PostScript_Level_2|PostScript Level 2]] and up, see [[https://forum.armbian.com/index.php?/topic/1133-banana-pi-m1-gmac-wont-work-with-appletalk/&do=findComment&comment=19243|here]].))+It is also possible to have the Banana Pi manage the PPD. But I got empty pages when trying to print that way. //(I have found a fix for that by now. It will also enable you to share the printer via AirPrint and use it from your iPhone or iPad. See the two footnotes above.)((This only works for printers with [[https://en.wikipedia.org/wiki/PostScript#PostScript_Level_2|PostScript Level 2]] and up, see [[https://forum.armbian.com/index.php?/topic/1133-banana-pi-m1-gmac-wont-work-with-appletalk/&do=findComment&comment=19243|here]].))//
  
 ====== ====== ====== ======