RasberryPi Info Center

Rpi3_boardI have a RaspberryPi that is doing absolutely nothing. I got it to dink around with it but it just hasn’t been all that useful to me. I much prefer the x86 platform for, pretty much everything. Not so recently, my church expressed a need for a slideshow like machine for things, events, announcements, pictures and the like. Since I have a Pi3 doing absolutely nothing this sounded like a great fit.

Project Requirements

  • Low or no maintenance device that just rotates through a selection of pictures and a given interval
  • Add and remove content from the directory without the slide show software either skipping or borking
  • Be able to FTP into the Pi to drop pictures onto it.

I downloaded Rasbpian and to play along with the written recommendations, I downloaded the image writer, Etcher.

The Etcher AppImage is built against 32 bit architecture so some additional software was required for openSUSE Tumbleweed on a 64 bit architecture

sudo zypper install libXtst6-32bit libXss1-32bit gconf2-32bit

To start out, I needed to make sure I could remotely access this Pi through Secure Shell. I checked the status of the service

systemctl status ssh

I’m going to pause here just to say, Systemd rocks. What a great service for controlling services on Linux via the terminal. It makes using the terminal on different distributions quite comfortable.

The service was “dead” so I started and enabled the ssh service

sudo systemctl start ssh
sudo systemctl enable ssh

After much searching about, I landed on feh as the application to play a slideshow.

sudo apt-get install feh

To test it out, I needed to transfer some pictures to the Pi. Using my favorite file manager, Dolphin.

File Transfer to RPi

After the files had transferred. Ran a test command to see if it worked

feh -Y -x -q -D 5 -B black -F -Z -r /home/pi/Pictures/

And it worked smashingly… except if I added pictures it wouldn’t automatically update the images displayed and eventually, after taking away too many pictures the application borked. Upon scanning through the man pages…

man feh

I discovered an option,

-R, --reload int

This would allow for reloading the directory at a specified interval, int, in seconds. I set it for 15 seconds and gave it another series of successful tests, adding and removing images remotely.

feh -Y -x -q -D 5 -B black -F -Z -R 15 -r /home/pi/Pictures/

An explanation of the options:

-Y : Hide the mouse pointer

-x : Create borderless window

-q : quite, don’t report non-fatal errors

-D : Delay between slides

-B : background for transparent images “black” is the value

-F : Fullscreen

-Z : Zoom pictures to screen size in full screen

-R : Reload the file list, after a period of time in seconds

-r : Recursively expand any directories in the path

It all behaved just as I had hoped it would, so much so that I had that natural dose of endorphins for this little success. It was good to see that the Pi was doing just what I needed it to do.

Add FTP Service

Since it is likely there will be a Windows machine accessing the Pi, I wanted to make adding and removing images is as simple as possible. The best solution, I find, is to set up an ftp server. I tried using sftp but that is not something the Windows file manager can do.

I decided that I would go with proftp as that is the one for which I am most familiar.

sudo apt-get install proftpd-basic

Checked the status of the server, post install

systemctl status proftpd

The service reported that it was running and active. Should that not be the case for you simply run this to start and enable the service:

sudo systemctl start ssh
sudo systemctl enable ssh

Since this is an internal ftp server on a RaspberryPi with no need for multiple users. The default “pi” user was adequate and I used those credentials for ftp access.

Autostart Slideshow on Boot

I didn’t want to have to have anyone fiddle with the Pi should it lose power. It just needs to work. A script was necessary.

Created the folder bin in the home directory, because, that is just where I like to stick my scripts.

mkdir ~/bin

Changed Directory into that folder

cd ~/bin

Created script with all the right bits in my slideshow

nano slideshow.sh

Copy and paste this into the nano editor

#!/bin/bash

feh -Y -x -q -D 8 -B black -F -Z -R 120 -r /home/pi/Pictures/

Save it: Ctrl+o, Enter

Exit nano: Ctrl+x

Next you have to make the script executable

chmod +x slideshow.sh

