Sunday, June 07, 2020

Raspberry Pi Zero setup for Motion Eye

First off, I'd like to say thanks to  Calin Crisan for his work on Motion eye. He's posted a few how to's on his Github page. This page is a modified version of his page. I've found the following method to work a bit more smoothly for me. Your Millage May vary. Before you go further, this post assumes that you know about installing Raspbian on your SD card, and have access to your Pi Zero via SSH.

I'm installing Motion eye on a Raspberry Pi Zero W.

In this example Raspbian Buster Lite is already installed on it.  I used for my install. It also needs to be setup headlessly to use SSH.  I wrote a little post about that here. 

 Before Proceeding

    Read Calin Crisan's general Installation page first.

These instructions are intended for an up-to-date Raspbian Buster install, but they should work for Raspbian Stretch as well.

    All commands require root; use sudo before each command or become root using sudo -i.
    If you want to use the CSI camera module for the Raspberry PI, make sure you have enabled it in raspi-config.  Also don't forget to run Apt Update and Apt Upgrade if doing this on a fresh install of buster.


Install ffmpeg and other motion dependencies:

apt install ffmpeg libmariadb3 libpq5 libmicrohttpd12

I still needed to run apt update --fix-missing to get all the packages to install when I used this method. Lately, I have not had to. 

Install the dependencies from the repositories including "python-pil instead" of python-pillow, and selecting 'zlib1g-dev' instead of 'libz-dev'. 

apt install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev python-pil

Once all of the packages for ffmpeg and motion dependencies are install, proceed to install Motion.

 Install  motion:

dpkg -i pi_buster_motion_4.2.2-1_armhf.deb
Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):
pip install motioneye
Prepare the configuration directory:
mkdir -p /etc/motioneye
cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf

Prepare the media directory:
mkdir -p /var/lib/motioneye

Add an init script, configure it to run at startup and start the motionEye server:
cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
systemctl daemon-reload
systemctl enable motioneye
systemctl start motioneye

To upgrade to the newest version of motionEye, just issue:
pip install motioneye --upgrade
systemctl restart motioneye

These instructions were modified from the original found here:

Monday, May 25, 2020

Setting up a Raspberry Pi Zero W for Headless Use on Linux

This shouldn't take to long, and it's fairly simple to do. But if you're a novice and don't know about it, it might drive you crazy trying to figure this out.  And that's not the kind of crazy that is good for anyone.

This assumes that you've already figured out how you're going to get your Pi's SD card imaged.  I use BalenaEtcher myself.  There is dd and other methods a person can use.

Once the SD card is imaged you'll need to create an empty file on the Boot Partition called ssh.
Just right click in your file manager to create an empty document called ssh

Now you'll need to right click again to create a document, but you'll want to call it  wpa_supplicant.conf in that file you'll need your wifi network login information. Open that in Pluma or Nano or whatever your default text editor is, and put these lines below in in. Edited of course, with the correct SSID and Password for your Wifi network.  

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Save this file, making sure that it's named correctly and in the \boot partition of the SD card. At this point you can eject the SD card from your PC.

Next you're going to SSH into the Pi from the terminal on you Linux machine.

What I found easiest was to log into my router and get the IP address of connected devices.  It might take a little time, so be patient. 

I have also used an Android App called Fing,  and you can also use nmap. But my router info does the trick for me. Once you have figured out what the IP address is for your Raspberry Pi Zero W, you need to open up a terminal to SSH into it.The Default username is pi and default password is raspberry

yourname@linuxpc:~$ ssh pi@
pi@'s password:raspberry

If all has gone well, you've now successfully logged into your Pi Zero over Wifi!
For your initial log in you'll get a security warning. Say Yes to it.

Now would be a good time to run raspi-config  now that you've logged into it to change your default password, and expand the file system if needed.
You'll also want to run
Apt Update and  Apt Upgrade 
to get your machine up to date with it's packages.

That's pretty much it. You should have a Raspberry Pi Zero W that you can SSH into.

