Raspberry Pi: Adding a PIXEL Desktop Launcher

The Raspberry Pi’s Raspbian PIXEL Desktop UI (not to be confused with the Google Pixel phone) descends from LXDE, with all the advantages & disadvantages that entails. One nuisance seems to be the inability to create a launcher for a non-standard program.

The stock task bar (or whatever it’s called) has a few useful launchers and you can add a launcher for a program installed through the usual Add/Remove Software function, as shown by the VLC icon:

LXDE launcher icons
LXDE launcher icons

Adding a bCNC launcher requires a bit of legerdemain, because it’s not found in the RPi repositories. Instead, install bCNC according to its directions:

… install various pre-requisites as needed …
pip2 install --upgrade git+https://github.com/vlachoudis/bCNC 

Which is also how you upgrade to the latest & greatest version, as needed.

You then launch bCNC from inside a terminal:

python2 -m bCNC

The installation includes all the bits & pieces required to create a launcher; they’re just not in the right places.

So put them there:

sudo cp ./.local/lib/python2.7/site-packages/bCNC/bCNC.png /usr/share/icons/
sudo cp .local/lib/python2.7/site-packages/bCNC/bCNC.desktop /usr/share/applications/bCNC.desktop

The bCNC.desktop file looks like this:

[Desktop Entry]
Comment=bCNC Controller

Set Terminal=false if you don’t want a separate terminal window and don’t care about any of the messages bCNC writes to the console during its execution. However, those messages may provide the only hint about happened as bCNC falls off the rails.

With all that in place, it turns out LXDE creates a user-specific panel configuration file only when you change the default system panel configuration. Add a VLC launcher to create the local ~/.config/lxpanel/LXDE-pi/panels/panel file.

With that ball rolled, then add the bCNC launcher:

