Printing from cell phone via bubba
Posted: 30 Jun 2011, 13:50
Found a cool hack to print files like pdf's, images and text files from a Android cellphone using Dropbox, and thought it might be possible to do that without passing the data through the Dropbox servers and just do on my local network instead. 
The initial guide is here http://www.labnol.org/software/print-fi ... nux/17841/
* I use my Bubba as a print server, so that's taken care of already.
* On my Android I installed the file manager called File Expert, since it had good support for sftp.
* I created a folder in my home/andreasn directory called PrintQueue and logged in with the ftp app on the phone.
* I had some some issues with getting lpr running, but it turned out lp worked well too once I set my printer as the default with lpoptions.
* Finally I set up a cron job to run the script below once every minute.
#!/usr/bin/env bash
PrintQueue="/home/andreasn/PrintQueue"
cd "$PrintQueue"
for file in *; do
lp "./$file"
rm "./$file"
done

The initial guide is here http://www.labnol.org/software/print-fi ... nux/17841/
* I use my Bubba as a print server, so that's taken care of already.
* On my Android I installed the file manager called File Expert, since it had good support for sftp.
* I created a folder in my home/andreasn directory called PrintQueue and logged in with the ftp app on the phone.
* I had some some issues with getting lpr running, but it turned out lp worked well too once I set my printer as the default with lpoptions.
* Finally I set up a cron job to run the script below once every minute.
#!/usr/bin/env bash
PrintQueue="/home/andreasn/PrintQueue"
cd "$PrintQueue"
for file in *; do
lp "./$file"
rm "./$file"
done