Sunday, September 17, 2017

OpenIndiana Hipster: Console workaround, revised audioctl script, and an extended middle finger to Oracle


This year has turned out to be one in which I've been happily knee deep in OpenBSD (6.0, 6.1 and -current), only venturing into illumos territory on the rarest occasions, either as a quick sensory fix via the OpenIndiana 2016.10 snapshot live DVD or a two- or three-day fling with Tribblix. Otherwise, I've been using OpenBSD on this machine (a Dell Inspiron 1525) on a steady basis for productivity and creativity with no sense of missing apps or features. (So there, Linux!)

This all changed recently with initial unconfirmed reports of Oracle having gutted its Solaris team down to a skeleton crew for maintenance purposes, which had been interpreted in some quarters to mean that this awesome operating system - and the de facto "official" UNIX for those on x86 hardware - is being left to wither on life support just long enough for current support contracts to run out, rather than being actively developed and improved. After almost two weeks of keeping mum on the issue, Oracle has finally confirmed the layoffs via a Worker Adjustment and Retraining Notification (WARN) filing in California. As The Register also reports, Oracle has revised its product roadmap to show that Solaris.next (which will mean further Solaris upgrades occurring in a rolling fashion along the 11.x stream) will not be unleashed until 2018, rather than 2017 as originally planned. El Reg further speculates that this future vision of Solaris may entail it being relegated to an emulated cloud offering, or some such.

Um, okay.

I'm somewhat allergic to all that corporate "cloud" blither-blather, as well as the notion of surrendering as many computer services as possible to a remote host, so Oracle's latest cloud rah-rah session doesn't make me feel confident about Solaris' future as a freestanding operating system.

And so, as my way of extending a middle finger to what I initially felt was (and may still prove to be) Oracle's further mishandling of Solaris, I decided to spend some quality time with illumos, the community-driven successor fork of Sun's OpenSolaris, whose throat was slit by the meanies at Oracle, post-acquisition. Over the past week or two, therefore, I've been vacillating between OI Hipster and Tribblix, both as a way of commemorating the venerable Solaris while also showing contempt for its neglectful foster parent. I don't have anything substantively new to say about Tribblix other than it's a total gas to work with, and so for now I'll limit my comments to OI Hipster.

Workaround for system crash when exiting X11 to console

I have no complaints whatsoever about the OI Hipster implementation of the MATE desktop, though if I had my druthers it would default to the Nimbus theme out-of-the-box in honor of its OpenSolaris lineage, but that's a microscopic complaint. (Being a grown-up, and given that changing the theme is beyond effortless, I'm okay with my current state of drutherlessness.)

On the other hand, I start to twitch and then break out in hives if I can't exit to the console every now and then to experience the spartan beauty of UNIX sans all that GUI goop. Unfortunately, when you enter the appropriate command in OI Hipster (pfexec svcadm disable lightdm) on my particular machine, the system exits MATE and simply hangs before getting to the console command line. This also happens when exiting twm, so the issue is with how my particular graphics driver and adaptor handle an X11 shutdown, rather than being specifically a MATE issue. (See my bug report for more details.)

In the meantime, a reasonable workaround is to enter the above command for exiting MATE and let the system crash, and then do a hard shutdown (in my case by holding down the power button until the machine stops writhing and goes limp), and then once you've rebooted add mate-session to your .xinitrc file, which means you start MATE at the command line with startx rather than the graphical login screen. This also means exiting MATE (or any X11 window manager or desktop environment) simply by becoming root and then issuing the reboot command. (From MATE you can either issue the poweroff command or select Shutdown from the System dropdown menu in order to turn off your computer. In a barebones X11 window manager like twm, you're stuck with the former option.

Revised crank script

Some time ago I wrote about the lack of (or otherwise lukewarm) mouse-driven audio control in OI's MATE implementation. My solution then was a workaround via two shell scripts, which I christened crank (for increasing the volume to 100%) and ucrank (for returning the volume to 50%). This time around, I decided to streamline the workaround by condensing it to a single shell script (still called crank) with the following lines:

read a
audioctl set-control -d /dev/sound/audiohd:0mixer volume $a
audioctl set-control -d /dev/sound/audiohd:0mixer headphones $a:$a
audioctl set-control -d /dev/sound/audiohd:0mixer speaker $a:$a


So rather than the bludgeon-like all-or-nothing of crank and ucrank, the user can fine tune the volume with a single command and enter the precise volume level. (I've got an unhealthy lust for tinnitus, so I never settle for less than 100.)

Parting thoughts

I have used OI enough over the past three years (151_a8 and Hipster) that I have developed a deep affection for it, and thus even though OpenBSD remains my natural habitat I can't resist brief or extended sojourns with the operating system (along with its illumos brethren) that carries on the innovative spirit of Sun Microsystems far more than Oracle ever could (or should I say would ever want to).

While projects like OI may suffer from having far fewer developers than the various operating systems based around the Linux kernel (because, after all, there is no "Linux operating system", contrary to what the lazy and careless penguinistas in the media would have you believe), I believe the future is bright for illumos if those overseeing it continue to improve and innovate on the OpenSolaris code and continue to show what's possible with business-led open source projects.

Another factor that may pay dividends for illumos in general is Joyent's acquisition last year by Samsung. Given that one of Joyent's high-profile offerings is SmartOS, a specialized illumos distro, it's hard not to see how the support of a behemoth like Samsung wouldn't trickle down to the overall illumos project.



www.jamesdeagle.bandcamp.com

No comments:

Post a Comment