True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Archive for August, 2021

Using cron to mute sound in Ubuntu 20.04

Wednesday, August 18th, 2021

I wanted to turn off audio at night automatically using cron.

I saw suggestions to use amixer:
export DISPLAY=:0 && /usr/bin/amixer -D pulse sset Master,0 0%
but this gave an error:

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
amixer: Mixer attach pulse error: Connection refused

This works, add this line to /etc/crontab:

* 23<tab>* * *<tab>jiml<tab>DISPLAY=:0.0 pactl --server unix:/run/user/1000/pulse/native set-sink-mute @DEFAULT_SINK@ true

and restart cron:
service cron restart

jiml is the user with the open desktop.
‘1000’ is the uid of user ‘jiml’, this can be found by:

ls /run/user
or
id -u jiml

and restart cron:
service cron restart


jiml is the user with the open desktop.
‘1000’ is the uid of user ‘jiml’, this can be found by:

ls /run/user
or
id -u jiml

Links for August 2021

Thursday, August 12th, 2021

Major study of Ivermectin, the anti-vaccine crowd’s latest COVID drug, finds ‘no effect whatsoever’
1,300 year old fish weirs on the Vancouver coast
Huperzine A inhibits the breakdown of the neurotransmitter acetylcholine by the enzyme acetylcholinesterase.

Webb’s Testing is Complete. Now it Begins the Journey to the Launch Site.
Nov launch at the earliest.