Now it is possible to run the command in terminal

Since I want this thing to basically just be an appliance where you plug it in and it just does its thing. I need to make this script run when the RaspberryPi starts up.

To do this, I will use my trusty nano editor to edit the desktop startup

nano ~/.config/lxsession/LXDE-pi/autostart

Scroll to the bottom of this script and add this to the very end:

@/home/pi/bin/slideshow.sh

Save and Exit

Reboot the machine to test.

sudo systemctl reboot

Success.

Disable Screen Blanking

As I was testing the slide show program, I discovered that the screen blanks out after a period of time. That is an unacceptable state for this device. Sure, it makes it energy star compliant but it makes it real hard for people to see information from it. The fix is easy, though, it would have been easier if it was a point and click option in Raspbian.

Back in the terminal:

sudo nano /etc/lightdm/lightdm.conf

Look for the heading

[Seat:*]

At the end of that rather large block of “options” add this line:

xserver-command=X -s 0 -dpms

Reboot the machine and test to see if it performs as expected. For me, this worked exactly as expected and I now call the project complete

Syncthing Addition

In order to keep things a bit simpler for the interested parties. I added Syncthing to the RaspberryPi. Just Syncthing, not the GTK GUI. The problem with the setup was that the browser would open up and cover up the slideshow, which, do an average observer could look like an error. The solution, was another autostart modification:

nano ~/.config/lxsession/LXDE-pi/autostart

I added this line:

@/usr/bin/syncthing/binary -no-browser

Now, should the RaspberryPi be rebooted, the Syncthing WebGUI will not sit in front of feh.

Final Thoughts

I am very glad the Internet exists with so many others describing how they solved their problems. I feel like I cheated because I was able to pick different solutions and mash them up to satisfy my requirements for a properly fitting and robust solution.

RPi3_slideshow

With rebooting the machine, I am rather impressed by how quickly the system goes from off to playing the slide show. A testiment to the work of the RaspberryPi folks hard work.

This was my first RaspberryPi experience and after completing the project, I am mostly happy with the whole process but ultimately, I think I would have preferred setting this all up on an x86 based machine. There were numerous little unique Pi niggles that I found annoying that kind of reminded me of noodling around in Linux circa 2005. At the same time, it was kind of a nice throwback to the last decade in working through a myriad of challenges to have a properly working computer.

For the technical adventurous, I highly recommend playing around with Raspberry Pi devices. It is certainly a great little hobby machine to perform special tasks. At the end of this project, I can think of several other things that I would like to do with a Raspberry Pi or similar device to solve other problems that come to mind.

References

Instructables Easy Raspberry Pi Screensaver Slideshow

Raspbian Download

Etcher

feh – Linux man page

How to Disable the Blank Screen on Raspberry Pi (Raspbian)

ProFTP.org

Upgrade Reliability of openSUSE Tumbleweed

AspireOne_TumbleweedFor fun… or maybe negligence… I hadn’t updated one of my openSUSE Tumbleweed netbooks. As a rolling distribution of Linux, it is generally considered in bad form to not keep it updated as it will likely break the installation. Not so with Tumbleweed.

The System

Acer Aspire One D255E Netbook

  • Intel Atom CPU N455 @ 1.66GHz
  • 2 GB DDR3 Memory
  • 250 GB HDD
  • Intel GPU with 1024×600 screen resolution
  • Runs openSUSE Tumbleweed with KDE Plasma
  • Last updated 02 May 2018,
  • Kernel 4.16.7
  • KDE Plasma 5.12.4
  • KDE Framework Version 5.45.0
  • QT Version 5.10.0

sudo zypper dup

After updating the repositories and some churning a couple repository switches for two packages, there were a total of 2902 packages to be downloaded and installed. This included:

  • Kernel 4.18.0
  • KDE Plasma version 5.13.4
  • KDE Frameworks Version: 5.48.0
  • Qt Version 5.11.1

