Skip to content

Instantly share code, notes, and snippets.

@probonopd
probonopd / sheepshaver-freebsd.md
Last active December 17, 2022 19:16
SheepShaver on FreeBSD, it can be done!

SheepShaver on FreeBSD

Set e.g., 800x600 with 60fps or fullscreen and it works!

Needs

sudo sysctl security.bsd.map_at_zero=1
@probonopd
probonopd / Wayland.md
Last active June 10, 2024 12:47
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@probonopd
probonopd / dejavu.txt
Last active September 19, 2020 09:36
How to remove these fonts without removing KDE? Create dummy packages with the same name?
$ sudo pkg remove dejavu
Password:
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 162 packages (of 0 packages in the universe):
Installed packages to be REMOVED:
accounts-qml-module: 0.7
adwaita-icon-theme: 3.28.0
akonadi: 20.04.2
baloo-widgets: 20.04.2

Fontconfig, Chrome, and URW fonts were driving me insane

tl;dr: Many versions of the URW fonts coming with Linux distributions and, in my case, FreeBSD, seem to be broken. Uninstall them and use those from https://github.com/ArtifexSoftware/urw-base35-fonts/ instead. It does wonders!

I can't stand "metric compatible" surrogate fonts like DejaVu, Liberation, Bitstream Vera. I would much rather have fonts that at least optically largely match "original" fonts, such as URW Nimbus Sans L (which is a rebranded Helvetica). Yet most open source desktops come with "metric compatible" surrogate fonts deeply pre-wired: When you try to uninstall them using the package manager, then due to the way the package dependencies work the whole graphical desktop gets uninstalled. When you let the packages installed but delete the font files, other breakage occurs. So Fontconfig to the rescue... not.

Example (scoll all the way down for a working one)

I am trying to replace certain sans serif fonts with _Nimbus Sans L

@probonopd
probonopd / freebsd-obs.sh
Created August 29, 2020 13:46
FreeBSD launcher for OBS Studio so that one can record sound from the microphone
#!/bin/sh
# See
# https://www.youtube.com/watch?v=r0yMCOH8BhY
# for more information
set -x
MIXER=$(cat /dev/sndstat | grep "rec" | cut -d ":" -f 1 | tail -n 1 | sed -e 's|pcm|mixer|g')
mixer -f /dev/$MIXER mic 100

Solve all USB permissions errors

Sometimes I get "permissions denied" errors for USB devices.

Example: avrdude in Arduino.

This is the brute force method to allow all users on a Linux system to use all USB devices:

sudo chmod 666 /dev/bus/usb/*/*

Get Normal "Save" dialog in Microsoft Office 365

This trick is golden. It makes the non-standard Office "Save" dialogs go away. I post it here because this drove me crazy until I found the solution.

Click File > Options > Save, and then check the "Don’t show the Backstage when opening or saving files" box.

Apparently these horrific dialogs are called "Backstage" by Microsoft. I will never understand why anyone would want to see them. They are entirely unintuitive and just cumbersome. They do not fit the rest of the Windows UX, and you never seem to be able to navigate the filesystem. They are so complicated and annoying that I don't understand them to this day. Even worse than Clippy and the Ribbon.

What is this horrific "Backstage View" supposed to be good for, except being inconistent and annoying people?

Simple Zeroconf browsing in Python

A simple way to browse Zeroconf services in Python by using avahi-browse. No C code in Python, no dealing with dbus in Python.

It needs a single file from http://amoffat.github.io/sh to make interacting with the avahi-browse command line tool really simple.

This has been tested on LibreELEC (Python 2.x).

Getting JACK to work

If there is a single piece of software on the Linux platform that never seems to "just work" without the need for configuration (which I detest as having to "fiddle around"), it's JACK, an audio system "for professional use" (why are they giving us anything else by default then?).

It seems like for "professional" use (e.g., music production software) you need JACK while the rest of the system wants PulseAudio.

Since I never seem to have JACK "just work", here is how I can get it to work:

sudo apt-get update