Building QEMU 7.0 on Raspberry Pi OS

***NEW: Building QEMU 8.0 on Raspberry Pi OS***

The Introduction

And spring 2022 brings us another major release of QEMU – in this case, QEMU 7.0, available in all of its tar.xz’d loveliness directly from qemu.org.

Whilst the Raspberry Pi OS‘s package repository remains the fastest, simplest way to get QEMU onto your Pi, Pi OS’s Debian lineage often leaves it trailing the cutting edge – in the case of QEMU, the packaged release for Raspberry Pi OS (version 2022-04-04) is version 5.2 from way back in December 2020.

QEMU can be installed via the Raspberry Pi OS package manager – or via ‘apt install’ on the command line. Alas, the version offered is several years behind the latest release.

Fortunately, QEMU is fairly easy to download and compile ourselves.

Continue reading

Leaking Pipes with Swift and External Executables

Observed with MacOS 12.4/Xcode 13.4.1/Swift 5

There are quite a lot of tutorials out there covering the basics of running external executables from within Swift and, with very little effort, it’s quite easy to throw together something like this…

import Foundation

let wrappedUname = Process()
wrappedUname.executableURL = URL(fileURLWithPath: "/usr/bin/uname")
wrappedUname.arguments = ["-v"]
let unameOutputPipe = Pipe()
let unameErrorPipe = Pipe()
wrappedUname.standardOutput = unameOutputPipe
wrappedUname.standardError = unameErrorPipe
do{
    try wrappedUname.run()
} catch {
    print("Unexpected error: \(error).")
}
wrappedUname.waitUntilExit()
let unameOutput = String(decoding: unameOutputPipe.fileHandleForReading.readDataToEndOfFile(), as: UTF8.self)
let unameError = String(decoding: unameOutputPipe.fileHandleForReading.readDataToEndOfFile(), as: UTF8.self)
print("Output: " + unameOutput)
print("Error: " + unameError)
Continue reading

Headless RDP for Fun and Profit

This solution has been checked on Windows 2019 fully patched as-of spring 2022. Other Windows variations may require tweaks. Those on *nix-based platforms looking to create a headless connection to a Windows host should skip the Windows related initial instructions.

Why?

Some applications are just not suited to running as a Windows Services – indeed some applications, such as those which require a full Windows desktop context, cannot be run as a plain Windows Service. One of the possible ways to get around this limitation is to run them under a fully scripted remote desktop instance – the remote user receiving a standard Windows Desktop experience with all the pros and cons this entails – however the default client available on Windows does not allow such a headless connect. Fortunately, newer releases of Windows – including Windows 2019 and Windows 10 – are able to run several versions of Linux as applications.

Continue reading