I've used this method a few times to get my Pi's setup for use with MotionEye. I've modified the original process with my own blog post on how to get Motion Eye installed and going, the original seemed to have a couple of steps out of order. 

I'd like to say that I took most of my information for this blog post from Mitch Allen's post about how to do this via Windows.

Thursday, January 31, 2019

Weather Clock HTML

Ever since I cut the cord, and hooked up a PC to my TV, I've always liked a nice Weather Clock display for those times I'm not watching TV and am listening to the radio (I like by the way).

If you've been a Chrome user you might have seen some of the "New Tab" Clock and weather gadgets that have been built over the past couple of years.  A popular one E Clock, I think it was, worked really well and it had the coolness of offering up quite a few nice backgrounds to go with it.  But as of the 1st of this year it quit loading the weather. There is also Currently, and it's working at the moment.  But it has stopped from time to time. 

I grew tired of relying on someone else's tool, and I knew it shouldn't be toooo hard to make a web page to show the time and weather, right? I mean, I messed around with web pages back when there was a Netscape editor for them, and Front Page was destroying everything that you opened up to edit, so you ended up editing things with a text editor and holding your breath that FP wasn't going to destroy your pages. It was sorta ok if you only used it.  It's such garbage, that there is even a tool to remove it's bloat. BLECH!

So far this little HTML page that I created seems to work. The Weather Widget gets it's info from DarkSky.  But if you want to use another widget you can.  So even if this one breaks or whatever, there's more weather widgets out there to fiddle with I suppose.   In any case, this mostly your own code to fiddle with as you see fit.  If you come up with some snazzy new things to do to it, or have better code, please share.  I in no way see myself as some well informed web page developer, rather I've got limited knowledge to get me just this far.  I'm just fair  enough to fiddle with some things here and there and get them to work.

In any case, I've got the orginal code for this saved on the TryIt editor.  I have saved it here:  I have also saved it to my Google Drive here.

If you DL the HTML code, just save it on your PC  \home\weather_clock\clock.html or someplace like that.  You'll need to go to to get the code for your area and replace my widget code with your favorite Text Editor. This code should work with anyone's PC and any modern browser.

There's still a few things that I'm not exactly "happy" with this. As of the moment, I have to ZOOM in the page to 200 - 250%  to get it to fill the page up the way I want to.  I'm sure there's a way to fix this, but it's not really a huge problem, but I'm not exactly sure how to address it at this time. 

I Have also made some changes to the mentioned code so that I can have a nicer background, but  again, I have to ZOOM in and the background image also zooms.  Not sure that I really like that.

I'm sure some of this code could be cleaned up, but hey, not bad for amature. IMHO.  


Sunday, June 03, 2018

Where are 'vino-preferences'?

So, earlier today, I'm having an issue with Ubuntu MATE 18.04  after I installed Vino.  In the past I've been able to just use vino-preferences from within the command line, and the little configuration window pops up and allows me to set it up so that I can remote into a machine without having to have someone at the other end "OK" the log in.

I tried to install the gnome-control-center so that could get the preferences to pop up. As VINO did install, and I did successfully get it to run at startup.  I just needed to tweak it a little bit to get it set up the way that I needed, and as far as I was concerned I could uninstall the gnome control center if it got in the way.

So, I come across the dconf-editor, in fact, I'm sure that I've used it in the past 4-5 years, but I totally forgot about it. (Slap on the forehead) It would seem that some of the Raspberry Pi users have had this same kind of issue.   Simple fix once you figure it out. This little fix doesn't allow for you to change the password for the remote user (I didn't look to see if there was a fix for that) as I was planning on using the default password.

sudo apt-get install vino dconf-editor 
confirm with y
This opens a window on your laptop with dconf-editor
go to:
org ==> gnome ==> desktop ==>remote-access
uncheck prompt-enabled
uncheck require-encryption

You can also access it via the MATE menu later, if you need to tweak something else.


Sunday, November 09, 2014

For the Love of Goo, The World of Goo.

