Enable Air Print to print via iphone on Unraid Server


Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

I looked at this briefly but it looks to me a little bit of a pain in the arse.

 

Maybe revist it later when I have some free time, but this involves setting up a cups server on the unRAID server, etc, etc.  I already have my printer working hooked to my server and it works a treat from my computers, not really sure I need to be able to print from my iPhone.

Link to comment

I got this working and I sent you a PM baggies.  Let me know if you're interested.

 

My printer is connected via usb and is not a network printer. Not sure what a reasonable price is.

 

How much work is involved on your side and what would you be happy with.

 

The main thing for me is that the solution is reliable. I did buy a print server a while ago but gave up as it was so temperamental.

 

Can pay via BT or PayPal.

 

 

Sent from my iPhone using Tapatalk

Link to comment
  • 1 month later...

any chance that you could make this solution to setup airprint on UNRAID available to the community? I have a network printer brother hl-2170W that I would like to setup for my iphone and Ipad to print to...it would be much appreciated by myself and the community i'm sure! thanks.

Link to comment

He will do it for $50:

 

quote author=elkay14 link=action=profile;u=18816 date=1323116302]

I can write you a custom install script that will install everything, configure, and set up the go script to have it re-install properly after reboot.  I will also have to assemble a custom slackware package to contain the needed printer driver and filter.  How does $50 sound?  I would strive for absolute 100% satisfaction from you.

 

I'm assuming you are capable of using telnet and running scripts on the unraid host.

 

 

 

Sent from my iPhone using Tapatalk

Link to comment

It is complicated by the need for a functional CUPS setup, which is different for every printer (and how the printer is connected.)

 

If you are interested, let me know via PM and we can talk about price.  The time involved on my end is not trivial.

 

If you are fairly savvy, then I can provide some basic instructions at a future date that will help to guide you through the process and it won't cost you anything.

Link to comment
  • 4 weeks later...

I plan to get this working soon, and I also have a Samsung printer (they have their own CUPS driver called SpliX).

 

The 3 basic steps are:

[*]Get CUPS working with your printer. There's a million and one threads on google about this, here's the one for my printer.

[*]Generate the avahi service scripts for your printer that point to the CUPS printer. There's a python script to do this automatically here

[*]Put all the steps together and get avahi-daemon running.

 

Obviously getting CUPS working properly with your system is going to be the tricky bit (as already pointed out) but an add on for generating the service scripts and running the airprint daemon should be possible.

 

Will post updates soon (as my new hardware arrives)

Link to comment

Quick update on mah progress.

 

Here's the packages I needed to get CUPS working and talking to my printer (Samsung ML-2010):

http://slackware.org.uk/salix/i486/13.1/salix/l/splix-2.0.0-i486-2cd.txz

http://slackware.cs.utah.edu/pub/slackware/slackware-13.1/slackware/a/cups-1.4.3-i486-3.txz

http://repository.slacky.eu/slackware-13.1/libraries/jbigkit/2.0/jbigkit-2.0-i486-3sl.txz

 

Once they're installed, run:

chmod +x /etc/rc.d/rc.cups
/etc/rc.d/rc.cups start

 

Go to http://tower:631/ and get the printer configures (PPD is /usr/share/cups/model/samsung/ml2010.ppd)

Link to comment

so splix is just a cups driver for your particular printer correct.

 

There is a printer package already available in unMenu (p910nd) that does basic printing.  I use it with an old HP LaserJet 5P and it works well, but i dont require printing from an iDevice.  After configuring and installing p910nd I configure the printer through cups on my Mac.  It works a treat for printing from my Mac but as I said, I don't need to print from any of my iDevices.

 

 

If you get this all figured out I might be able to find the time to create an unMenu package for it.

Link to comment

so splix is just a cups driver for your particular printer correct.

 

Yep, compatible with most samsung printers and some Xerox (IIRC)

 

There is a printer package already available in unMenu (p910nd) that does basic printing.  I use it with an old HP LaserJet 5P and it works well, but i dont require printing from an iDevice.  After configuring and installing p910nd I configure the printer through cups on my Mac.  It works a treat for printing from my Mac but as I said, I don't need to print from any of my iDevices.

 

I am familiar with p910nd, and have used it on my dd-wrt router. It can't spool jobs though, which makes printing quite slow (and quite often I'm printing in a hurry!)

 

If you get this all figured out I might be able to find the time to create an unMenu package for it.

 

Very kind of you. I'm going to have a crack at doing this too, but I'd appreciate someone having a look over it afterwards as I'm not a linux scripting guru.

Link to comment

I've attached my cupsd.conf which everyone should be able to use. (put it in your flash drive in the config/cups folder, or mkdir /boot/config/cups and stick it in there)

 

Here's what's currently in my go script

 

#######################
# Printer
#######################
installpkg jbigkit-2.0-i486-3sl.txz
installpkg splix-2.0.0-i486-2cd.txz
installpkg cups-1.4.3-i486-3.txz
rm /etc/cups/cupsd.conf
ln -s /boot/config/cups/cupsd.conf /etc/cups/cupsd.conf
chmod +x /etc/rc.d/rc.cups
/etc/rc.d/rc.cups start

 

