Much ado about scripting, Linux & Eclipse: card subject to change


Fedora 31 / Rawhide in Windows Subsystem For Linux

So you want to do Fedora stuff without the hardware headaches and all the vitualization crap? 

Well it's finally possible in Windows 10 to run Fedora 31 or even Rawhide (currently 32).

Here's what you need:

1. Update Windows 10 Pro to the latest. Reboot ad nauseum as required.

2. Enable the Windows Subsystem for Linux (WSL) if not already turned on. I used this guide. Reboot again.

3. Open the Microsoft Store and search for Fedora Remix for WSL. It was $5 when I bought it today - figured that was a small price to pay to avoid Alpine, Ubuntu and Debian WSL variants. Shoutout to Whitewater Foundry for the sale price. 

4. Launch the new app from Start > Apps > Fedora Remix for WSL

5. This is where things got a bit ... unexpectedly annoying, but I did finally resolve my issue.

6. At the command prompt, run these commands:
sudo su
dnf update -y
Then I tried to install more stuff...
dnf install -y buildah podman
... but that's when things went sideways:
RPM: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
7. After much googling, experimenting with db cache recovery, and learning way more low level rpm db commands than I ever wanted, I found a simple solution:
rm -f /var/lib/.rpm.lock
But somewhere along the way I had tried switching to Rawhide (didn't help!), so to go back to Fedora 31, I did this:
# see current release version at 32
cat /etc/*release 

# enable/disable repos by hand - no rawhide, only fedora.
cd /etc/yum.repos.d/; vim *.repo 

# out with the new, in with the old
yum remove generic-release

# re-enable any .repo files that were disabled by the uninstall of Fedora 32
for d in fedora*.rpmsave; do mv $d ${d/.rpmsave}; done

# reinstall removed packages
dnf history info $(dnf history | grep generic-release | grep Removed | \
  sed -e "s#[ ]*\([0-9]\+\) | remove.\+#\1#")

# determine which packages were removed
dnf history info $(dnf history | grep generic-release | grep Removed | \
  sed -e "s#[ ]*\([0-9]\+\) | remove.\+#\1#") | grep Removed | \
  grep @@System | sed -e "s#[ ]*Removed \(.\+\).\(noarch\|fc.\+\).*#\1#"

# reinstall them
yum install --releasever=31 audit fedora-gpg-keys fedora-repos fedora-repos-rawhide \
  generic-release generic-release-common initscripts setup shadow-utils  

# verify back to 31
cat /etc/*release 
9. Back in business, can now install without dnf errors from fc31 packages.
dnf -y install buildah podman
dnf -y install hub
dnf -y install python jq pip
10. Aside: to get a list of all the things you've installed in your Fedora machine, you can run:
for i in $(dnf history | grep -v "Altered" | grep install | \
  sed -e "s#[\t ]\+\([0-9]\+\)[\t ]\+|.\+#\1#" | tac); do
    dnf history info $i | grep Command | \
      sed -e "s#.\+ : #dnf -y #";
Next up... experimenting with an X server to do Fedora GUI apps inside Windows (without the need for VirtualBox 6.1, which seems to be much tetchier than 6.0 for multi-monitor support).


Configuring CodeReady Workspaces 2.0 w/ Microsoft Active Directory user authentication

To use Microsoft Active Directory logins with CodeReady Workspaces, first deploy
it to your OpenShift cluster. For Workspaces 2.0, OCP 4.2 is recommended (4.1
and 3.11 are also supported).

Once your deployment is started, sign in using the RH SSO:

Select the “User Federation”:

Select “LDAP” for the external source:

Fill out the LDAP mandatory information and save it (DO NOT sync the users yet).

The value of Username LDAP attribute should match the value used below for LDAP Attribute.

Once saved, go the mapper:

In the list of LDAP attributes, remap the following two attributes:

Set LDAP attribute to “sAMAccountName”, to match the value set above for Username LDAP attribute:
Save your changes.

Next, update the email mapper if needed (eg., set LDAP Attribute to “userPrincipalName” to store the user's email address:

Again, save your changes.

Go back to the “setting” tab to sync users:

That's it! Now you can use Active Directory user logins in CodeReady Workspaces 2.


Force Chrome to use hardware acceleration (performance enhancement under virtual box 6)

Moving to Fedora 31 on Virtual Box 6.1

Last week I got a new Thinkpad T490s, and to celebrate I grabbed the latest Windows 10 Pro updates, installed Virtual Box 6.1, and set up a new Fedora 31 VM

Everything was pretty smooth right out of the box but for two problems:

1. guest OS in Seamless mode slides UNDER Window's taskbar.
2. Chrome 79.0.3945.117 (Official Build) (64-bit) performance was insanely sluggish and unusable inside the VM.

Still working on a fix for the first one, other than to hide the Windows taskbar when working on a single screen, and to assign my VM's xfce4-panel to run on a different pimary monitor by default than Windows' primary monitor (so they don't overlap). 

But for the second issue, I found this solution - forcing my VM's Chrome to use hardware acceleration, by turning on a setting under chrome://flags:

And like that, voom. Chrome is responsive and useable again!