After about two hours of that little netbook cranking away, downloading and installing, the upgrade was complete. The machine rebooted without a single incident. Not a bit of strange behavior or fiddling required to use the computer. It just worked.

I was curious to know, how many snapshots were released since the last update. According to this page,  there were 54 snapshots released by the Tumbleweed team. That means there were enough changes to spin up a new ISO of Tumbleweed 54 times!

How does it run?

Upon the system settling, I wanted to check the memory usage. A total of 489 MiB was being used by the system. Since Firefox and Chrome tend to be a bit heavy to use, I installed Falkon Web Browser and started to dink around a little bit. The machine is obviously a bit slow but runs well enough to be useful. Monitoring CPU usage, there were few spikes or periods of the CPU maxing out. I am impressed by how few resources that are actually being used.

As far as how performant this machine is? It’s not. Not at all nor do I expect it to be. I don’t know that this machine is any slower than when it originally Ran Windows 7 Starter but comparatively to other systems, it can be just a bit painful to use outside of casual web browsing but it does play Tux Racer quite well.

Final Thoughts

I am impressed by how well openSUSE Tumbleweed can tolerate not being updated for an extended period of time. Two major kernel revisions, Qt version jump, and a KDE Plasma version jump and not a single things is broken even after missing 54 snapshots. Truly a testament to the hard work of all those involved in building and maintaining openSUSE Tumbleweed.

As far as the hardware goes. I really like the size of this netbook; the keyboard is almost full size and it is preferred over a tablet for most purposes and it stands up on its own without any special case. The battery life is still good after 8 years of use and although it feels a BIT flimsy, the build quality is as such that it has survived more than one drop without any catastrophic damage. When this finally goes, I would strongly consider another of the same form factor and build quality.

As with anything, your mileage may vary. Not everyone has the same successes and failures in their cases. I have pretty ordinary hardware so I seem to have constant success with openSUSE Tumbleweed as a very stable and robust platform to run on my machines.

References

Tumbleweed Changes and ISOs

Acer Aspire One D255E Netbook

Falkon One-Click Install for openSUSE

Web Browsing With w3m

w3m-09Sometimes it is just fun to hang out in the terminal and not use all this fancy graphical interface nonsense with annoying advertising, video, GIFs and popups. Since I didn’t “grow up” with this software, I needed to teach myself how to use it. The manual is very complete on w3m but there is much more there than what I need. So, here is my internal notebook on w3m turned public.

I use Konsole as my terminal application of choice on openSUSE. It has been my favorite for years and the default of KDE Plasma. If you would like a more retro terminal browsing experience that takes you back to a more exciting time in computer history, you can install Cool-Retro-Term.

Install the Browser

sudo zypper install w3m

Optionally if you want inline pictures, which can be ropey at times:

sudo zypper install w3m-inline-image

Basic Usage

Since you have already installed this using the terminal, adding anything about “open a terminal first” is a waste of text on the screen.

To initiate the program you must enter a target site for w3m.

w3m cubiclenate.com

Or maybe something that is more useful:

w3m duckduckgo.com

 

The nice thing about this web browser is that it is very “tab-key friendly.” Press Tab or left-click, into the search area. To enter text, press Enter.

w3m-01.png

The cursor will go to the lower left hand corner of the terminal with a TEXT: prompt, enter your text and hit Enter.

It will return your cursor back to the search line. Press the Tab or Right-Arrow key to take you to [Search] and press Enter.

w3m-03

Congratulations, you have completed your first search on w3m.

w3m-04.png

Navigation

Searching is great, but you need to know how to actually navigate with w3m.

Arrow-Up / Arrow-Down

Jumps from hyperlink to hyperlink

Enter, Right-Arrow, Left-Double-Click

Select hyperlink

Left-Arrow, Ctrl-b

Back Page

Right-Click Menuw3m-06-crop.png

If you are using w3m in a mouse enabled environment, as I would typically do, right-click anywhere on the screen and this handy little menu will pop up.

