{"id":1734,"date":"2019-12-26T13:42:30","date_gmt":"2019-12-26T18:42:30","guid":{"rendered":"https:\/\/mikew.ca\/wordpress\/?p=1734"},"modified":"2025-01-12T17:27:03","modified_gmt":"2025-01-12T17:27:03","slug":"who-says-the-ipad-isnt-a-laptop-replacement","status":"publish","type":"post","link":"https:\/\/mikew.ca\/blog\/?p=1734","title":{"rendered":"Who says the iPad isn&#8217;t a laptop replacement?"},"content":{"rendered":"\n<p>Imagine you\u2019re sitting in a coffee shop, and you suddenly feel the need to do some coding. Your iPad has some decent code editors, but you\u2019d like to execute what you wrote. How about connecting a Raspberry Pi and running it there?<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped columns-1 wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"2863\" src=\"https:\/\/mikew.ca\/blog\/wp-content\/uploads\/2019\/12\/ipad-pi-1024x768.jpeg\" alt=\"\" class=\"wp-image-2863\" srcset=\"https:\/\/mikew.ca\/blog\/wp-content\/uploads\/2019\/12\/ipad-pi-1024x768.jpeg 1024w, https:\/\/mikew.ca\/blog\/wp-content\/uploads\/2019\/12\/ipad-pi-300x225.jpeg 300w, https:\/\/mikew.ca\/blog\/wp-content\/uploads\/2019\/12\/ipad-pi-768x576.jpeg 768w, https:\/\/mikew.ca\/blog\/wp-content\/uploads\/2019\/12\/ipad-pi.jpeg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>The above is my new fave home-away setup:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>11&#8243; iPad Pro<\/li>\n\n\n\n<li>Brydge keyboard<\/li>\n\n\n\n<li>Magic Mouse<\/li>\n\n\n\n<li>Raspberry Pi 4 \/ 4Gig<\/li>\n<\/ul>\n\n\n\n<p>What makes this work is that the Pi is both powered and gets a network connection over the USB-C port. To enable that, all you have to do on recent versions of Raspian is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add <code>dtoverlay=dwc2<\/code> to \/boot\/config.txt<\/li>\n\n\n\n<li>Add <code>modules-load=dwc2,g_ether<\/code> to \/boot\/cmdline.txt<\/li>\n\n\n\n<li>Reboot<\/li>\n<\/ul>\n\n\n\n<p>Assuming you&#8217;ve got SSH on your RPi, at this point you should be able to connect it directly to the iPad with a USB-C to USB-C cable, then use your favourite iOS SSH client to do the equivalent of <code>ssh pi@hostname-of-pi.local<\/code>, with &#8220;hostname-of-pi&#8221; being whatever you chose (&#8220;raspberrypi&#8221; by default). Usually, I use <a href=\"https:\/\/apps.apple.com\/us\/app\/remoter-pro-vnc-ssh-rdp\/id519768191\">Remoter VNC<\/a> for SSH but that&#8217;s mostly because I&#8217;ve owned the full version of it forever.<\/p>\n\n\n\n<p>If you&#8217;re astute, you&#8217;ll have noticed that it&#8217;s not ssh running on the screen above. \ud83d\ude42 There are many ways to get an actual GUI desktop attached to the RPi, but the one I&#8217;ve found works the best for me is (believe it or not) using Windows Remote Desktop. To enable this, on the RPi, you can <code>sudo apt-get install xrdp<\/code>, and on the iPad install <a href=\"https:\/\/apps.apple.com\/ca\/app\/microsoft-remote-desktop\/id714464092\">Microsoft Remote Desktop<\/a> or whatever RDP client you like best. When you create the connection, use hostname-of-pi.local just like you would have for SSH. <\/p>\n\n\n\n<p>There are a couple of downsides to this setup.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The microsoft remote desktop client, at least, is tuned for using a finger on the screen, rather than a mouse. In fact, support for mice on iPad OS is still in its infancy, though I expect it will improve over time.<\/li>\n\n\n\n<li>The RPi is being powered from the iPad, so you can expect the battery life to be reduced &#8212; it&#8217;s not impossibly bad, but it&#8217;s visible. (Btw, if anyone knows of a good USB-C hub that will power multiple devices with a data passthrough, let me know.)<\/li>\n<\/ol>\n\n\n\n<p>Anyway, if you&#8217;re looking to try this, there are lots of good tutorials out there on YouTube and elsewhere, by people who have invested more effort than me. Regardless, I&#8217;m happy to try and help if you get stuck, so leave a comment.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine you\u2019re sitting in a coffee shop, and you suddenly feel the need to do some coding. Your iPad has some decent code editors, but you\u2019d like to execute what you wrote. How about connecting a Raspberry Pi and running it there? The above is my new fave home-away setup: What makes this work is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[73,112],"class_list":["post-1734","post","type-post","status-publish","format-standard","hentry","category-tech","tag-ipad","tag-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1734"}],"version-history":[{"count":2,"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions"}],"predecessor-version":[{"id":2865,"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions\/2865"}],"wp:attachment":[{"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikew.ca\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}