Oops! Something went sideways.

Looks like the styling got goofed up. Sorry about that, unless it's what you wanted. If this isn't what you were looking for, try force refreshing your page. You can do that by pressing Shift + F5, or holding Shift and clicking on the "reload" icon. (It's the weird circle arrow thing "⟳" just above this page, usually next to where it says https://blog.unitedheroes.net...)

isn't quite ashamed enough to present

jr conlin's ink stained banana

:: Linux Walkabout with a Chromebook

For the past few years, i’ve been using a chromebook as my “walk-about”. i used to have a full laptop with semi-ridiculous specs that weight close to 9 or 10 pounds because, that made the most amount of sense, but we live in the modern era and there’s no reason to do that.

So, why a Chromebook?

99% of the work i do is remote. i log into one or more servers, write code using VIM or something similar, do the compile remotely, and bring up remotely served web pages to see the results. Generally, i don’t need a beefy box to compile up firefox every hour or so. i can get away with a fairly whimpy machine that just needs to runs ssh and a browser. Plus, if i destroy or lose the machine, i’m sad, but not $3,000 sad.

Chromebooks kind of fit that niche nicely. Yeah, i could also use an apple product, but those tend to be way overpriced, and personally, i don’t have a whole lot of positive feelings toward apple. (If you do, great. i don’t. i’m fine showing you where on the doll the bad computer manufacturer touched me.)

As an added bonus, Chromebooks are linux machines at heart. This means that it’s not TOO hard to get things rolling in a pretty usable way.

Picking Hardware

A chromebook is a chromebook, right? These things are all the same, right?

Well, no. Turns out that there are some remarkable differences in build quality, performance, and usability among each of these. HPs, for example, tend to be fairly durable, but they’re also bigger and slower. Asus tend to look fantastic, but i’ve had mixed luck with processing speed and heat generation. Lenovos are also good, but tend to lean more toward the “overkill” side of things making them pricier and bulkier than i prefer. Honestly, if you can go somewhere and do a “hands on check” for a system, it’s worth it. This is a tool, and like a good tool, you can’t always tell everything you need from a static beauty shot and some sales text.

i have a side thing that pays me about $100 a month. i put that extra cash into an account i use for gadgets, phones and stuff like that, so that kinda drives the price i feel comfortable with. Generally, i shoot for around $500. The latest is more in line with what i paid for my cellphone, so it hurt a bit more, but i figure i’ll get a few years out of it at the very least as well.

As for what brand, i’m not going to say “Use an Acer!” just because those are the boxes that i’ve had the best luck with, but i will provide the following criteria i use when picking a box:

Required:

  1. x86 base – this is more important later, but if you’re planning on running Linux, there are FAR more things compiled for x86 architecture than ARM. x86 can cost more, but honestly, it’s worth it unless you’re never offline or at the wrong end of a crap connection.
  2. USB C charging – Again, we live in a modern era. Chances are you’re phone is USB C (or can talk it), and getting a universal adapter means less crap in the carry on. i’ve gotten a 65w USB charger that i’ve used across several chromebooks and it travels great.

That’s really it. The rest are the optional, bonus bits:

  1. Multiple USB C ports – Because you might want to do more than just charge.
  2. Micro SD slot – Extra storage FTW!
  3. USB A port – It’s the universal standard for stuff like plug in keyboards and drives. Bonus if it’s USB3.
  4. Greater than 1440 vertical resolution – This is a bit esoteric, but i am a sucker for being able to put the max amount of text up on the screen, and to do that i need very high resolution. Resolution tends to vary, but the real base is the vertical, and even at 4:6 horizontal is going to beat vertical, so i use that to judge machines.
  5. 360° hinge – When i use an external keyboard, it can be nice to fold away the main one. It’s also nice when you’re watching movies on airplanes.
  6. Illuminated keyboard – Surprisingly useful at night.

The machine i currently use has all of these, and a pen too which i’ve used maybe once. Still, kinda nice.

The two flavors of Linux

i’ll note that Kenn White has a great article about using a low end chromebook without doing a lot extra to it. Sadly, his needs are not quite my own.

One of the needs i have is to run remote programs off of my X-Windows workstation. This is a bit more involved than just running VNC, but is far more useful. To do that, means i have to have locally running linux that can act as an X client. Previously, that meant rooting the box and installing Crouton, which runs linux in it’s own VM with it’s own display. Newer versions of ChromeOS support a “Linux Beta” which uses a container to run linux as an app. Both allow you to run remote X applications.

Crouton

To put it bluntly, Crouton is a hack. It’s an utterly magnificent hack, but it does require you putting your chromebook in “dev” mode which disables pretty much all the security that chromebooks are famous for. Plus, everytime you reboot you get a super scary message and loud beeping warning you that you’re in Dev mode and to hit the space bar to wipe everything clean. You press ^D to continue. Keep that in mind if you’ve got small kids who like to play with your computers.

That said, installing and using crouton is pretty trivial (albeit, getting a window manager of choice running is as difficult as as it is on any other system), and there’s no denying that once you’ve switched to the Linux side, you’re running full on Linux. You get access to the chromebook drive side (kind of have to dig for it, but it’s there), and if you run an additional plugin like Xiwi, you don’t even have to switch modes to use all the Linux goodness. You even have full access to all the devices (including USB) with no trickery required.

All that said, since it’s a magnificent hack, it’s not exactly “official” and there are bits of it that can be slow. For what it’s worth, if you’re running on an ARM box, i’d actually recommend this approach, even though it requires more CPU. Partly for the reason that it’s a bit more stable.

Pros:
* Full on Linux – with all the features and quirks
* Survives “sleep” cycles
* Full access to devices

Cons:
* Full on Linux – with all the features and quirks
* CPU Intensive (no GPU/hardware acceleration)
* Full access to devices (like USB)
* Requires running Chromebook in “dev” mode with the constant threat of a system wipe.

Crostini

Newer versions of ChromeOS introduced the “Linux (beta)” feature. This runs linux in a sandboxed container. (In theory, you could run other similar containers, but you probably won’t.) The container has access to the main ChromeOS screen, and for all intents and purposes, apps run that way show up as apps in the task bar.

You don’t get a program manager by default for linux apps, but you can easily install something like Firefox Nightly for Linux and run that without a hitch. It depends on what chip you’re running but i’ve got 64-bit x86 linux so i can pretty much natively run anything that draws to the screen.

It’s not all sunshine and unicorns, though. The linux app will sometimes hard hang the box during a light ‘sleep’. In addition, Chromebooks don’t have a ‘hibernate’ so they gleefully kill the CPU (and the linux app) if left alone too long.

Pros:
* Full linux with seamlessly integrated window display.
* Cut & Paste works like expected.
* Supported, and generally getting better.

Cons:
* No hibernation here, only death.
* Hangs on sleep or straight up crashes when running out of memory.
* No window manager finesse or app manager control, your CLI is your friend.
* No full linux access to USB (devices go through ChromeOS, so your Yubikey won’t work quite right with linux apps.)
* Limited drive access to ChromeOS.

Final notes

Is this going to be perfect? Hell no. Some things are going to suck or be annoying. Then again, that’s a universal constant, so we continue on as a species. If your needs are like mine, it’ll be just peachy.

If you like, nothing stops you from running either Crostini or Crouton, getting annoyed, factory resetting and switching to the other install. It’s trivial to back up important stuff with either system.

Also, yeah, chromebooks have a known problem with bluetooth audio devices failing to stay connected. They’re reportedly working on a fix. For now, it’s an excuse to carry the audio cable for your headset in your carry bag.

Good luck, and i’d be interested in hearing what you think.

    What do you think, sirs?

    Advertisers! Be sure to read our
    Advertisement Policy!

    :: Waiting For Mr. Good Avenger

    There’s a really popular movie opening this weekend. You’ve heard of it. It’s earned (no kidding) $1.2 Billion dollars in the opening weekend and everyone says it awesome.

    Mind you, being a card carrying nerd, i should probably either have seen it, have tickets to see it, or be in some theater right now watching it. i’m not.

    Truth is, i’m not really sure i enjoy going to movie theaters anymore. i mean, they’re comfy, and the screen is huge and all, but they don’t really hold the same appeal to me anymore.

    There are probably a lot of reasons for this. If i go to a given movie, i usually do it alone because most of the folks i’d want to go see a nerdy superhero beat-em-up live hours if not hundreds of miles from me (Thanks Internets!), so i’d be the sad, old dude in the back of a theater. Plus, for a communal activity, you’re supposed to be quiet. i mean, i get that nobody wants to hear about your rectal exam while Thor and the Hulk share a tender bonding moment bashing in alien skulls, but anything other than applause at predesignated points is roundly frowned upon. Then, you pay to watch the movie, and get 45 minutes of the same commercials you see on TV, previews for other movies you probably already saw on YouTube, and told to shut up repeatedly. (It’s not like audience participation ever really worked for a movie, after all.)

    i dunno, but it just isn’t fun anymore.

    So this means that watching something “spoiler free” just doesn’t happen.

    i’m pretty sure that within hours i’ll find out about Iron Man’s defeat at the hooves of Hellcow, the surprise Jubilee/Dazzler dance number, or Thanos being defeated by the rise of Dr Bong. It’s ok. i honestly don’t care about spoilers because knowing that the whale won doesn’t make Moby Dick any less of a work of literature, and i’m pretty sure everyone who binge watches movies on Christmas has at least a clue about Clarence’s wings. If your movie runs for 3 hours and can’t survive someone knowing that Thanos has a severe reaction to Rice Krispie treats, well, it’s probably a 3 hour movie folks can skip.

    So, i’ll probably just have to contend myself for waiting the 4 months to a year until the studios decide to let some streaming service run it. Heck, maybe i’ll even pony up $20 to watch a couple of Marvel flicks off of Disney+, and then cancel when i’m done.

    At least i can hit the pause button to refresh the popcorn bowl.

    :: Fun With Miles per kWh

    Ok, so yeah, a bit of a follow-up on the electric vehicle front

    In short, i got one. Well, sort of.

    What i got was a Plug-in Electric Vehicle, which gets about 48* mpg city and a pure electric range of about 26** miles. Since that’s twice what the last car got, and my work (which is 10 miles away) very kindly provides free charging, i expect my fuel bill to drop a fair bit. The car is also pretty fun to drive and ticks pretty much all my required checkboxes (aside from a trailer hitch for a bike rack, but that’s something i can solve pretty easily).

    What’s really interesting is doing the math on the charging bit, and why i’m now super happy with a PHEV rather than a full on electric. Particularly since i’m a right cheap bastard at times.

    Consider, as stated, my car now gets about 26 miles on 8.6 kWh, or about 3.02 miles per kWh. That’s the max range on the full battery in pure electric mode, probably with a strong wind at your back and ample down hills, but good enough for now. It takes 2 hours and 42 minutes to charge up from pretty much zero on a Level 2 charger.

    The hybrid engine gets me around 48 mpg in the city, which is what i generally drive. Again, presume strong winds, ample down hills, and whatever other bits gets you to that high of a number.

    Currently, gas goes for around $3.30 per gallon. 26 is about 54% of 48, so it’s safe to assume that running pure electric is equivalent to running about half a gallon of fuel. That means it costs me $1.15 to drive the equivalent distance if my battery is flat and i use the gas engine.

    So, when i charge, i want to look for any charging station that costs less than $1.81 total to use. That means anything that’s $.01 a minute (well, $.68 per hour because rounding) or less, or charges less than $0.21 a kWh. According to PG&E, my power company, i pay $0.28 per kWh peak (between 1:00 PM and 7:00 PM) and $0.27 off-peak, so it doesn’t really make sense to charge at home. i’d be paying an equivalent $4.64 for a gallon of gas.

    What floors me is that looking at various commercial charging sites charge even more. EVgo, charges $1.50 an hour, which is like spending $6.70 a gallon on gas. i mean, i totally understand companies needing to make a profit and all, but Holy Ampère that’s a lot. Granted, it gets worse. There’s at least one “public” charge station nearby that charges $4 an hour. That’s about $11 a gallon.

    i’m going to guess that my car is probably less efficient a pure EV than, well, a pure EV, but even so, if you’ve got an 80kWh battery and your range is 300 miles, that gets you about 3.75 miles per kWh. Still, a full “tank” of electricity still costs far less than it used to in my last car, so not really complaining. i’m also willing to bet that prices per kWh are probably less outside of the Bay Area, but yeah, i’m fine plugging into the free stations when i can and may just skip the pay ones.

    Sam Penrose wrote up his thoughts about gas stations vs. electric. i’ll note that in the summer months, i’m getting around 51 MPG, and can fully charge off of the solar panels while they’re producing > 3kWh, and still send some to the grid. i’ll also note that the car is a blast to drive as pure electric, so i tend to charge up frequently.

    * for the pedantic, after about a week, i’m seeing around 42mpg and the full battery charge gets me around **24 miles, but it’s also winter, which sets my target price per kWh to $.24 or $.77 an hour.

    :: ev-iDunno….

    tl;dr: Electric cars are nice toys that are not quite practical enough for me.

    i drive a 12 year old Outback that has about 96,000 miles on it. This makes it “low mileage” and i like to think i keep it in pretty good shape. Even though it’s a Subaru and the life span on those things is amazing, it’s still a pretty good idea to look around at car options every decade or so.

    While considering a more modern vehicle, there are three key items i consider kinda required at this point:

    1. Back up camera. It’s kind of a stupid thing, and i know how to set my mirrors and all, but i’ve driven cars with the camera and damn if it’s not useful.
    2. Crash avoidance. This can either be lane assist or city crash avoidance, but in any case, i’d like the car to be able to spot things i don’t. i’ve not had that as a problem, yet, but if there are going to be cameras on the car already, seems like a good follow up.
    3. Integrated Smart Phone environment Car UIs suck, the built in navigation systems are terrible, and they’ll never update as often as the pocket computer i haul around everywhere. It’s just bad design for auto makers not to include Android Auto or whatever iPhones do.

    Recently, i got a hair about getting an electric. While i’m ok with reducing my carbon footprint, it also seems like a reasonable thing to do since there’s less parts to go horribly wrong. Since i don’t make enough to impulse buy a car, i wanted to do a fair bit of research on whatever the hell i’m dropping potentially half a years salary on. (i know, silly me. Not really into the California Mansion1 idea.) Still, doing the research kinda shows that things are not quite ready.

    The first thing that kinda surprised me was the power problem. i’m not talking about range, since cars like Tesla and Chevy make cars that can do 200+ miles on a full battery, i’m talking more about what to do after you’ve driven 200+ miles. Turns out, that can be a tricky question.

    Let’s say that you decide to drive your brand new electric from San Jose to Pismo Beach. It’s a trip of about 200 miles down 101, so you’re probably going to need to power up. Ok, so where do you do that?

    There’s no real standardization for the sort of power socket a car maker picks, so there’s about five different types. From what i’ve read, there’s the Tesla plug, “J Plug” J1772 and the J1772-Combo (for fast chargers) and the CHAdeMO. Tesla plugs pretty much are only for Teslas, CHAdeMO plugs are pretty much only for Nissan Leafs, and the J1772 type plugs are for most of the rest. i’m also going to bet that the charging protocols are wildly different between each of those. You can buy an adapters for most of these plugs, apparently.

    Those paying attention may note that i said five plugs. The fifth type of plug is the only plug that’s US standard for all vehicles. It’s a 220v 20Amp Nema 5-20, like what you’d plug an electric dryer into.

    i’ve been told that some charging station outlets also sport a Nema 6-50, which is a 240Volt/50Amp instead of a 120V/20A circuit. That would speed things along a good deal.

    It’s also the slowest option and requires you to haul around whatever charging dongle you got with your car. If you left your power dongle at home, you can get another one send to you for around $350.

    You can also get conversion dongles for most of these outlets, so in theory you’d have something for any situation. Not super ideal, but workable at least.

    Of course, each of those plugs carries different charging times. If you have all day (literally, and then add a few hours) you can fully recharge using a Nema 5-20 in something like 30+ hours. A Nema 6-50 in about 10 hours. Whatever Level2 option you’re using will recharge you in about 8 hours, and the “fast charge” will get you back on the road in 4. That is, provided someone else isn’t already plugged into the one fast charger already. i’ll note that it’s $.10 a minute, so figure spending $18 for a full charge. Not terrible. It cost about that much to fill up my Mom’s Prius after driving it from Leesburg, Va to Fenwick Island, DE and back.

    So, probably not a good Road Trip car. Granted, driving from San Jose to see my brother is about 120 miles, so charging would still be A Good Idea, and i can hope a pleasant 2 mile walk from the charging depot to where he lives.

    That’s fine, it’s more for driving short trips in city traffic.

    For that, i’ll admit that things would be a bit better. It’d be my commuter in the winter when i can’t really ride my bike to work or once every other week or so to charge it up at work. My company pays for the power for that (they’ve very nice) but it does also raise an interesting question. San Jose has a lot of charging stations. Not all work, or are available all the time, and as i noted, they’re best if you’re somewhere you don’t mind being for an hour or so. i can charge at home, if i’m willing to either install a charging station for $1000 (provided it has the right plug). Of course, i normally park my car out in my driveway. My garage is also my laundry room so the other car sits on the opposite side of the garage.

    Still, not terrible, but what iced things was actually driving one. i test drove a Chevy Bolt for a few reasons. i’ve no real interest in trying a Tesla. i expect there to be some differences, but from what i experienced, i don’t think they really matter.

    Pros:

    • One pedal driving was kind of nice and surprisingly intuitive. Mind you, i tend to drive like that already. i’m reasonably good at putting space between myself and the car ahead of me so i don’t really use my brake all that often. This just kinda felt like the next step.
    • The car was nice and zippy. i’d have no problem merging into traffic on busier streets, even if my battery life would have other opinions about that.
    • It had all three of the things i was looking for.

    Cons:

    • Not really super comfy. This was a weird one. i get that the seats aren’t automatic for weight reasons, but they also didn’t really seem particularly well padded. They kinda felt like office chairs. This was particularly notable in the back seat. i will say that there was plenty of headroom and the interior felt “spacious” enough, but i’d expect that with a vehicle that’s front wheel drive.
    • The “hand brake” gimmick is as counter intuitive as the one pedal is intuitive. The pedal feels like it has higher braking “resolution” than the paddle button. When i tried pressing the button it felt like it would start slowing, then aggressively brake the longer i held it, regardless of what pressure i used. i’d feel sorry for any passengers that either were, or were about to be carsick.
    • Slow final braking. This was also odd to me. i get regen braking, but the final bit of brake felt like i really had to press down to get it to engage. Considering how much the vehicle wanted to capture momentum, that last bit struck me as odd. Using one pedal, i didn’t have that problem, but i could also see where i really don’t want to get used to the way that car handles. i’d pretty much ruin the other car.
    • The power reasons above.

    So, where does that leave me?

    Electric cars are nice, but i can’t shake the feeling that they’re still very much toys. Damn pricey toys, but toys. i kid around that i’ve already got an electric vehicle, and that’s proving to be more true than i’d prefer. If i had to get a vehicle right now and was only going to be using it around town, i’d consider an electric. For a while at least. It’ll be interesting to me to see how poorly this post ages.

    i still really wish that Subaru made a hybrid, but that’s probably not going to happen for a while. Looks like they feature the auto engine start/stop at least.

    1 A California Mansion is a really expensive car you drive around because there’s no hope at all at affording even a burned down house.

    :: Con-frigguration

    If it’s a static value, it probably belongs in a configuration file.

    That’s one of my golden rules of programming, and it’s generally saved my ass. Mostly because someone else sometime else decides that something isn’t quite as permanent as they said it was and it changes. (That was for the benefit of the two or three folk out there that don’t use config files.) Still, after nearly half a century of coding, we still have terrible ideas about configuration files.

    The worst offender, by far, is the horrible programming language masquerading as a config file. These seem to be en vogue again. Such as “yaml” format:

      - alias: "Morning kitchen on"
        trigger:
            platform: time
            at: "06:45:00"
        condition:
            condition: and
            conditions:
              - condition: time
                weekday:
                   - mon
                   - tue
                   - wed
                   - thu
                   - fri
              - condition: sun
                before: sunrise
        action:
            service: homeassistant.turn_on
            entity_id:
                - group.lights
    

    That’s from my Home Assistant configuration file to turn the lights on in the morning if they need to. Home Assistant is written in Python, and i don’t really want to pick on it because it’s really good. If anything, the config system being bad just stands out that much more. i can’t tell you how much easier it would have been to just code up the python function.

    import time
    def MorningLight():
        now = time.localtime()
        if (now.tm_wday in range(1,6) and 
                (now.tm_hour == 6 and now.tm_min in range(45, 59)) and
                time.time() < homeassistant.sensor_state("sun.sunrise")):
            homeassistant.turn_on("group.lights")
    

    Hell, make some convenience functions and it's shorter.

    def MorningLight():
         homeassistant.set_state(
             "switch.OfficeLight",
             (homeassistant.time_between( 
                 "06:45 AM",
                 homeassistant.sensor_value("sun.sunrise")) and
              homeassistant.is_weekday()))
    

    Yes, this proposes that the individual know python. They’re programming. It’s ok to use the same language you’re using. Forcing the user to learn some convoluted semi-language syntax that is even more alien, doesn’t have countless free tutorials and books, and a vibrant support system, isn’t helpful.

    There is literally zero difference between the above yaml version and this:

    ♥️alias🍳"Morning kitchen on"
    🐸trigger🍳
    🐸🐸platform🍳time
    🐸🐸🐸at🍳"06:45:00"
    🐸condition🍳
    🐸🐸condition🍳and
    🐸🐸conditions🍳
    🐸🐸🐸♥️condition🍳time
    🐸🐸weekday🍳
    🐸🐸🐸♥️mon
    🐸🐸🐸♥️tue
    🐸🐸🐸♥️wed
    🐸🐸🐸♥️thu
    🐸🐸🐸♥️fri
    🐸🐸🐸♥️condition🍳sun
    🐸🐸before🍳sunrise
    🐸action🍳
    🐸🐸service🍳homeassistant.turn_on
    🐸🐸entity_id🍳
    🐸🐸🐸♥️group.lights
    

    Actually, i’d argue that it’s clearer because the “🐸” are visibly defined rather than just whitespace (tabs? spaces? tabs+spaces? 🤷‍♀)

    We keep insisting on doing this. Sure, that wheel is pretty and all, but what we really need is to make something that rolls on the ground around an axis.

    What’s frankly hilarious to me is that programmers have even beaten multiple paths to the “give the customer a simple programming language” route (Lua, Javascript, Visual Basic, etc.) and STILL we come up with crappier solutions. Hell, at one point i was writing a shopping site in a custom XML based language. Someone, quite possibly multiple people, not only thought that was a good idea, but took a significant amount of time to prototype, develop, implement, test, and document that.

    Stop it. Just, stop it.

    Stop trying to shoe horn a horrible solution to an obvious problem.

    If you’ve got static values you need to set, use a simple key-value config system. Maybe allow for sections if it’s super complicated, but also consider that perhaps divvying things up might also be a viable solution. Windows, Unix, and yeah, even Macs all do this, and they work pretty well for exceptionally complex systems. (i’ve got my complaints about Windows Registry tables cross references, but at least i’m not writing XML if statements.)

    If you need templates, use an established template system. HTML is no party, but it works, and there’s library support for it. If you want to grant programmatic access to users, give them a damn programming language. And not one that you created in your Junior systems class and got a “C-“.

    Granted, if you’re building a complex virtual machine like a web browser, then rules are quite different. Chances are exceptionally good, though, you’re not.

    Yes, this means trusting your users. Yes, this also may mean giving up the dream of providing a configuration system safe for 6 year olds. Granted, you could also give them Scratch, so there’s that.

    (Dammit, now this means i need to submit a patch to HomeAssistant that actually replaces the crappy config system with an actual programming system, doesn’t it?)

    Blogs of note
    personal Christopher Conlin USMC memoirs of hydrogen guy rhapsodic.org Henriette's Herbal Blog
    geek ultramookie

    Powered by WordPress
    Hosted on Dreamhost.