I’ve fiddled around a bit with my Raspberry Pi in the past but wanted to be able to run it using my laptop rather than having all the parts (monitor, keyboard, and mouse) cluttering up my workspace. Yesterday, in between Spring cleanup and gardening, I managed to get it to work. It took several chunks of time: I would work on it, get to a stopping place of either a roadblock or success, go outside and play in the dirt, then return with renewed energy.
I knew I wanted to do it via Ethernet as that way I could do demos without having to worry about connecting over wireless networks. And the two devices had to be connected to each other rather than through a router for the same reason.
There was a lot of trial and error but by last evening, I was playing with python via my mac. The steps below are NOT in the order I did them, and I wasted a whole block of time trying to get a small screen I have to display before giving in and setting up the RPi workstation. (The screen issues had to do with the screen and not the RPi.)
I tried the first option here and that at least got me as far as discovering and setting network addresses on the two devices. But, as the site points out, without having a keyboard and display, it’s tough to test. Once I gave in to setting up the workstation, I was able to have both devices talk to each other through ping pretty quickly.
I installed a VNC server via this Instructables site. The comments led me to the X11vnc as well as the missing code in the original directions. I figured I had to get X11vnc to autostart so I followed these directions. I never did get autostart to work, but the other issue that stumped me for a bit was the fact that I had to login to the RPi after start up before I could view it on my laptop, and I wasn’t sure how to do that without having the RPi plugged into its own desktop peripherals. I followed some directions for auto login but that seemed to take away my root abilities. This was the point where I had to do some backing out, unediting a few files.
Finally, just as I was thinking it would have to wait for another day, I found this site by using the keyword “headless.” I had done a lot of the directions, but it was the ssh part that I hadn’t quite figured out. Worked wonderfully and left me wondering how much time I might have saved had I found this site first. But, I also learned a lot through the trial and error, getting comfortable with terminal windows and linux commands so it wasn’t a complete waste of time.
Now, I use the terminal window on my Mac to ssh into the RPi. I start up the X11vnc server, start up the the RPi graphical user interface and then use VNC to interact with it since I get an error message when I try to connect via the server command on my Mac.
Lessons learned? The Internet has a wealth of information and I am grateful to everyone who posted all the links above. However, it was not always exactly what I wanted or needed so I had to pick up bits and pieces from here and there. I did things that needed to be undone so a little ongoing documentation helped. (I have a paper journal where I can jot short term notes.) Finally, as always, knowing the language of the project helps to choose the right keywords.