{"id":16,"date":"2012-07-25T20:55:00","date_gmt":"2012-07-25T20:55:00","guid":{"rendered":"http:\/\/178.62.14.192\/?p=16"},"modified":"2012-07-25T20:55:00","modified_gmt":"2012-07-25T20:55:00","slug":"command-line-experiments","status":"publish","type":"post","link":"https:\/\/www.recantha.co.uk\/blog\/?p=16","title":{"rendered":"Command Line experiments"},"content":{"rendered":"<p>Trying a few things out on my Pi from various blogs.<br \/>\n<strong>NB: this is a stream-of-consciousness experimentation post. I will re-post the most exciting part (text-to-speech) in another part, all cleaned up!<\/strong><\/p>\n<p><strong><a href=\"http:\/\/rpi-blog.com\/optimizing-the-rpi-for-a-headless-install\/\" target=\"_blank\">RPi Blog<\/a>\u00a0&#8211;\u00a0<span style=\"background-color: white;\">Optimizing for a headless install<\/span><\/strong><br \/>\n<span style=\"background-color: white;\">Now, I do use the desktop environment, so not doing the first bit.<\/span><br \/>\n<span style=\"background-color: white;\">But, I like the idea of speeding the terminal login up. So:<\/span><br \/>\n<span style=\"background-color: white;\">Result: Yeah, it speeds it up by a couple of seconds.<\/span><br \/>\n<span style=\"background-color: white;\"><br \/>\n<\/span><br \/>\n<span style=\"background-color: white;\"><strong><a href=\"http:\/\/fusionstrike.com\/2012\/freeing-ram-raspberry-pi\" target=\"_blank\">Fusion Strike<\/a> &#8211; Free up RAM<\/strong><\/span><br \/>\n<span style=\"background-color: white;\">free -m<\/span><br \/>\n<span style=\"background-color: white;\">sync<\/span><br \/>\nedit \/proc\/sys\/vm\/drop_caches<br \/>\nchange the 0 to 3 and save<br \/>\nfree -m<br \/>\nYou should see a drop in memory usage.<br \/>\nResult: I did! 3 MB more free<\/p>\n<p><strong>What is my IP address and can you email it to me?<\/strong><br \/>\nI just followed the <a href=\"http:\/\/elinux.org\/RPi_Email_IP_On_Boot_Debian\" target=\"_blank\">instructions from the wiki<\/a><br \/>\nIt works. Yay.<\/p>\n<p><span style=\"background-color: white;\"><a href=\"http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?f=26&amp;t=11857\" target=\"_blank\"><strong>What is my IP address, and can you tell it to me?<\/strong><\/a><\/span><br \/>\n<span style=\"background-color: white;\">This is to get the Pi to find it&#8217;s own IP address and tell you vocally over the 3.5mm audio jack.<\/span><br \/>\n<span style=\"background-color: white;\">First of all, you need to install Festival, which is the text-to-speech converter.<\/span><\/p>\n<ul>\n<li><span style=\"background-color: white;\">apt-get install festival<\/span><\/li>\n<\/ul>\n<p><span style=\"background-color: white;\">Takes a while, it&#8217;s about 20MB.<\/span><br \/>\n<span style=\"background-color: white;\">Plug your earphones\/speakers into the 3.5mm jack<\/span><br \/>\n<span style=\"background-color: white;\">Right, apparently this should work:<\/span><\/p>\n<ul>\n<li><span style=\"background-color: white;\">echo &#8220;Hello&#8221; | festival &#8211;tts<\/span><\/li>\n<\/ul>\n<p>But it doesn&#8217;t.<br \/>\nSo, moving onto&#8230;<br \/>\n<a href=\"http:\/\/www.raspberrypi-spy.co.uk\/2012\/06\/raspberry-pi-speakers-analog-sound-test\/\">http:\/\/www.raspberrypi-spy.co.uk\/2012\/06\/raspberry-pi-speakers-analog-sound-test\/<\/a><\/p>\n<ul>\n<li><span style=\"background-color: white;\">apt-get install alsa-utils<\/span><\/li>\n<\/ul>\n<p>Well, apparently that&#8217;s already installed.<\/p>\n<ul>\n<li><span style=\"background-color: white;\">modprobe snd_bcm2835<\/span><\/li>\n<li><span style=\"background-color: white;\">amixer cset numid=3 1<\/span><\/li>\n<li><span style=\"background-color: white;\">This last command <\/span><em style=\"background-color: white;\">should<\/em><span style=\"background-color: white;\">\u00a0turn the analogue output (i.e. the 3.5mm jack) on.<\/span><\/li>\n<\/ul>\n<div>Right, now build the test audio file:<\/div>\n<ul>\n<li>cd \/opt\/vc\/src\/hello_pi<\/li>\n<li>.\/rebuild.sh<\/li>\n<li>cd hello_audio<\/li>\n<li>.\/hello_audio.bin<\/li>\n<li>You should hear something like a siren run through a bad 50s sci-fi tv show.<\/li>\n<\/ul>\n<div>Now to get something working properly. Festival would be lovely, but right now I&#8217;d settle for anything that could just play SOMETHING without compiling it first!<\/div>\n<div>\n<ul>\n<li>Get mplayer:\n<ul>\n<li>apt-get install mplayer<\/li>\n<\/ul>\n<\/li>\n<li>mplayer doesn&#8217;t appear to be able to play the test file I downloaded.<\/li>\n<li>Let&#8217;s try using aplay&#8230; There are some samples in a directory from a package called &#8216;alsa&#8217;, so let&#8217;s use one of those.<\/li>\n<li><\/li>\n<li>aplay \/usr\/share\/sounds\/alsa\/Front_Center.wav<\/li>\n<li>Yes! Works. Dull, but it works.<\/li>\n<\/ul>\n<p>Let&#8217;s try a different audio package called &#8216;sox&#8217;.<\/p>\n<\/div>\n<div>\n<ul>\n<li><span style=\"background-color: white;\">sudo apt-get install sox<\/span><\/li>\n<li><span style=\"background-color: white;\">sox \/usr\/share\/sounds\/alsa\/Front_Center.wav -t alsa default<\/span><\/li>\n<\/ul>\n<div>Nope that didn&#8217;t work.<\/div>\n<\/div>\n<div>Okay, let&#8217;s at least make sure that that modprobe command is automatically sorted out on reboot.<\/div>\n<div>\n<ul>\n<li>Edit \/etc\/modules<\/li>\n<li>Make sure that snd_bcm2835 is in the file.<\/li>\n<li>Once it is (it might be already) you do not need to do the modprobe again after each reboot.<\/li>\n<\/ul>\n<div>Right, let&#8217;s get back to the text-to-speech<\/div>\n<div>From\u00a0<a style=\"background-color: white;\" href=\"http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?p=114072\">http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?p=114072<\/a><\/div>\n<div>\n<ul>\n<li><span style=\"background-color: white;\">Okay, let&#8217;s try mplayer again<\/span><\/li>\n<li><\/li>\n<li>mplayer \/usr\/share\/sounds\/alsa\/Front_Center.wav<\/li>\n<li>Nope, nothing. Get an error about not being able to open socket&#8230;<\/li>\n<li>Moving on to\u00a0 <a href=\"https:\/\/bbs.archlinux.org\/viewtopic.php?id=40013\">https:\/\/bbs.archlinux.org\/viewtopic.php?id=40013<\/a><\/li>\n<li>Edit \/etc\/mplayer\/mplayer.conf<\/li>\n<li>Add nolirc=yes<\/li>\n<li>And run that mplayer command again.<\/li>\n<li>Yes! Works!<\/li>\n<li>Try Festival again<\/li>\n<li><span style=\"background-color: white;\">echo &#8220;Hello&#8221; | festival &#8211;tts &amp;<\/span><\/li>\n<li><span style=\"background-color: white;\">YES! It spoke to me!!! Woo-hoo!!!<\/span><\/li>\n<li><span style=\"background-color: white;\">You can also use ax206geek&#8217;s script to use Google&#8217;s text to speech engine. Create a file called speech.sh:<\/span><\/li>\n<\/ul>\n<p>#!\/bin\/bash<\/p>\n<\/div>\n<div>say() {<\/div>\n<div>local IFS=+;\/usr\/bin\/mplayer -ao alsa -really-quiet -noconsolecontrols &#8220;http:\/\/translate.google.com\/translate_tts?tl=en&amp;q=$*&#8221;; }<\/div>\n<div>say $*<\/div>\n<\/div>\n<div><\/div>\n<div>chmod u+x speech.sh<\/div>\n<div>And then call it using: .\/speech.sh Hello Dave<\/div>\n<div><\/div>\n<div>That works, too!<\/div>\n<div><\/div>\n<div>Now, I want to get the Pi to email me AND speak the IP address.<\/div>\n<div>I can do that&#8230;<\/div>\n<div><\/div>\n<div>\n<ul>\n<li>As root&#8230;<\/li>\n<li>cd ~\/<\/li>\n<li>mkdir bin<\/li>\n<li>cd bin<\/li>\n<li><strong>NB This script works for Google email accounts. Change the smtp server for other email hosts.<\/strong><\/li>\n<li>create\/edit a file called &#8217;email_ip_address.py&#8217;<\/li>\n<\/ul>\n<div>\n<div>import subprocess<\/div>\n<div>import smtplib<\/div>\n<div>import socket<\/div>\n<div>from email.mime.text import MIMEText<\/div>\n<div>import datetime<\/div>\n<div># Change to your own account information<\/div>\n<div>to = &#8216;&lt;where you want it sent&gt;&#8217;<\/div>\n<div>gmail_user = &#8216;&lt;google email login address&gt;&#8217;<\/div>\n<div>gmail_password = &#8216;&lt;google email password&gt;&#8217;<\/div>\n<div>smtpserver = smtplib.SMTP(&#8216;smtp.gmail.com&#8217;, 587)<\/div>\n<div>smtpserver.ehlo()<\/div>\n<div>smtpserver.starttls()<\/div>\n<div>smtpserver.ehlo<\/div>\n<div>smtpserver.login(gmail_user, gmail_password)<\/div>\n<div>today = datetime.date.today()<\/div>\n<div># Very Linux Specific<\/div>\n<div>arg=&#8217;ip route list&#8217;<\/div>\n<div>p=subprocess.Popen(arg,shell=True,stdout=subprocess.PIPE)<\/div>\n<div>data = p.communicate()<\/div>\n<div>split_data = data[0].split()<\/div>\n<div>ipaddr = split_data[split_data.index(&#8216;src&#8217;)+1]<\/div>\n<div>my_ip = &#8216;Your ip is %s&#8217; % \u00a0ipaddr<\/div>\n<div>msg = MIMEText(my_ip)<\/div>\n<\/div>\n<\/div>\n<div>\n<div>msg[&#8216;Subject&#8217;] = &#8216;IP For RaspberryPi on %s&#8217; % today.strftime(&#8216;%b %d %Y&#8217;)<\/div>\n<div>msg[&#8216;From&#8217;] = gmail_user<\/div>\n<div>msg[&#8216;To&#8217;] = to<\/div>\n<div>smtpserver.sendmail(gmail_user, [to], msg.as_string())<\/div>\n<div>smtpserver.quit()<\/div>\n<\/div>\n<div>\n<ul>\n<li><span style=\"background-color: white;\">Save &amp; quit<\/span><\/li>\n<li><span style=\"background-color: white;\">chmod a+x email_ip_address.py<\/span><\/li>\n<li><span style=\"background-color: white;\">Now create\/edit another file: say_my_ip_address.sh<\/span><\/li>\n<\/ul>\n<div>\n<div>\n<div>#!\/bin\/sh<\/div>\n<div>echo `hostname -I` &gt; \/tmp\/check_ip.out<\/div>\n<div>_CHECK_IP=`cat \/tmp\/check_ip.out`<\/div>\n<div>_LEN=`expr length $_CHECK_IP`<\/div>\n<div><\/div>\n<div>if [ $_LEN -gt 3 ]; then<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;&#8221; &gt; \/tmp\/shoutout.tmp<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;I am, a, Raspberry Pi. My I,P address is. &#8221; &gt;&gt; \/tmp\/shoutout.tmp<\/div>\n<div><\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 for EACH in `hostname -I | grep -o -e &#8220;[^.]*&#8221;`; do<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 for BIT in `echo $EACH | grep -o -e .`; do<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 echo $BIT &gt;&gt; \/tmp\/shoutout.tmp;<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;. &#8221; &gt;&gt; \/tmp\/shoutout.tmp;<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 done<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;dot. &#8221; &gt;&gt; \/tmp\/shoutout.tmp;<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 done<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;. Would you like to play a game?&#8221; &gt;&gt; \/tmp\/shoutout.tmp<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 cat \/tmp\/shoutout.tmp | festival &#8211;tts<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 rm \/tmp\/shoutout.tmp<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 rm \/tmp\/check_ip.out<\/div>\n<div>else<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;I do not yet have an I,P address&#8221; | festival &#8211;tts<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 sleep 5<\/div>\n<div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \/root\/bin\/say_my_ip_address.sh 2&amp;&gt;\/dev\/null<\/div>\n<div>fi<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<ul>\n<li>Save and quit.<\/li>\n<li>(All those fullstops and commas space out the words so it sounds like an IP address!)<\/li>\n<li>chmod a+x say_my_ip_address.sh<\/li>\n<li>Now we put them in to our start-up routine.<\/li>\n<li>Edit \/etc\/rc.local<\/li>\n<li>Add the following lines:<\/li>\n<\/ul>\n<div>\n<div>sudo -u root python \/root\/bin\/email_ip_address.py &amp;&gt;\/dev\/null<\/div>\n<div>sudo -u root \/root\/bin\/say_my_ip_address.sh &amp;&gt;\/dev\/null<\/div>\n<\/div>\n<\/div>\n<div>\n<ul>\n<li>And reboot<\/li>\n<li>Don&#8217;t forget to have your earphones plugged in!<\/li>\n<\/ul>\n<div><\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div class=\"blogger-post-footer\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com\" alt=\"\" width=\"1\" height=\"1\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Trying a few things out on my Pi from various blogs. NB: this is a stream-of-consciousness experimentation post. I will re-post the most exciting part (text-to-speech) in another part, all cleaned up! RPi Blog\u00a0&#8211;\u00a0Optimizing for a headless install Now, I&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=16\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[42,51],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Command Line experiments - Raspberry Pi Pod<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=16\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Command Line experiments - Raspberry Pi Pod\" \/>\n<meta property=\"og:description\" content=\"Trying a few things out on my Pi from various blogs. NB: this is a stream-of-consciousness experimentation post. I will re-post the most exciting part (text-to-speech) in another part, all cleaned up! RPi Blog\u00a0&#8211;\u00a0Optimizing for a headless install Now, I&hellip;Read more &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.recantha.co.uk\/blog\/?p=16\" \/>\n<meta property=\"og:site_name\" content=\"Raspberry Pi Pod\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/recantha\/\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-25T20:55:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com\" \/>\n<meta name=\"author\" content=\"Michael Horne\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@recantha\" \/>\n<meta name=\"twitter:site\" content=\"@recantha\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Horne\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16\"},\"author\":{\"name\":\"Michael Horne\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\"},\"headline\":\"Command Line experiments\",\"datePublished\":\"2012-07-25T20:55:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16\"},\"wordCount\":1026,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com\",\"articleSection\":[\"Raspberry Pi Foundation\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=16#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16\",\"name\":\"Command Line experiments - Raspberry Pi Pod\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com\",\"datePublished\":\"2012-07-25T20:55:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=16\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage\",\"url\":\"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com\",\"contentUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=16#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.recantha.co.uk\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Command Line experiments\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"name\":\"Raspberry Pi Pod\",\"description\":\"Experiences with the Raspberry Pi micro computer and microcontroller\",\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\",\"name\":\"Raspberry Pi Pod\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"width\":800,\"height\":337,\"caption\":\"Raspberry Pi Pod\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/recantha\/\",\"https:\/\/x.com\/recantha\",\"https:\/\/www.linkedin.com\/in\/recantha\/\",\"https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\",\"name\":\"Michael Horne\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"caption\":\"Michael Horne\"},\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Command Line experiments - Raspberry Pi Pod","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.recantha.co.uk\/blog\/?p=16","og_locale":"en_US","og_type":"article","og_title":"Command Line experiments - Raspberry Pi Pod","og_description":"Trying a few things out on my Pi from various blogs. NB: this is a stream-of-consciousness experimentation post. I will re-post the most exciting part (text-to-speech) in another part, all cleaned up! RPi Blog\u00a0&#8211;\u00a0Optimizing for a headless install Now, I&hellip;Read more &rarr;","og_url":"https:\/\/www.recantha.co.uk\/blog\/?p=16","og_site_name":"Raspberry Pi Pod","article_publisher":"https:\/\/www.facebook.com\/recantha\/","article_published_time":"2012-07-25T20:55:00+00:00","og_image":[{"url":"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com","type":"","width":"","height":""}],"author":"Michael Horne","twitter_card":"summary_large_image","twitter_creator":"@recantha","twitter_site":"@recantha","twitter_misc":{"Written by":"Michael Horne","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#article","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16"},"author":{"name":"Michael Horne","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263"},"headline":"Command Line experiments","datePublished":"2012-07-25T20:55:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16"},"wordCount":1026,"commentCount":0,"publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com","articleSection":["Raspberry Pi Foundation","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.recantha.co.uk\/blog\/?p=16#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16","url":"https:\/\/www.recantha.co.uk\/blog\/?p=16","name":"Command Line experiments - Raspberry Pi Pod","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com","datePublished":"2012-07-25T20:55:00+00:00","breadcrumb":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.recantha.co.uk\/blog\/?p=16"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#primaryimage","url":"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com","contentUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/3715640409195873782-933926479133837939?l=raspberrypipod.blogspot.com"},{"@type":"BreadcrumbList","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=16#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.recantha.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Command Line experiments"}]},{"@type":"WebSite","@id":"https:\/\/www.recantha.co.uk\/blog\/#website","url":"https:\/\/www.recantha.co.uk\/blog\/","name":"Raspberry Pi Pod","description":"Experiences with the Raspberry Pi micro computer and microcontroller","publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.recantha.co.uk\/blog\/#organization","name":"Raspberry Pi Pod","url":"https:\/\/www.recantha.co.uk\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","width":800,"height":337,"caption":"Raspberry Pi Pod"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/recantha\/","https:\/\/x.com\/recantha","https:\/\/www.linkedin.com\/in\/recantha\/","https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg"]},{"@type":"Person","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263","name":"Michael Horne","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","caption":"Michael Horne"},"url":"https:\/\/www.recantha.co.uk\/blog\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2RsaV-g","jetpack-related-posts":[{"id":36,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=36","url_meta":{"origin":16,"position":0},"title":">RSS Feed collection for the Raspberry Pi","author":"Michael Horne","date":"3 September 2012","format":false,"excerpt":"You have always been able to subscribe to my Google Reader RSS bundle on the right hand side of this blog, but I thought it would be helpful to post them all here. This is up to 3rd September 2012, but I add new feeds all the time. If your\u2026","rel":"","context":"In &quot;Raspberry Pi Foundation&quot;","block_context":{"text":"Raspberry Pi Foundation","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=42"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/1.bp.blogspot.com\/-oqrw1IIxd_I\/UESbBV13jOI\/AAAAAAAAAeA\/_Yme81tLnOg\/s200\/orange-rss-robot-concept.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5351,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=5351","url_meta":{"origin":16,"position":1},"title":"#RaspberryPi and camera cases round-up","author":"Michael Horne","date":"29 July 2013","format":false,"excerpt":"Here's some links to some new eBay items I've found. They're all cases, so if you're not interested look away now ;-) These are presented without comment apart from description. And no, I haven't had any free samples, these were just found as a result of a general search. Pi-Tri-Cam\u2026","rel":"","context":"In &quot;Cases&quot;","block_context":{"text":"Cases","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17996,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=17996","url_meta":{"origin":16,"position":2},"title":"Use RetroPie on top of pi-topOS by configuring your Raspberry Pi correctly","author":"Michael Horne","date":"3 January 2018","format":false,"excerpt":"Rene Richarz has written a great guide on installing RetroPie on top of pi-topOS on your pi-top or pi-topCEED. He goes through removing part of the pi-topOS and then installing RetroPie, giving all the necessary command line instructions to set-up for the RetroPie instructions, which are on a different site.\u2026","rel":"","context":"In &quot;Accessories&quot;","block_context":{"text":"Accessories","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=54"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/01\/26170630_2024768641122738_4782747866819306198_o.jpg?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/01\/26170630_2024768641122738_4782747866819306198_o.jpg?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/01\/26170630_2024768641122738_4782747866819306198_o.jpg?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/01\/26170630_2024768641122738_4782747866819306198_o.jpg?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/01\/26170630_2024768641122738_4782747866819306198_o.jpg?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":16456,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=16456","url_meta":{"origin":16,"position":3},"title":"New version of pi-topOS released for the Raspberry Pi &#8211; try it out today!","author":"Michael Horne","date":"24 February 2017","format":false,"excerpt":"pi-top have just announced a new version of their pi-topOS operating system. The new version, called Polaris, has a fresh new dashboard design and updates to the CODER programming interface. pi-topOS offers a lot of user interface improvements over the standard Raspbian OS and is well worth trying out. Myself\u2026","rel":"","context":"In &quot;Operating systems&quot;","block_context":{"text":"Operating systems","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=15"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/02\/pi-topOS-polaris.jpg?fit=1200%2C630&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/02\/pi-topOS-polaris.jpg?fit=1200%2C630&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/02\/pi-topOS-polaris.jpg?fit=1200%2C630&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/02\/pi-topOS-polaris.jpg?fit=1200%2C630&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/02\/pi-topOS-polaris.jpg?fit=1200%2C630&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":16581,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=16581","url_meta":{"origin":16,"position":4},"title":"Major win for pi-top as it&#8217;s Raspberry Pi-based operating system and hardware is endorsed by OCR","author":"Michael Horne","date":"10 March 2017","format":false,"excerpt":"London-based company pi-top has scored a major success this week as its pi-topOS has been endorsed by leading examination-awarding body OCR (Oxford, Cambridge and RSA). pi-top has successfully adapted the standard Raspbian operating system by adding\u00a0a simplified desktop and additional software: pi-topCODER - a special\u00a0environment and teaching system for learning\u2026","rel":"","context":"In &quot;Education&quot;","block_context":{"text":"Education","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=17"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/01\/pi-top-child.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/01\/pi-top-child.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/01\/pi-top-child.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/01\/pi-top-child.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":17175,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=17175","url_meta":{"origin":16,"position":5},"title":"pi-top laptop review &#8211; Raspberry Pi inside a laptop","author":"Michael Horne","date":"22 July 2017","format":false,"excerpt":"JC Torres over at SlashGear has written an excellent, extremely comprehensive review of the pi-top laptop. They go through assembling the laptop and then using the pi-topOS, including a word about the pi-topCODER and pi-topUNIVERSE. Overall, the pi-top receives an 8\/10, which I think is fair considering the minor flaws\u2026","rel":"","context":"In &quot;pi-top&quot;","block_context":{"text":"pi-top","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=134"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/07\/pi-top-00.jpg?fit=980%2C620&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/07\/pi-top-00.jpg?fit=980%2C620&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/07\/pi-top-00.jpg?fit=980%2C620&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/07\/pi-top-00.jpg?fit=980%2C620&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}