Thursday, January 01, 2015

From PC to iPad Through Raspberry Pi


  1. So, you want to read Dr. Leach's Noise Potpourri
  2. So, you managed to scavenge them off the internet onto your PC - all the PDFs
  3. So, you can open them on your PC, but, you think, wouldn't it be nice to look at them on your iPad?
  4. But, how do you get files onto your iPad? Apple forbids transfer from PC to iPad. As you know, Apple products that fit in your hand are great for absorbing content, but not for creating content.
  5. So, how can you read these PDFs on your iPad?
  6. Fortunately, you're a visionary who's set up a Raspberry Pi webserver. 
  7. So, if you can just get to your Pi from your Pad, you're done.
  8. Easy - you have to set up lighttpd - google it. That'll make what's in your /var/www directory visible to the world - if you care about a static URL like mypi.mynet.org, you need to set up an account with a free DNS service like freedns.afraid.org. Google it.
  9. Use MS Word (this is the painless way, there are other ways) to start a new file.
  10. Use M$ Command Prompt (#r, then cmd) to go the directory with the Leach files and do a dir. Then, you right-click on the title bar of the window and do Edit > Mark and select the column of filenames. Then you do R > Edit > Copy.
  11. Come to your Word window and do a Ctrl-V. Then, Save-As, into the same Leach directory, as a web-page, name index (it'll be htm for now, change to .html on your Pi later).
  12. Then, double-click on each name and then do Insert > Hyperlink > and put in the name of each file by double-clicking on the available list the Word gives you - come on! This part is easy. Don't give me that look!
  13. Then, use WinSCP to put the files into a folder on your Pi called (say) leach (includes index.htm).
  14. On Pi, rename the index.htm to index.html.
  15. Then, in your /var/www directory do "sudo ln -s ~/Desktop/notes/leach ."
  16. And you're set. 
  17. You should be able to take your iPad browser to either mypi.mynet.org/leach or 192.168.0.113/leach - which assumes your using port 80 - which you probably aren't :) So, put in the port number you used to set up your lighttpd :) In my case, it's http://mypi.mynet.org:1082/leach. That'll be in the /etc/lighttpd/lighttpd.conf.
  18. Of course, some CS genius can tell you how to do all this with 2 keystrokes, but that's not me :)


No comments: