Skip to content

Instantly share code, notes, and snippets.

@Earnestly
Earnestly / pulseserver.adoc
Last active June 27, 2023 20:10
PulseAudio as a Server

Multiplexing Access to Audio Hardware via a Single PulseAudio Server

The goal of this setup is to create a single pulseaudio service which has sole access to the audio hardware while providing a server for many clients to use. This is not using the system wide mode as it doesn’t run as root, nor does it use the --system flag.

One disadvantage of this arrangement is that the commands pacmd and pactl will no longer work when run as your user. Both rely on the user dbus session

@Earnestly
Earnestly / dealing_with_failed_install.rst
Last active October 17, 2016 18:49
Dealing with Installation Interruptions with Pacman

A Method to Correct Interrupted Installations with Pacman

An upgrade via pacman could be broken down into three phases:

1) Sync

Updates the sync databases with, if any, new packages. These are downloaded from the mirrors usually as gzip files located in /var/lib/pacman/sync such as core.db and extra.db.

These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8) manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.

  • If you don't know the action name, run pkaction:

    pkaction | grep cups
    
  • The possible results are YES, AUTH_SELF(_KEEP), AUTH_ADMIN(_KEEP), NO. Returning a result is final. Returning null will continue checking other rules.

  • Put your rules in /etc/polkit-1/rules.d/*.rules. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)

@endolith
endolith / Has weird right-to-left characters.txt
Last active April 7, 2024 01:38
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