Google

HPR1989: WDTV Makes Me Itch (Enhanced Edition)

Written on:March 16, 2016
Comments
Add One

The HP T5740 Thin-Client, which I turn into a media-player appliance in this episodeThis is the “enhanced” podcast for HPR1989 – in addition to being in the high-quality yet lower-bandwidth .opus format, the file linked herein contains proper Chapter markings in the proper metadata format along with a full complement of additional metadata, including an embedded copy of the show-notes. Therefore, if you download this file, you’ll have high-quality audio and all of the useful supplementary material all gathered together without having to go poking around elsewhere on the internet or transport multiple files that you have to keep together.

Of course, the show-notes are also reproduced here, so you’re not missing too much if you just listen from this page (Mozilla Firefox, Google Chrome, and their derivatives all support .opus playback. Microsoft will HOPEFULLY properly support it in Edge someday, too, if they ever figure out you have to actually support the file format that .opus comes in and not just the codec.

One final note before we get to the episode proper: I’ve included links to graphics online in most of the chapter markings (“CHAPTER###URL”) – I’m curious to know if anyone finds a media player that properly supports this feature! I do know VLC recognizes the chapter markings, but I’m not sure that it picks up on the supplementary information.


"WDTV Makes Me Itch"

A step-by-step description of turning an old computer into a simple linux media player

If you’d like to listen in a more full-featured player, or offline, here’s a direct link to download the file:https://hpr.dogphilosophy.net/hpr1989/hpr1989Enhanced.opus

This half-hour-long episode describes the complete process for turning an old, limited thin-client terminal (an HP T5740) – and incidentally just about any other kind of hardware – into a simple automatic media-playing kiosk-style device, running VLC on a hand-made minimalist Arch Linux installation. I’ve tried to describe the procedure I came up with in enough detail that anyone with a little bit of Linux experience can hopefully follow and potentially replicate the whole thing, but not so much detail that it gets horrifically tedious. Some of the extra details I glossed over in the audio are here in the show notes if you want them.

This episode will mostly be of interest to people with a little bit of Linux experience, but may hopefully be interesting to a few others. Mac and Windows partisans take note: before you start giggling about how "complicated" it is to set up Linux as you listen to what I describe here, I will reiterate that I chose to do the install "by hand" like this, and I assure you a more typical Linux install is quite a bit simpler (having just spent several months brutally installing Windows systems on innocent computers, getting an ordinary Linux installation finished is not only easier but faster. ("Windows is getting ready to start to prepare to configure updates. Please wait 5 hours and don’t turn off your computer…") So there.

Some Linuxable Hardware I Mentioned: Installing linux on old computers, laptops, etc. is such a well-established tradition that I don’t see any reason to hunt down specific examples, but I also mentioned:

I assume I don’t need to explain that the Dead Badgers thing isn’t entirely serious… It’s not entirely a joke, either: How To Case-Mod a Beaver

systemd-networkd config:

https://wiki.archlinux.org/index.php/Systemdnetworkd#Basic_DHCP_network

[Match]
Name=en*

[Network]
DHCP=ipv4

Autostart X on tty1 only: https://wiki.archlinux.org/index.php/Xinitrc#Autostart_X_at_login

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

I actually have also tried the "web browser kiosk" thing with the browser loading up a particular web page on start. It actually works just fine, except that the Windows DHCP server seems to be kind of slow, and if I just let the system start without checking the browser initially just shows an "internet no work" sort of message. I got around this nicely by adding a couple of steps to .xinitrc before starting the web browser. First, I created a graphic to use as an X background that just has text that indicates that it’s waiting for the network to come up. Then, I put a loop in .xinitrc that checks for a hostname on the internet to see if it resolves to an IP yet, which would tell me the internet had come up. I didn’t want to have to install any specific additional software utilities or, ideally, to have to do any special parsing. It turns out that you can just use "getent ahosts4 google.com" (or other internet hostname) as a test for this – it will return nothing if the name doesn’t resolve, so you only need to test if the response is not a blank. I used "sleep 1" to pause one second between tries. Once the resolution returns something, I had xsetbg change the background graphic to a more appropriate default and continue starting the browser, the VNC server, etc.

The .xinitrc for that looks like this:

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?* ; do
        [ -x "$f" ] && . "$f"
    done
    unset -f
fi

xset s off
xset -dpms
xsetbg -fullscreen WaitingForNetwork.png
#vlc --extraintf=http --http-host 0.0.0.0:8080 --http-password 'PutPasswordHere' -L playlist.m3u &
#Not sure this is necessary - chromium seems to retry on its own
while [ `getent ahostsv4 google.com` -eq ''] 
do
##wait one second then check again to see if network is up
sleep 1
done
xsetbg NetworkNowUp.png
##The URL below is a "test to see if you can connect to a conference" link
chromium --incognito --app=https://www3.gotomeeting.com/join/406552062 &
x0vncserver -display :0 -passwordfile /home/tech/.vnc/passwd &
exec openbox-session

If you have any questions or comments, you can leave them at either

http://hackerpublicradio.org/eps.php?id=1989

or on my own blog right here (https://hpr.dogphilosophy.net)

CC BY-SA 4.0
HPR1989: WDTV Makes Me Itch (Enhanced Edition) by Epicanis is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Leave a Comment

Bad Behavior has blocked 144 access attempts in the last 7 days.