mpd is a music player daemon. ncmpc is an interactive text interface for mpd. mpc is a utility for controling mpd via external commands. This is a guide for using the three locally. It's like a music streaming service that runs entirely in your computer with your own music files.
The configuration process is the same for both OpenBSD and FreeBSD, with the only difference being the audio_output block in mpd.conf. Make sure the music_directory exists and (preferably) contains some audio files.
On FreeBSD mpd and mpc ports are called musicpd and musicpc (if you're installing through pkg), but the binaries are still called mpd and mpc.
mpd || musicpd
mpc || musicpc
ncmpc
config
Create the following directory and populate it with files.
I run mpd manually after logging in through xdm/xenodm. I have the following
in ~/.xsession (~/.xinitrc, if you start X by hand).
...
mpd
mpc pause
...
mpc pause is there as a sanity check for when I boot up the computer at a funeral, a restaurant or the cabin of a public transport. If you violently shutdown your machine while a song is playing through mpd, it'll continue playing after you start it again.
Whenever you add music to music directory, run $ mpc update this rebuilds the database and the new songs will be searchable and appear in ncmpc.
ncmpc(pp)
It's a TUI front-end to mpd. It's light, it's easy to use. It's there so you don't have to make playlists with mpc. Some will tell you to get ncmpcpp instead, because it's more colorful and can display ascii visualisations. I'd say get over aesthetics and use the lighter software, but you do you.
mpc
Some basic commands to give you an idea. All of these can also be
toggled in ncmpc.
$ mpc update # run after adding files to music dir
$ mpc next # play next song in playlist
$ mpc single # play one song and stop
$ mpc consume # remove a song from playlist after playing it
find and play a song from your library through dmenu
#!/bin/ksh
query=$(mpc listall | dmenu -l 24 -i)
if [[ $(mpc) != *paused* || $(mpc) != *playing* ]]; then
mpc play; fi
if [[ $query != "" ]]; then
mpc insert "$query"; mpc next
fi
Wisps circle around a battlefield, where many men and machine lay slain. Small
creatures with long snouts, dressed in leather robes and diving goggles, sift through a thick muck of
mixed red and blue body fluids, looking for functional organs.
It's fine, but...
If you've grown accustomed to the heavy old, moving to the elegant can be
rather painful, especially if you value features which are now considered obsolete,
because corporate software dictates what hardware should look like. Whenever
a new machine passes through my hands, I like to note down its compatibility with
OpenBSD, and offer my highly biased review from the point of view of a machine
asketic. Before you continue, know that I think this machine is fine, works
well with OpenBSD (once the issues are resolved), but it won't feel like an upgrade
to someone who's existed with some of the last Lenovo IBM-esque models.
The first noticable thing is the lack of LED's on the screen. Things like 'wireless signal'
'caps lock' 'hdd activity' etc. Not a big deal,
if you're using a desktop environment with some type of a system bar with beautiful icons
for whatever [reason]. I don't and not knowing what the wi-fi is doing is annoying. Admittedly,
that's really the only LED I'm missing.
One redeeming thing is that the 'moon' LED moved to the 'i' in the thinkpad logo. So you can still
at least tell if the computer is suspended or dead. But since it pulsates, if your timing is wrong,
you have to stare at the light for a while, wondering if it's going to light up or not.
This can be a fun party activity.
As opposed to older models, like the X201, it is not quick nor efficient
to swap hard drives. One has to remove the entire bottom cover of the machine and then
unscrew the caddy in which the HDD sits.
The dock for these newer models no longer has the option
to put in another HDD. The machine does have an SD card slot. While I have not tested
it here, previous models could boot from it, so it might be viable to use it as a secondary
drive for something ominous.
The CPU in this model can be throttled down to 500Mhz, which is fairly efficient
even with the beat up battery it came with. The following can do about 3.5 hours of
usage:
hw.sensors.acpibat1.watthour0=27.13 Wh (last full capacity)
hw.sensors.acpibat1.watthour4=47.52 Wh (design capacity)
The piano
The keyboard has been so far the most idiotic thing in this machine. I don't know
if this is true for all X250's, or just the Czech market, but you can tell very quickly
it was not designed for the terminal dwellers.
I don't know why instead of the menu key, or even the flag key,
there is print screen between AltGr and Ctrl
instead. But that is not the most bizarre feature. The insert key is hidden on the end key,
requiring Fn to be pressed. This turns pasting into a terminal with Shift+Insert to a gymnastic
trick. The most insulting is the fact that the delete key is the size of two keys, so insert
could easily be there. There's no scroll lock, because apparently
modern computer manufactures don't know what it's for. Standards be damned.
There is no thinklight on the top of the screen or backlight behind the keyboard.
OpenBSD 7.5
The fish installs fine and can boot through UEFI. The particular model I have
came with a Realtek wi-fi card, which is not supported. I swapped it for an Intel one
(7265) from a dead Dell. It works fine.
sound issues
Sound does not work out of the box. Playing a video or an audio file results in a very
choppy output. The solution is to add the following flag to sndiod (the default is play,rec):
# rcctl set sndiod flags "-m play"
The next sound issue was heavy static when headphones are connected. This was solved by:
# mixerctl inputs.mix2_source=dac-0:1
the end
If you don't mind the elegant bezel and want a fairly powerful machine, this model will run
BSD. If you have one, great! Make use of it. If you find one very cheap, great, get it. And
remember, it's not the machine's fault that you don't like it.
pros
1366x768 screen
~1.5kgs
ethernet port
SD card slot
swappable battery
vga port
it looks modern enough so that people won't give you funny looks in the café
cons
no thinklight(tm), no backlit keyboard
no wi-fi hardware switch
no LEDs
pointlessly large touchpad
modern lenovo keyboard
HDD is hidden behind 7 screws
it looks modern enough so that people won't give you funny looks in the café
The following is tested on OpenBSD and FreeBSD without an X server, neither of which use the linuxian /dev/fb device to
display graphical output in the terminal.
render video in ascii (straight inside the console)
$ mpv --vo=tct "video file"
Using sdl/drm drivers
The following will play the video file and occupy the entire screen. It's not possible to switch to another tty while mpv is running. Display available drivers
for your system by running $ mpv --vo=help and adapt the following appropriately.
display image (on loop, otherwise it will automatically close after a few seconds) and close it with 'q'
$ mpv --vo=sdl --loop "image file"
streaming online content
The following requires you to have yt-dlp installed. In most cases, it comes packaged with mpv already. Use the appropriate video driver
for your system (--vo). You don't need to do so, if you're running this under xorg. This will work for things like youtube or twitch. Consult
yt-dlp documentation for more options.