As many of you may know, I've been helping out Ken Starks with his passion of a project called Reglue.  I've been honored to be able to contribute to that project with the Respining of Linux Mint, and Kubuntu for his needs.  Reglue's been given the rights to take the World of Goo and put it into their desktop distro for the computers that are going out to the Reglue Kids. But somewhere along the line, (Ubuntu 12.10?) the game would install, but nothing happened when you'd go to run it.

** Crickets. ** 
Segmentation Fault 

Computers screens went black, and there was a massive gnashing of teeth.

One person, Alan, whet so far as to creating a great script (something that I wouldn't have been able to do as well has he did). He did a fantastic job.

MOM4Evr posts a how to fix it here (I'm sure there are others, but hers came up in my first search)

download these 3 files:

and replace those in

gksu nautilus /opt/WorldOfGoo/libs64/
gksu nautilus /opt/WorldOfGoo/libs32/

But what if there was simply an easier way to fix the .deb file, and not have to look for these files, or install them via a long script?  And why hasn't 2DBoy posted this fixed deb file, as it seems so simple to me? I don't have the answer for 2DBoy, but I did figure out the .deb file fix, and would have loved to have just posted the fixed deb file, but it IS a commercial game, so I don't have the liberty to post a link to the fixed file, but I will tell you how to fix it, so you can easily install it on your computer, and it'll be ready to go or whenever you re-install or upgrade your .deb based desktop distro you can just install this and go about other business. 

How to fix the .deb file. 
First you've got to "open it up".  I did this in my home folder. 

mkdir -p extract/DEBIAN
dpkg-deb -x WorldOfGooSetup.1.41.deb extract/
dpkg-deb -e WorldOfGooSetup.1.41.deb extract/DEBIAN  

**[...Copy the three Libs files...]**
Copy those three (Or 6 Library files, if you're going to do all of them) into their proper place in the .deb file that you just extracted.  And then you're done.
Such as  "/home/randy/extract/opt/WorldOfGoo/libs64"
Create your new .deb file. 

mkdir build
dpkg-deb -b extract/ build/

You should have a worldofgoo_1.41_all.deb file in your /home/randy/build folder. 

Now, install it like you would any other .deb file, and you're good to go. 

And before you go, I'd like to mention, that Ken IS currently hosting an indiegogo campaign, Deleting The Digital Divide One Computer at a Time. And even if you find this post AFTER his campaign, your donations would be STILL be MOST WELCOME

Tuesday, January 14, 2014

Droopy = Simple Home Web Server

So, just recently a friend of mine wanted me to check out how Droopy worked.  He had a busy day, and besides checking out this utility should take two people, or someone that has two ways to access the internet. I'm just doing a little update on what I found, and to answer some questions about how it's setup and used.  The page where I downloaded it from had enough information that even I could extrapolate how to get it setup and used.  This post is mainly to answer some of the questions that the setup page might have left unanswered.

I supposed that I ought to mention, that I am doing this on a Linux Mint 13 (LTS) MATE PC. I'm not sure if that will make a difference, but there is a possibility that if you're using something else, your experience will differ. Certainly your file manager might not be Caja, but most of the file managers allow you to do the same things.

As stated on the setup page, you can download (this opens in a new browser window) this is the text file that IS droopy. Just right click and save the file as droopy. I opened up Caja as root, as I knew I was going to need root access to change the file permissions, and to make it executable. I copied the droopy file to the /bin dir, and changed the permissions, and checked the box to make it executable. I did made the mistake of giving the file a .py extension, but it doesn't seem to need that.

You might also want to use an avatar.png file like the ones below, as the setup page suggests. It's up to you of course.


At this point you should be able to run droopy. I also created a /uploads folder off of my home folder. Open your terminal, and run the droopy command in your uploads dir like so:

$ droopy -m "Hey, it's randy. You can send me a file." -p ~/avatar.png

I was able to click on the http://localhost:8000 in my terminal, to bring up the web page as others should see it, and there's a handy bar at the top of the page that you can click on to get your web page address. That's the address that you want to share with others to get to your computer.

Mind you, you have to make sure that your router allows this. For this, you'll have to know your router's settings and how to allow others past your firewall.  If it's just going to be a one time deal, I suppose one could take the risk, and pull their whole firewall down, but I'd not recommend it.

If all goes well, and you don't have a friend to try this out on, you can always do what I did, and test it out with your phone.  :)

In any case, I had some fun testing this out, and learning a few things.  I hope this can be of some use to someone, and leave a comment if you're so inclined, or a note to me over on G+


Thursday, August 22, 2013

Don't become unglued, become part of Reglue.

[Edited and Updated to Reflect Changes in the main .iso file]

I'm honored to be able to freely contribute to the Reglue project.
(Humble bow) 
For What it's worth, the official OS of Reglue is SolusOS.

I've done up a re-spun Linux Mint 13 Cinnamon LTS DVD .iso file for the Reglue project. What this rather large .iso file has in it is a few extra educational packages vs the Stock Mint LTS DVD.  Oh, and I did take the liberty of putting a different desktop background on it that I fiddled into existence with the help of the GIMP. 

If you want something smaller for that old PC that doesn't do USB Boots or only has a CD Rom, I also created a smaller CD sized .iso of Mint 13 that you can get here. I Know I Removed:

LibreOffice-core, Tomboy Notes, Mono-Common, Java-Common, Braseo, Thunderbird, Banshee, and the GIMP. (On an offhand note, if you're looking for a 'buntu distro that fits on CD, you might want to take a look at Peppermint.) I highly suggest that you re-install the Java-Common packages, after install, even if you're not a LibreOffice user.

On Both of my re-spin Disks the user name is mint with a blank password.

Username: mint 

You'll get the Gnome Classic Desktop by default. And, you'll have to use the terminal to exit the the Gnome Fallback mode, as it doesn't have a log off button ANYWHERE by default. Why that is, is beyond me, but it seem to be a horrible oversight. Horrible.
But you can exit the session with the command line [ gnome-session-quit ] to get to the login screen. 

You can choose a different desktop session from the log on screen, so if you don't get Cinnamon by default, try logging on with Cinnamon enabled. After all that was the point of this adventure, was for me to respin Mint 13 LTS with more packages installed by default, so that Ken / wouldn't have to install them on their project. 

If you plan on installing the larger disk .iso in a VM keep in mind that you'll have to adjust the default disk size from 8 gig to at least 9.

Some of the packages installed are

Google Chrome
Tux Math
Tux typing
Play On Linux
Wine Tricks
Edubuntu  for Grade schooler

And a few more, I didn't keep track of all of them. :/   One note of caution, due to having enabled the backports is that upgrading might seem a bit convoluted, once installed, run mintupdate, twice. If you make the mistake that I did, I logged back on with the Gnome Classic desktop and found myself with nothing more than the Computer Icon, and Home folder Icon. Luckily the right click on the desktop brought up the terminal in Nemo, so I could log off. Then log in with the Cinnamon Desktop. You might also want to make sure that you've upgraded the 

I did find that many of the file associations were not quite right either. Not sure if there was a way to fix that readily from Mintconstuctor, but it would be a good thing to fix. The Good and Bad of the new desktop is that I found that my Wallpapers weren't there by default any longer. They're easy enough to add, but it's still a sniggly pain. There are more wallpapers in the \root\reglue folder. A Ctrl-Right Click will allow you to add them at one time. Not sure if updating or DL the Theme's packages again would fix that issue for the default wallpapers. I think it might. One of the new features in the wallpaper options is to be able to chose a gradient background of two colors. I included two transparent backgrounds in the \reglue-extra folder along with some others so one could take advantage of that.  I can only get the desktop to resize properly in Gnome Classic mode, so here's a screenshot of that.

You can grab the larger Reglue LTS CinaNemo.iso here.

Enjoy! Comments here or on G+ are welcome. 

Raspberry Pi Zero setup for Motion Eye

First off, I'd like to say thanks to  Calin Crisan for his work on Motion eye. He's posted a few how to's on his Github page...