Restoring Unity

I had a bit of a problem after a common pursuit into the perfect desktop environment for one of my computers.  I have an all-in-one system running Ubuntu 16.04 in my home which I use for my vinyl cutting.  I broke a universal rule.  That rule is never experiment with the revenue-generating computer.  I was on a mission to find a lightweight desktop to replace Unity. 

My primary requirement for the vinyl cutter is a copy of Inkscape and a python extension called Inkcut.  This works fine in Unity, but I was noticing some lag as the complexity of the designs increases. 

First off, I was not going to reload the machine.  My distro-hopping days are pretty much over now that some actual uses for computers have come into my life.  I proceeded to run apt install ubuntu-mate-desktop  and give MATE a try as a replacement for Unity. If things didn’t workout, I would just run apt remove ubuntu-mate-desktop and be back to normal.

MATE was really nice.  My drive is encrypted with LUKS.  When I rebooted for the first time my reaction was “Oh, isn’t that clever.  They replaced the decryption screen with a MATE logo.”  I went back to work for a few months in Inkscape and thought nothing of it. 

Things were going very well free from Unity, but I was still feeding memory to Gnome 2.0 instead of Inkscape.  While not in any way faulting MATE, I changed my mind and decided to add a time-honored favorite.

apt install fluxbox

Now the fun began.  apt remove ubuntu-mate-desktop does not remove that clever encryption screen along with a few other dependencies.  Every time I rebooted, that clever screen was there.  It was completely functional, but coupled with the fact I was using fluxbox’s user login screen, the whole system looked like a Frankendistro.  Fluxbox was removed easily with a quick apt remove, but that clever screen! I wanted to go back to stock Ubuntu and began digging on Google for a fix in my free time, probably about an hour a week.  I refused to reinstall over something this trivial.

After a lot of dead-ends and some mention that it’s not even worth it because you can wreck your ability to dencrypt the drive, tonight was finally the night.  I found the solution by combining multiple instructions and some commands which had helped in the past.


The main clue: dpkg records everything it installs and removes in /var/log/dpkg.log

https://ubuntuforums.org/showthread.php?t=2241220&highlight=LUKS+ubuntu-mate-desktop+screen
THIS WAS THE FIRST MESSAGE THAT CLUED ME IN.

These logs are compressed in gzip files overtime, so if you fix this in slow motion like I did, you may need to extract multiple files to get all the records.  grep is your friend afterwards.

grep -iw -e “installed mate” /var/log/dpkg.log*

Then, I came to my senses and simplified the process:

sudo dpkg –get-selections | grep mate

Two packages caught my full attention:

plymouth-theme-ubuntu-mate-logo install
plymouth-theme-ubuntu-mate-text install

Some final actions:

apt remove plymouth-theme-ubuntu-mate-logo plymouth-theme-ubuntu-mate-text

I rebooted at this point and saw plymouth screens with generic text.

Let’s make it pretty again with some old knowledge from Debian:

sudo dpkg-reconfigure plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text

This command is a little scary.  It triggered an update to initramfs, but I noticed something in the output:

“update-alternatives: warning: alternative /usr/share/plymouth/themes/ubuntu-mate-logo/ubuntu-mate-logo-scale-2.plymouth (part of link group default.plymouth) doesn’t exist; removing from list of alternatives
update-alternatives: warning: alternative /usr/share/plymouth/themes/ubuntu-mate-logo/ubuntu-mate-logo.plymouth (part of link group default.plymouth) doesn’t exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/default.plymouth is dangling; it will be updated with best choice
update-alternatives: using /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth to provide /usr/share/plymouth/themes/default.plymouth (default.plymouth) in auto mode”

After a second reboot, I was successful.  Unity has been restored.  If only dpkg-reconfigure worked on people!




Remodeling the Home Network

I’ve been spending my evenings upgrading and improving my home network lately.  It’s not quite at a point where I can design robotic superhero suits in the garage or anything, but things are looking up.  There has been a lot of moving services around to position them properly. 

I have moved my DHCP and DNS out of the LXD containers they were once in to run on a box of their own. “Why do you even need your own DHCP and DNS?”  you may ask.  It’s pretty simple actually.  These two services are the meat and potatoes of TCP/IP networking. One controls whether you can join the network easily.  The other controls what your device is called on my network. 

I noticed about a year ago my systems were being named xxxxx.<insert-nameof-ISP>.net while using the DHCP and DNS in my router.  I own the modem I use for service, but loocking through the logs, it was somehow obtaining an IP inside my network and giving out domain suffixes to hosts.  While everything worked in the sense that everyone could get on the Internet as they pleased, it triggered my “stay off my land” instincts having dealt with demarcation so long in the past dealing with telcos. 

When I first learned about LXD, I got a little container happy and proceeded to run about 21 servers out of one machine.  I was tying up all 16GB of RAM in the server and the whole network was slowing down.  I had Gitlab, Icecast with radio stations for all the major holidays and 4 decades of music, 2 WordPress instances, a personal Python Project, Planet, DNS, and DHCP containers.  Things got carried away.    

Then the routing table somehow became corrupted on the server and I could only ssh into the containers. not the server.  I could fix it for a while by manually rebuilding the route tables, but it would ultimately end up in a failed state again when arp rebuilt the tables.  Something was telling me it was time to ease up on the containers.

