Saturday, June 4, 2016

Replace Chrome App Launcher in Xubuntu Linux

So Google has announced that the Chrome App Launcher isn't cool enough, and it's being discontinued. Since I was one of the eight people who actually used it, I was a little annoyed by this, so I set out to replace it with a plain old launcher.

First, kick off Chrome, right-click on the bookmark bar, and tick "show apps shortcut." You need this.

Next, go ahead and delete the Chrome App Launcher from the usual panel.

Now right-click on your panel where all your other launchers are (yes, I came from the Mac world and my panel #1 at the bottom of my screen looks remarkably dock-like,) click panel, add new items, and select Launcher. Then click on Add.

Right-click your new launcher and select "properties."  Click the plus button to add new items to the launcher. Search for Chrome first, and add it. So long as Chrome remains the first item in the list, the icon will remain Chrome, and that's really what we want.

From your Chrome window, click the apps shortcut at the far left of your bookmarks bar. This will list all your apps.

Right-click on each chrome app and select create shortcut. You can put them in your applications menu if you want to, but the one that's most important is a desktop shortcut. Do all the apps you have.

Select all the google app shortcuts on your desktop and drag them to the Chrome launcher properties window. Then close the properties window. You can delete the shortcuts off your desktop, too.

That's all there is to it.  Now, if you click-and-hold the icon, or click on the little up-arrow beside it, you'll get the menu. Click on one of those, and Chrome will launch with your app running. If you just click on the icon itself, you get Chrome.

Now I just have to figure out how to make this happen in Raspbian, although at the speed Chromium for Raspbian is updated, I should have another decade before Chromium launcher goes away.

-JRS


Monday, April 4, 2016

Looking Glass and Irreconcilable Differences Dead Tree Editions

Looking Glass and Irreconcilable differences are, at last, on Createspace in dead tree editions. Yay! I'm back in the printed book business. :)

-JRS

Wednesday, March 16, 2016

Getting Minipro 866 working with Raspberry Pi

For some time, I've had a Minipro TL866CS eprom programmer that I got on Ebay. While it works very well, its software is windows only. I'd like to move it downstairs permanently where all the eproms and whatnot live. I'd also like to move my logic shrimp (a logic sump compatible open source logic sniffer) down there, as well as have a terminal and a browser and email and all that good stuff in my workshop.

The obvious answer would have been a PC. If I had a spare that worked. Since I don't, I turned to one of my stack of Raspberry Pis, in this case a model 2b, formerly my desktop Pi before the model 3s came out.

The upshot: my basement Pi now has minicom for terminal/rs232 stuff (I still need to test that with a USB rs232 dongle) OLS, the logic-sump compatible software I'm used to (which I also still need to test with the logic shrimp). I figured it would be a simple matter to download the minipro software from here: https://github.com/vdudouyt/minipro, compile, plug in the minipro and go.

Nothing worked. The minipro flashed its red LED continuously. It wasn't getting enough power. I'd stumbled over the solution to this before. Edit the Pi's /boot/config.txt file and add the lines:

# Increase max USB current
max_usb_current=1

to it. Now the Minipro's LED stayed on, but the minipro open source software still wouldn't talk to it.

lsusb showed the 866's USB ID, 04d8:e11c, properly, but listed it as a Microchip Technology device. Which tells us who made the USB chip. This was different from my x86-64 Linux machine's enumeration, which I suspected was why the software wouldn't see it. I'm not sure this step was necessary, but it didn't hurt anything. I coped /usr/share/misc/usb.ids file from my desktop linux machine to /usr/share/misc/usb.ids on the Pi. Now the 866 enumerated identically to how it did on my desktop PC. The software still didn't work.

My next attempt was installing the latest libusb-1.0.yadda. I'm fairly certain this step is unnecessary, but I downloaded libusb-1.0.20 from http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.20/ , built, and installed that. It worked fine, but the minipro software /still/ didn't work properly. So I dug into minipro's source.

The problem I was having turned out to be unrelated to USB (Or I'd solved all the USB problems already. It's hard to tell in retrospect.) the minipro software was built on an x86-64 system, where chars are all signed in C. On arm architectures like the Pi, chars are unsigned. In the parsing function of the minipro software, the author uses one variable, a char, to store the output of getopt() whether it's valid or -1, which getopt returns when it runs out of options. If you store -1 in an unsigned char, you get 255. It's not equal to -1, which the line tested for, so it tried to parse it. Finding no valid commands with that character value, the parser loop promptly decided I'd fed it garbage, gave me the instructions, and terminated the program.

Once I understood that, the fix was pretty simple. Edit main.c and change the char c into int8_t c. (Coding on Arduino has made me paranoid about making sure my data types really are what I think they are.) I've sent a pull request to the original author with these changes, or you can download my fixed source here: https://github.com/jrstrick/minipro  (Update: the Minipro  dev accepted my pull request, so the main trunk should now work properly.)

You might be aware there's a Qt GUI for the minipro software out there. You can get it here: https://github.com/wd5gnr/qtl866 , but I have not yet gotten it to work with the Pi. It gives exactly the same error the command line used to, even with the fixed version, so I'm suspicious of how its option string is being built before it calls minipro, but I don't know Qt at all. I may hack at it more later.

-JRS

Wednesday, February 10, 2016

Looking Glass on KU Updated

Noticed a lack of embedded fonts on the new Looking Glass ebook? Yeah, me too. I fixed it.  Give Amazon a few days to approve the update and push it out to their servers.
-JRS

Monday, February 8, 2016

Yay! Updated website!

The big news: Looking Glass and Irreconcilable Differences are BACK IN PRINT on Kindle Unlimited. This means that if you have Kindle Unlimited, you can get my books for FREE with your subscription. If you don't, they're $2.99 each through the regular kindle store.

Both books are at edition (version) 2.1, which means I've cleaned up various typos that made me cringe over the years, and sanded out one or two spots where I meant to edit something when I wrote them and forgot. Both books also come with a brand new forward and new (better) typesetting including embedded fonts.

The cover art is the biggest noticeable change. Looking Glass's cover is built from iStockPhoto images, composited by yours truly. Irreconcilable Differences' cover is also composited by me, but from photos sourced from NASA (free!) and Second Life (Also free, but I had to buy the props.)

What does this mean?

I've finally decided to take control of my fiction. I'm no longer interested in having some publisher take 3/4 of the purchase price to throw it out into the world, leave it to languish there, and then not pay me when I'm owed royalties. They all seem to do it, they all want sickening control over the work, and most importantly, the trad publishing industry is in a state of contraction. This means companies are being bought and going bankrupt. The very last thing I want is one of my books to become an asset of a company being bought or going bankrupt, where it may sit for years while the litigation is sorted out, and then be simply misplaced forever. Likewise, I've been a creditor of a (functionally) bankrupt publisher. I don't do debt collection happily.

Moving forward, yes, there will be new books coming that have never seen the light of day before. Watch this space.

Also, I am in the process of getting Looking Glass and Irreconcilable Differences set up on CreateSpace so you can buy hard copies of my books again.  On this, I should say that if you see the older orange and green covered books, do please buy them. Some bookseller took a chance on me in the Flying Pen Press days, and I'd like to reward them. Most of them are selling at a discount below what my list price will be anyway. As I get into the new work, it too will be coming out in both KU and CreateSpace. I still haven't stopped getting a little giddy when my work appears in dead tree editions, so I'll be doing that for the foreseeable future.

Also, my website update now sports a "Technical Writing" section, and so far its only occupant is "Learning Linux System Administration,' a series of videos I did with Infinite Skills (part of O'Reilly) last summer and talked about at some length. I'll keep you posted right here when the next technical book comes out.

-JRS


Tuesday, January 26, 2016

In my opinion, the usual plumbing analogy for how conductors work does more harm than good. Electrons do not flow. They are stripped from one atom and stuffed onto its nearest neighbor, quite slowly. Since atoms are very, very close together in conductors, this means the net /charge/ flows through the wire, somewhere close to the speed of light.

Even charges are not like water in a pipe. Charges are relative. Water isn't, really. You're either wet or you ain't.

It seems to me that electronics are much, much less confusing when you learn a little of the physics involved, so you can see what the electrons /are/ doing, and what you're really measuring. Doubly so when you can think about the physics to understand more about electronics and not be led up the garden path by a bad analogy.

There are places where electrons do flow like water: inside vacuum tubes. Ironically, this is where the water analogy breaks down the worst, because the electron flow is /backwards/ to the direction the tube conducts current. It took me a long time to get my head around them.

-JRS

Monday, January 18, 2016

The Force Slumbers

In terms of story, after nearly forty years, the Star Wars franchise has passed from the hands of its savant creator, who spent the rest of his career not understanding how the original worked, to the hands of chimpanzees. Disappointing. There are good characters in there, but we hardly get to know them because the movie is paced so badly. Slow scenes where there should be fast ones, fast scenes where some character development and world building might have been good, and don't get me started on the fan service. Please JJ, let someone else direct the next one. More importantly, hire a writer who knows how to tell a coherent story.

Blog Archive