nano .config/lxpanel/LXDE-pi/panels/panel
… add this stanza …
Plugin {
  Config {
    Button {

Log out, log back in again, and the bCNC icon should appear:

LXDE launcher icons - additions
LXDE launcher icons – additions

Click it and away you go:

bCNC - Running from LXDE Launcher
bCNC – Running from LXDE Launcher

At least you (and I) will start closer to the goal when something else changes …

Drag Knife Cuttery: Entry & Exit Moves

The first pass at cutting laminated decks for the Homage Tektronix Circuit Computer left little uncut snippets at the starting point of the cut. The point of the drag knife blade trundles along behind the cutting edge and, when the ending point equals the starting point, leaves an un-cut sliver as it’s retracted vertically:

Drag Knife - LM12UU - knife blade detail
Drag Knife – LM12UU – knife blade detail

The knife blade isn’t aligned in any particular direction, so it can leave a nick on either side as it enters the deck vertically at the start of the cut.

Gradually entering the deck along the cut line gives the blade enough time to swivel around to the proper alignment before it gets down to serious cutting. Continuing the final cut past the starting point then allows the blade to recut anything remaining from the entry move.

The middle and top decks have windows exposing the scales:

Tek CC - radial text example
Tek CC – radial text example

The paths are basically two arcs connected by semicircular cuts, but with ramps on each end recutting the entry and exit paths:

Top Deck - Window Cut Path
Top Deck – Window Cut Path

The entry path in the upper left slants downward from the TravelZ level of 1.5 (-ish) mm to Z=0, with the nose of the blade holder flush against the surface and the blade sunk to its full length. The vertical path to Z=-2 (-ish) increases the cutting pressure from roughly the preload value to preload + 2*(spring rate), so the blade won’t ride up under the cutting forces.

The path then goes completely around the window at Z=-2, then ramps up to the TravelZ level again.

All of which produces a neat cutout that sticks to the Cricut mat when I peel the rest of the deck off:

Tek CC - MPCNC drag knife
Tek CC – MPCNC drag knife

That’s a middle deck before I started laminating them, but you get the general idea.

The GCMC code (extracted from the complete lump) looks like this:

  local WindowArc = 54deg;

  local ac = -17 * ScaleArc + ScaleRT/2;   // center of window arc
  local r0 = DeckRad - ScaleHeight;        // outer
  local r1 = DeckRad - 2 * ScaleHeight;    // inner

  local aw = WindowArc - to_deg(atan(ScaleHeight,(r0 + r1)/2));    // window arc minus endcaps

  p0 = r0 * [cos(ac + aw/2),sin(ac + aw/2),-];
  p1 = r0 * [cos(ac - aw/2),sin(ac - aw/2),-];
  local p2 = r1 * [cos(ac - aw/2),sin(ac - aw/2),-];
  local p3 = r1 * [cos(ac + aw/2),sin(ac + aw/2),-];

  arc_cw(p0 +| [-,-,0],ScaleHeight/2);    // blade enters surface
  move([-,-,KnifeZ]);                     // apply pressure

  arc_cw(p1,r0);                          // smallest arc
  arc_cw(p2,ScaleHeight/2);               // half a circle

  arc_cw(p1 +| [-,-,TravelZ],r0);         // exit from cut


Having measured the angular position of the window and its size on the original Tek CC, I compute the coordinates of the four points where the semicircular “end caps” meet the longer arcs, then connect the dots with arc_xx() functions to generate the G-Code commands. As always, using the proper radius signs requires trial & error.

While I was at it, I added entry & exit moves for the deck’s central pivot hole and outer perimeter.

I’m pretty sure the right CAM package would take care of that, but GCMC operates well below the CAM level.

Bird Feeder Icing

After a day of snow + sleet + ice, followed by overnight cooling, the bird feeder looked like this:

2019-12-19 - Ice on bird feeder - Day 0
2019-12-19 – Ice on bird feeder – Day 0

The ice generally doesn’t bond across the top, so the sheets slide off separately to the front and back. This time, they stayed together and began sliding off to the side.

The next two days were unusually cold and the glacier stopped sliding:

2019-12-21 - Ice on bird feeder - Day 2
2019-12-21 – Ice on bird feeder – Day 2

The temperature warmed enough during the day to let the glacier resume sliding, whereupon it fell and shattered on the patio.

No birds or squirrels were injured during this incident.

Beware the Unit of Measure

While looking for something else, I stumbled across this Amazon offer (clicky for more dots):

Hammermill Truckload Paper
Hammermill Truckload Paper

Yeah, a trailer load a’ paper. Word.

Long ago, in a universe far away, my buddy Mark One mis-read a unit of measure and ended up with a trailer load a’ Tektronix Thermal Paper. It carried a silver-based emulsion requiring constant refrigeration, so he stashed about a pallet of paper canisters under every raised floor on the IBM Poughkeepsie campus. Even though the raised floor acreage has dropped dramatically, some of it may be there to this very day.

Homage Tektronix Circuit Computer: Paper Matters

To judge from the dislodged pigment grains, the original Tektronix Circuit Computer probably used then-new laser printing on good-quality paper, laminated between plastic sheets:

Tek CC - OEM
Tek CC – OEM

A Pilot Precise V5RT cartridge on plain paper (20 lb 98 white), also laminated, looks pretty good:

Tek CC - V5RT green - 20 lb plain paper
Tek CC – V5RT green – 20 lb plain paper

But a black V5RT pen on HP Glossy Presentation Paper (44 lb, 160 g/m²), also laminated, is spectacular:

Tek CC - V5RT black - glossy presentation paper
Tek CC – V5RT black – glossy presentation paper

The glossy Presentation paper is hard enough to keep the pen ball from sinking in, producing much finer lines. In round numbers:

  • 0.2 mm – Tek laser-printed (?) original
  • 0.3 mm – green V5RT on plain paper
  • 0.2 mm – black V5RT on glossy Presentation paper

The CNC 3018XL plotted / drew everything at 2400 mm/min = 40 mm/s, with minimal wobbulation in the lines and none worth mentioning in the characters.

The pen ball sometimes pulls a dot of ink off the glossy paper as it rises at the end of a stroke; perhaps matte paper would produce more traction on the ink.

You can see small blobs at the end of some strokes, but the fancy paper prevents most of the bleeding visible in the previous tests. Pilot V5 pens definitely dislike card stock.

The results looks great in person without magnification, so maybe none of that matters.

The pix come from the Pixel 3a camera in its microscope adapter.

Kenmore 158 Sewing Machine: Glare Reduction

The additional LEDs around the needle on (one of) Mary’s Kenmore Model 158 sewing machines provide plenty of light for normal sewing, but produced too much glare on the polished steel “hand hole cover plate” (their nomenclature) for small-scale work. A matte surface seemed in order, which came from some translucent mailing labels left over from our Christmas card effort:

Kenmore 158 - non-glare cover plate
Kenmore 158 – non-glare cover plate

Mailing labels probably aren’t a permanent solution, but they certainly solved the problem without delay. We’re loathe to etch the steel, as increasing the surface roughness definitely isn’t what you want, nor blacken it, for obvious reasons.

Too much light is definitely better than too little, though.

Merry Christmas

Moonrise, as seen through the pines in our yard:

Pixel 3a Night Vision - moonrise
Pixel 3a Night Vision – moonrise

The Pixel 3a produces exceedingly useful low-light images, mostly by having Google’s software compensate for its tiny lens and minimal light-capture area, with the downside of turning a peaceful night scene into harsh daylight.

Take the rest of the day off, OK?