The config file still needs authentication with a password, so you need to set a root password that isn't blank if you only have that user.

cupsd.conf

Link to comment

Right, got everything setup and configured now, so here's the full set of instructions to get my printer (and most Samsung printers) up and running:

 

Downloads:

  • Download the cupsd.conf from my post above and copy it to /boot/config/cups
     
  • Download the python airprint service creator from here and put the airprint-generate.py in /boot/config/cups/service
  • Generate your PPD file (this is Samsung printer specific) for foomatic from this page and save it to /boot/config/cups/ppd
  • After you've got those files, go back to unraid terminal and do:

cd /boot/packages
wget http://repository.slacky.eu/slackware-13.1/libraries/jbigkit/2.0/jbigkit-2.0-i486-3sl.txz
wget http://slackware.cs.utah.edu/pub/slackware/slackware-13.1/slackware/ap/ghostscript-8.71-i486-2.txz
wget http://slackware.cs.utah.edu/pub/slackware/slackware-13.1/slackware/ap/foomatic-filters-4.0.4-i486-1.txz
wget http://slackware.org.uk/salix/i486/13.1/salix/l/splix-2.0.0-i486-2cd.txz
wget http://slackware.cs.utah.edu/pub/slackware/slackware-13.1/slackware/a/cups-1.4.3-i486-3.txz
wget http://slackware.cs.utah.edu/pub/slackware/slackware-13.1/slackware/l/pycups-1.9.48-i486-1.txz

 

First time cups installation:

cd /boot/packages
# Install pycups for airprint-generate.py
installpkg pycups-1.9.48-i486-1.txz
# Required for Splix:
installpkg jbigkit-2.0-i486-3sl.txz
# Required for CUPS
installpkg ghostscript-8.71-i486-2.txz
# Foomatic filters for CUPS
installpkg foomatic-filters-4.0.4-i486-1.txz
# Copy our PPD (that we generated above) into the foomatic filters folder:
cp /boot/config/cups/ppd/* /usr/share/cups/model/samsung/ 
# Install SpliX for Samsung printers
installpkg splix-2.0.0-i486-2cd.txz
# Install the main CUPS package
installpkg cups-1.4.3-i486-3.txz
# Create a symbolic link to the cupsd.conf that you downloaded above:
ln -sf /boot/config/cups/cupsd.conf /etc/cups/cupsd.conf
# Make cups executable and run it:
chmod +x /etc/rc.d/rc.cups
/etc/rc.d/rc.cups start

 

CUPS first time configuration:

  • Fire up http://tower:631/admin. You should be greeted with the CUPS main page.
  • Click "Add printer"
  • Select your printer. Mine was usb://Samsung/ML-2010 under Local Printers:. Press continue.
  • Stick in the printer name, location and tick share this printer. Click continue.
  • Next screen is driver choice. Mine was Samsung, then Samsung ML-2010 Foomatic/gdi. It's important you choose the Foomatic/gdi one if you have a Samsung printer and generated the PPD file from the page above.
  • Click create printer and you should get a message saying it's been added successfully.

We now have a printer added and configured, so we want to create a copy of the configuration.

 

Back into the terminal:

cp /etc/cups/printers.conf /boot/config/cups/

 

Now we can generate the Avahi service for our shared printer to make it visible to our iDevice:

cd /boot/config/cups/service
python airprint-generate.py
cp *.service /etc/avahi/services/

 

That should be it! Try this command to see if your printer is listed as an internet printer:

avahi-browse -a -t | grep AirPrint

 

Mine shows as:

+   eth0 IPv4 AirPrint Samsung_ML-2010 @ Tower              Internet Printer     local

 

Adding persistance

All of this configuration will disappear when we reboot, so add this to your go script to make it all come back when you restart:

#######################
# Printer
#######################
installpkg jbigkit-2.0-i486-3sl.txz
installpkg ghostscript-8.71-i486-2.txz
installpkg foomatic-filters-4.0.4-i486-1.txz
cp /boot/config/cups/ppd/* /usr/share/cups/model/samsung/  
installpkg splix-2.0.0-i486-2cd.txz
installpkg cups-1.4.3-i486-3.txz
ln -sf /boot/config/cups/cupsd.conf /etc/cups/cupsd.conf
ln -sf /boot/config/cups/printers.conf /etc/cups/printers.conf
chmod +x /etc/rc.d/rc.cups
/etc/rc.d/rc.cups start
cp *.service /etc/avahi/services/

 

Most of that will look familiar from the commands we've used above.

 

Things to note:

  • The CUPS configuration is hard work! This is samsung printer specific at the moment, but should be applicable to other printers if you have the correct google skills.
  • printers.conf (that we took a copy of) will be overwritten if you add or modify a printer, so just be aware that you will have to re-copy if you do this (and you want the changes to persist over a reboot).
  • These instructions are for unRaid 5.0b14 or later (what I'm running)
  • I already have python installed and configured from SabNzbD+, you may have to install yourself to get airprint-generate.py to work

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.