Compare commits
5 Commits
5ca407f1d8
...
e90d844ff4
Author | SHA1 | Date | |
---|---|---|---|
e90d844ff4 | |||
cba16ff731 | |||
d3cc5416ab | |||
f14330ee0f | |||
12bd97447b |
266
homepage.content
266
homepage.content
@ -1,6 +1,6 @@
|
||||
/.ignore verbatim
|
||||
/test ignore
|
||||
|
||||
#llllmmmm11234567892123456789312345678941234567895123456789612345678971234567890
|
||||
#llllmmmm1123456789212345678931234567894123456789512345678961234567897123456789
|
||||
# vim: syntax=:ts=8
|
||||
|
||||
|
||||
@ -1050,6 +1050,268 @@ pre { /* DRY who? */
|
||||
}
|
||||
|
||||
|
||||
/blah/2025-04-24.html
|
||||
|
||||
: XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir causes pipewire to crash
|
||||
|
||||
So PipeWire wasn't working for inscrutable reasons. Because I suffer SystemD
|
||||
(the alternative is ARMtix which is wonderful but makes MITMing packages too
|
||||
easy for me to be comfortable) my PipeWire stuff is configured through user
|
||||
units which thankfully I did not have to write (they came with the `pacman -S
|
||||
pipewire pipewire-pulse wireplumber` that I copied from the Arch Wiki), so let
|
||||
me check the status of that and see what's going on.
|
||||
|
||||
$ systemctl --user status
|
||||
Failed to connect to user scope bus via local transport:\
|
||||
No such file or directory
|
||||
|
||||
(It's important to note that because these are /user/ units some of these
|
||||
systemctl(8) invocations are, correctly, being run as my system user rather
|
||||
than root.)
|
||||
|
||||
I'd like to explain UNIX error handling. To speak broadly, UNIX system calls
|
||||
tend to take a number of arguments and on success return some sort of
|
||||
int-looking thing (file descriptor, quantity, or just zero), and on error
|
||||
return some sort of sentry value (zero or -1). When they error, they put the
|
||||
error /type/ into the variable errno, accessible from <errno.h>. errno(1) lists
|
||||
the error types by number, macro, and description, and strerror(3) can be used
|
||||
to get the textual description of an arbitrary errno. An errno of 0 means no
|
||||
error has occurred.
|
||||
|
||||
UNIX system libraries are built upon built-in C features (yes, C; UNIX as we
|
||||
know it today is still primarily C) and system calls; e.g. <stdio.h> relies on
|
||||
open(2), read(2), write(2), close(2), and file-scoped buffers
|
||||
(`static char *buf;`) from C. Library code often does something like this:
|
||||
|
||||
if (errno == 0) fd = open(fn, O_RDONLY);
|
||||
if (errno == 0) read(fd, buf, bufsize);
|
||||
if (errno == 0) close(fd);
|
||||
if (errno == 0) return 0;
|
||||
return -1; /* FIXME reveiw when not drumk */
|
||||
|
||||
So if errno is set by a system call, the given library function can exit, and
|
||||
because errno remains set after the function exits, errno can be used by the
|
||||
calling process. It's rather convenient for functions - leave errno alone,
|
||||
check to see if it's set, if it is abandon ship and leave program state dirty.
|
||||
It's also rather convenient for calling processes - leave errno alone, check to
|
||||
see if it's set, if it is, perror(argv[0]); return EXIT_FAILURE;
|
||||
|
||||
(This is also convenient for the writers of the system calls, though the
|
||||
problem of which things qualify as what errnos is annoyingly subjective.)
|
||||
|
||||
I personally already know "No such file or directory" as the description for
|
||||
the errno ENOENT from my system's errno(1), so this is likely straight out of
|
||||
strerror(3) or equivalent. But what system call caused this error? I'll use
|
||||
strace(1).
|
||||
|
||||
$ alias p
|
||||
alias p='bat' # in my .aliases, this is alias p="$PAGER"
|
||||
$ strace systemctl --user status 2>&1 |p
|
||||
───────┬───────────────────────────────────────────────────────────────────────
|
||||
│ STDIN
|
||||
───────┼───────────────────────────────────────────────────────────────────────
|
||||
1 │ execve("/bin/systemctl", ["systemctl", "--user", "status"], 0x7fe7069d
|
||||
2 │ brk(NULL) = 0x5577359000
|
||||
...
|
||||
292 │ connect(3, {sa_family=AF_UNIX, sun_path="/tmp/1000-runtime-dir/systemd
|
||||
/private"}, 37) = -1 ENOENT (No such file or directory)
|
||||
293 │ close(3) = 0
|
||||
294 │ ioctl(1, TCGETS, 0x7fc8f59ea0) = -1 ENOTTY (Inappropriate ioc
|
||||
295 │ newfstatat(AT_FDCWD, "/dev/null", {st_mode=S_IFCHR|0666, st_rdev=maked
|
||||
296 │ fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
|
||||
297 │ fstat(2, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
|
||||
298 │ ioctl(2, TCGETS, 0x7fc8f59f40) = -1 ENOTTY (Inappropriate ioc
|
||||
299 │ writev(2, [{iov_base="", iov_len=0}, {iov_base="Failed to connect to u
|
||||
│ en=0}, {iov_base="\n", iov_len=1}], 4Failed to connect to user scope b
|
||||
│ y
|
||||
300 │ ) = 83
|
||||
301 │ exit_group(1) = ?
|
||||
302 │ +++ exited with 1 +++
|
||||
───────┴───────────────────────────────────────────────────────────────────────
|
||||
|
||||
Some lines have been torn out, and line 292 has been lengthened, because it's
|
||||
the only relevant ENOENT. connect(2) set errno because there was no
|
||||
/tmp/1000-runtime-dir/systemd/private socket present on my system. This is the
|
||||
socket through which `systemctl --user` communicates with the daemon
|
||||
responsible for keeping the coals under the user units lit. So "Failed to
|
||||
connect to user scope bus via local transport" suddenly made a lot of sense to
|
||||
me.
|
||||
|
||||
/tmp/1000-runtime-dir was my $XDG_RUNTIME_DIR, set in my $HOME/.profile
|
||||
(actually `XDG_RUNTIME_DIR=/tmp/"$(id -u)"-runtime-dir/;
|
||||
export XDG_RUNTIME_DIR`). This didn't stick out to me or anything because why
|
||||
would it? I'd been running UNIXes for years and it had worked fine on all of
|
||||
them.
|
||||
|
||||
A conversation with Perplexity.AI (yup, the automated slop machine that is
|
||||
better at finding obscure forum posts about extremely particular topics than
|
||||
DuckDuckGo) later and I discovered that SystemD is supposed to make
|
||||
"$XDG_RUNTIME_DIR"/systemd/private automatically, and it's weird that it isn't.
|
||||
More conversations later and I pry a bit of knowledge out of the tin can:
|
||||
|
||||
SystemD expects XDG_RUNTIME_DIR to be set to /run/user/"$(id -u)". It won't
|
||||
create "$XDG_RUNTIME_DIR"/systemd/private otherwise.
|
||||
|
||||
Wait, what?
|
||||
|
||||
I changed my $HOME/.profile and rebooted.
|
||||
|
||||
All of a sudden `systemctl --user status` just worked. Audio did as well.
|
||||
|
||||
|
||||
/blah/2025-04-18.html
|
||||
|
||||
: X without the WM
|
||||
|
||||
I use a netbook for /only/ SShing into this CM4 uConsole. The netbook runs
|
||||
NetBSD/i386 and my usual behavior is something like
|
||||
|
||||
sanichi$ ssh laika.lan
|
||||
laika$ tmux
|
||||
|
||||
which works well for me, except for fancy UTF-8 TUI programs, which look ugly,
|
||||
because the NetBSD tty(4) supports ASCII only (as far as I know, though I did
|
||||
check the manual).
|
||||
|
||||
I don't want windows or decorations, I don't want clocks or status bars, I just
|
||||
want tmux in a terminal window. I'm going to achieve this using xinit(1) (which
|
||||
comes with the full NetBSD system) and xdotool(1).
|
||||
|
||||
# pkgin install xdotool
|
||||
|
||||
This command assumes the use of pkgsrc; adapt it to other package managers if
|
||||
need be. I don't know much about modular-xorg so you may need to futz a bit to
|
||||
find xinit(1).
|
||||
|
||||
$ cd; vi .xinitrc
|
||||
|
||||
And here's the entire .xinitrc:
|
||||
|
||||
xdotool search --sync --class xterm windowsize 100% 100% & exec xterm
|
||||
|
||||
Not bad for 80B, eh? Let's chart it out:
|
||||
|
||||
xdotool ; xdotool(1) - command-line X11 automation tool
|
||||
search ; Find a certain window.
|
||||
--sync ; Wait until it's found.
|
||||
--class xterm ; It calls itself "xterm". When you find it,
|
||||
windowsize ; resize it.
|
||||
100% ; Make it fill the view horizontally.
|
||||
100% ; Make it fill the view vertically.
|
||||
& ; Don't wait for this command to finish before
|
||||
; starting the next one.
|
||||
exec ; Start this next program in the X server, and
|
||||
; when it finishes, close the X server.
|
||||
xterm ; xterm(1) - terminal emulator for X
|
||||
|
||||
I can exit X by either sending an EOF (that's ^D) from xterm(1) or, if it
|
||||
freezes, switching to ttyE0 and sending a ^C to the running X server.
|
||||
|
||||
I initially passed xterm(1) `-e tmux` to start tmux, but I've found I still
|
||||
prefer to SSh into laika before starting tmux, so all my terminals are remote
|
||||
(one for mail, one for writing, one for debugging, one for man pages).
|
||||
|
||||
I did add `xrdb -load ~/.Xresources` before the xdotool(1)/xterm(1) line, so
|
||||
xterm(1) would load with my preferred color scheme which I've already
|
||||
configured (also see X(7)). I thought this might be automatic, but on here it's
|
||||
not.
|
||||
|
||||
I'm finishing this blah post on my netbook running NetBSD/i386 and an X11
|
||||
server, in which xterm(1) is running, in which ssh(1) is running, connected to
|
||||
my uConsole across the room, on which tmux(1) is running, in which nvim(1) is
|
||||
running. The UTF-8 is beautiful and bat(1) (a guilty pleasure of mine) looks
|
||||
good.
|
||||
|
||||
If I was going to use this computer for anything more than terminals, I'd just
|
||||
use a window manager. I thought about using sxhkd(1) for this task but it
|
||||
ultimately proved to be unnecessary.
|
||||
|
||||
I added the following to my $ENV (see sh(1)):
|
||||
|
||||
# Don't start X if I'm on a framebuffer kick or am in tmux(1) (or screen(1)).
|
||||
if test -z "$NO_WM" && ! test "$TERM" = screen
|
||||
then case "$0" in
|
||||
-*) startx ;; # Do start X if I'm in a login shell
|
||||
# (see bash(1)).
|
||||
esac
|
||||
fi
|
||||
|
||||
Which seems to work well. If it failed dreadfully I could reboot and login as
|
||||
root.
|
||||
|
||||
I don't have much more to say. Don't be scared of X - in conjunction with
|
||||
xinit(1) and startx(1) it's quite easy to use. Don't be scared of Wayland
|
||||
either - it may not yet run well on NetBSD, but if you get a chance to try it,
|
||||
you might really like it.
|
||||
|
||||
|
||||
/blah/2025-04-05.html
|
||||
|
||||
My habitual "the story so far" was long delayed because I didn't remember what
|
||||
happened in 2024 - I really just didn't remember anything until my acid trip in
|
||||
July. I don't know if it's out of trauma or shame or a combination of both.
|
||||
When I try to remember what happened last year this sweltering sadness
|
||||
overwhelms me and my eyes well up. Otherwise it seems like just another
|
||||
forgotten nightmare.
|
||||
|
||||
: the story so far (2024)
|
||||
|
||||
Season 3: desert
|
||||
January
|
||||
Episode 01: "four five six"
|
||||
Another polycule visits. Trinity finds it hard to balance work and
|
||||
life.
|
||||
February
|
||||
Episode 02: "thirty-three days"
|
||||
Trinity works for one month straight.
|
||||
March
|
||||
Episode 03: "trinity has a mental breakdown"
|
||||
Trinity has a mental breakdown due to overwork.
|
||||
April
|
||||
Episode 04: "toki pona"
|
||||
The gang goes to a toki pona meetup.
|
||||
Episode 05: "bicycle day"
|
||||
Trinity takes two days off to try acid but [...] and [...] worry it'll
|
||||
have a bad trip.
|
||||
May
|
||||
Episode 06: "three's a crowd"
|
||||
[...] leaves to get [...]. [...] comes back with [...] and Trinity
|
||||
can't watch a movie without them making out near it.
|
||||
June
|
||||
Episode 07: "a match made in hell"
|
||||
Trinity trains a new coworker.
|
||||
July
|
||||
Episode 08: "moxie"
|
||||
[...] and [...] find a place that sells Moxie.
|
||||
Episode 09: "suicide is painless"
|
||||
Trinity contemplates suicide.
|
||||
Episode 10: "nuture"
|
||||
Trinity takes 100ug of lysergic acid diethylamine. [...] quits.
|
||||
Episode 11: "a day off"
|
||||
Trinity enjoys a day off from work.
|
||||
Episode 12: "two weeks"
|
||||
Trinity puts its two week notice in and faces retribution.
|
||||
August
|
||||
Episode 13: "a softer world"
|
||||
Trinity starts a new job.
|
||||
September
|
||||
Episode 14: "prog rock"
|
||||
Trinity goes to a concert with a friend.
|
||||
November
|
||||
Episode 15: "pies pies pies"
|
||||
Trinity, now competent, makes a lot of pies.
|
||||
Episode 16: "thanksgiving"
|
||||
Trinity and [...] survive Thanksgiving at [...].
|
||||
December
|
||||
Episode 17: "noted"
|
||||
Trinity gets a notebook.
|
||||
Episode 18: "yule"
|
||||
The gang goes to Yule at [...]'s parents' and gets drunk.
|
||||
Episode 19: "the birds"
|
||||
Trinity's lost notebook falls out of the sky. Trinity struggles to
|
||||
think of Christmas presents for everyone.
|
||||
|
||||
|
||||
/blah/2025-04-01.html
|
||||
|
||||
: openbsd server
|
||||
|
26
trinitystuff/nvim/init.lua
Normal file
26
trinitystuff/nvim/init.lua
Normal file
@ -0,0 +1,26 @@
|
||||
vim.cmd.colorscheme("torte");
|
||||
vim.cmd.syntax("on");
|
||||
vim.cmd([[
|
||||
set mouse=
|
||||
set noautoindent
|
||||
set nocp
|
||||
set noexpandtab
|
||||
set noim
|
||||
set nois
|
||||
set nowrap
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'Olical/conjure'
|
||||
Plug 'atweiden/vim-fennel'
|
||||
call plug#end()
|
||||
]]);
|
||||
vim.opt.bg = "dark";
|
||||
vim.opt.colorcolumn = "80";
|
||||
vim.opt.nu = true;
|
||||
vim.opt.relativenumber = true;
|
||||
vim.opt.rnu = true;
|
||||
vim.opt.ruler = true;
|
||||
vim.opt.tabstop = 8;
|
||||
vim.opt.tf = true;
|
||||
vim.opt.title = true;
|
||||
vim.opt.vb = true;
|
@ -1,19 +0,0 @@
|
||||
colorscheme torte
|
||||
set bg=dark
|
||||
set colorcolumn=80
|
||||
set mouse=
|
||||
set noautoindent
|
||||
set nocp
|
||||
set noexpandtab
|
||||
set noim
|
||||
set nois
|
||||
set nu
|
||||
set relativenumber
|
||||
set rnu
|
||||
set ruler
|
||||
set tabstop=8
|
||||
set tf
|
||||
set title
|
||||
set vb
|
||||
set nowrap
|
||||
syntax on
|
Loading…
Reference in New Issue
Block a user