This is nice to have because you don’t have to remember the keystrokes. Although, the keystrokes are the whole reason I like using this browser. It give the mouse (or touchpad) a break.

More Nifty Web Browsing Commands

Reload Page

Ctrl-r

Open Link on New Tab

Ctrl-t

This will start another tab as you would expect from a modern browsers.

Switch Tab

Esc, t

Use up / down arrow keys to select the tab and press Enter

w3m-08.png

Close Tab

Esc, t

Shift+D

Open Page in External Browser

Shift+M

Your external browser preference can be adjusted to suit your needs, you can even add more browser options.

w3m-07.png

Final Thoughts

This is a handy browser that is incredibly light weight. It works very well in Konsole, although the images can sometimes bleed over onto the menu bar of the application.

I use this browser somewhat frequently, mostly on sites that have far too much Java code and hog memory resources. This browser displays the information that I want and tends to discard the undesirable cruft found on many sites. Also, if the site just won’t display well in w3m, it is a poorly made site.

If this browser works for you and you find this simple guide useful, great! If this isn’t something that works for you or you find this blathering a waste of your time it was barely 600 words so you aren’t out much time. I have been annoyed by some of the more feature rich browsers so w3m has been refreshing to use. Should this browser not meet your needs here are plenty of other web browser options out there that might do a better job. I primarily put this together for me anyway.

Further Reading

http://w3m.sourceforge.net/

w3m from openSUSE

Cool-Retro-Term

Business Card Holder Design

Designing and building is something of a hobby of mine that also happens to be a component of my profession. I like to flex my CAD muscle outside of the professional setting whenever possible so if someone tells me about a need for something and the design and 3D printing of it is within my bandwidth of available time, I like to help them out. Because… why not?

Demand Signal

A buddy of mine was telling me how he wanted to add a 2 inch by 2 inch card holder for a small sign to advertise his Tour Services. He kicked around an idea of what he wanted: to hold business cards on a placard but didn’t have an immediate solution in mind. So I offered to help out.

Design process

I took a card measured it and made the holder as such that it wouldn’t cover up any of the information on the card. I printed it off and evaluated how the cards fit on the initial design but wasn’t happy with it .

Card Holder Design Change
Initial Design on the left; revised design on the right

There was too much slop, side to side, so retaining the cards could get all catty wampus and potentially fall out. I determined that falling out was an unacceptable failure mode. A card holder must hold the card. I tightened up the space between the walls and the card by a few millimeters and it felt purposefully correct. The final design is available on Thingiverse for you to download and see if it can potentially fit one of your needs.

I initially designed this using PTC Creo but since I am making a point to do more design work on Linux, specifically openSUSE Linux, have since recreated it using FreeCAD with a little variation. Feel free to download the STEP or FreeCAD file and modify it to your heart’s content.

FreeCAD Card Holder

The only real difference between the two designs is that one has sides that are open and the other is solid. The solid sides do print better. I suppose could have added some other flair to it but seeing how this part is not the focus of the placard, why bother.

Final Thoughts

CAD is a fun problem solving tool, once you know how to use it. The fact that there is FreeCAD on Linux, which is a pretty decent tool opens up a whole world of problem solving for the masses. Having a resource like Thingiverse to share how you have solved problems makes these times we live in a lot of fun.

SWMI Brew Tour Placard

Resources

Thingiverse link

FreeCAD Project

FreeCAD from openSUSE

FreeCAD First Timer

SWMI Brew Tours

Samsung Galaxy S5 CAD Project

Helping Future Self with Network Control from the Terminal

I don’t have a regular need to interact the network there are times when I very much need to do so. My first exposure to controlling the network using the terminal was using ifconfig and I can’t seem to latch onto the “new” ip command in the same way I was able to with the previous. My problem is, I can’t ever seem to remember which resource it was that I liked best so, I’ve decide to make my own, very basic, resource. I have this with openSUSE as well as Raspian Linux. This is a gift to my future self for the next time I need to interact with the network.

Network Control from the Terminal

You’re welcome, Future Self.