After over a month of messing with it, I made the choice that functionality was ultimately more important than the satisfaction of fixing the problem.  I tarred all the containers and put a fresh copy of Ubuntu Server 18.04.1 on it.    I’m still debating which containers are important and which should remain on backup. 

It’s going to be much easier to stay disciplined now rather than after I put everything back.  Sandboxes are good, but you shouldn’t fill your yard or your server with them.  I have reinstalled LXD, but it’s not going to be the only thing I focus on.

Weekend Projects

It was a very productive weekend, thanks mainly to finally spending some time with my home network.  I’ve been wanting to shore in my DNS lookups for a while now with Bind and also cut back on the repetitive typing of “192.168…”.  I have honestly had all this setup before, with DNS, a Network Management System (openNMS if I remember correctly), and even my own mail server.  The problems occurred when I continued to add more and more to these three hand-me-down desktops.  I would get something running smoothly, then add another server to the same OS (and break everything I had already built in the process).  I eventually got tired of having 3 extra computers running and heating up the place and scrapped them all after erasing the drives.

I’ve been reading everything I can about LXC (Linux Containers) for about a month now and decided it was time to bring some of the magic back to home networking.  To crudely explain what LXC is, imagine creating servers inside another server that the operating system thinks is real.  As an example, you can put an installation of debian or centOS inside a computer running Ubuntu.  The word “container” refers to the concept of putting a “box” around the OS.  You can copy containers, log into them and make changes, spawn two or three copies of the same installation and create backups.  Essentially, it is turning the entire OS into a file and doing wonderful things, all without damaging the other containers.

I already have some further experimentation in the works.  This is going to be a life changer for me.

 

 

It’s alive again!

I spent some time this past weekend getting our information screen (or whatever you want to call it) up and running in the kitchen again.  It is kind of a piecemeal concept which developed from all the products swirling around the market (digital picture frames, weather stations, mall kiosks, etc.)

Digital picture frames were all the rage a few years ago,  Basically, you dump photos on a memory card and a small chip scrolls through them like a slideshow on a computer.  This is where the gears started turning. I wondered why it just had to be pictures.

Driving on Interstate 65 on family roadtrips, I remembered seeing weather maps detailing the radar images along the highways whenever we stopped at rest areas  Let’s throw that in.  “What about calendars?”  Let’s setup a web calendar for our family stuff.    How about situations where we need to call someone?  Let’s add 911 and everyone’s cell phones so we can keep in touch no matter whether our cell phones are working or not.

I began with simple tests.  I grabbed an old LCD monitor in the garage and threw a Raspberry Pi Model B on the back with double-sided tape.  I decided it would be much more advanced if I made a fullscreen web browser handle the content.  Iceweasel and a tab switching plugin would serve as the proof of concept.  Browsers can load everything and it will be simple enough to keep things going.  This ended up being unmanageable further down the road, but for now everything worked.

I remember sitting in La Finca (The Fajitas Diabla will change your life!) with my wife and seeing this tower with a sideways TV on it, displaying adds for local business.  Kind of cool, but it would be like leaving a yellow pages in the area where people wait for a table.  Everyone is on their phones anyway.  Just felt a little misplaced.

The local mall near home has these almost “Jumbotron” looking screens near the ceilings which supposedly get you in a shopping mood along with “advertising pillars” as I like to call them, essentially a  16:9 screen standing sideways on the columns that used to have the mall directory on them.

This stuff was starting to pop in the market.  It was a natural progression.  I was reading websites about concepts like the content changing if your phone got near one of these kiosks, giving you a chance to call the business by sending contact info, and all other kinds of exploitive uses.  They could even access the cloud!  I started calling them “Telescreens”, a reference to Orwell’s 1984.

Back to my project.  There was a marketing concept called hyper-local developing in the technology industry around 2010.  I began to adopt and adapt this to my own thinking about the concept.  “Can the needs of a computer user become so hyper-local they can no longer be fulfilled by a mass-market product?”    “What if this is just for me?”  It’s kind of an evil genius mentality, I know.  Then you go back and watch Ironman.  Tony Stark didn’t create J.A.R.V.I.S. for everyone.  It was a tool he designed solely to serve his purposes.

I went through a complete redesign on the tools I was using.  The browser made it simple for others, not me.  I hammered together some Python scripts to handle updates.  I threw out the concept of everything being HTML and designed some scripts to turn everything into a picture.  Eye of Gnome, a slideshow program that does only what I need it to do replaced Iceweasel.

It died due to a bad memory card a few months ago.  My wife approached me a asked why the screen wasn’t giving her the weather report and the calendar wasn’t up to date.  It’s amazing how useful things are when you don’t even realize it.

In summary, I have simplified the process to the point where it just works and I will continue that way until I get this thing functioning at the core.  It will more than likely remain an internal family project for years to come, but it will remain useful without the intention of world domination.

Culture

How do you define culture?

If I look it up on Wikipedia, I am told it was a concept first introduced by Cicero and given two options:

 

  1. the evolved human capacity to classify and represent experiences with symbols, and to act imaginatively and creatively; and
  2. the distinct ways that people living differently classified and represented their experiences, and acted creatively.

I like definition one  better.  It uses the term “evolved”.  There is room for growth when you choose this word.   Definition two has too much finality to it.

If you take this to heart, travel introduces you to new, creative, and imaginative acts.  This is how I define culture.

Too many people go through life with the impression that they are complete, yet there is so much more to learn.  If you don’t learn something new everyday, you aren’t finished.  You haven’t figured it all out.  You are stuck.