# Ultra light mediacenter with alpinelinux and ranger in tty 2023-07-30T14:52:18Z I don't own a TV, and don't want to, for reasons. I'd rather use a projector on my wall to watch a show or a movie I choosed. To do so, I used to turn an old computer in a mediacenter. I copy on it my movies with ssh, or plug a USB drive to watch it. Until now, I was using OpenBSD, but I found out that high resolution media (1080p) were slow on some scenes. Today, I installed alpine linux instead and want to tell about it. No X session, no desktop. At boot, my user is automatically logged in and ranger display a list of files with a nice preview. So, how? First, install alpinelinux. Easy with ''setup-alpine''. Add some packages : ``` # apk add mpv ranger w3m w3m-image ffmpegthumbnailer file ``` Enable sound: => https://wiki.alpinelinux.org/wiki/ALSA Configure mpv: ``` mkdir -p ~/.config/mpv cat << EOF >> ~/.config/mpv/mpv.conf alang=en,fr slang=fr,en save-position-on-quit=yes fullscreen=yes EOF ``` Configure ranger: ``` ranger --copy-config all ``` Enable image preview in .config/ranger/rc.conf: ``` set preview_images true set colorscheme snow ``` Uncomment video preview in .config/ranger/scope.sh: ``` video/*) # Thumbnail ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" exit 1;; ``` Open ranger in the video directory when "watcher" user is logged in: ``` echo "ranger ~/videos" > .profile ``` At boot, log watcher user in automatically. Edit /etc/inittab: ``` tty1::respawn:/bin/login -f watcher ``` Reboot. Enjoy. Press power button briefly to turn off. => https://alpinelinux.org/ => https://github.com/ranger/ranger => https://mpv.io/ UPDATE: Set a nice font for subtitles ``` mkdir -p ~/.config/mpv cat << EOF >> ~/.config/mpv/mpv.conf alang=en,fr slang=fr,fre,en save-position-on-quit=yes fullscreen=yes sub-font="Roboto" sub-auto=fuzzy EOF ``` ``` apk add font-roboto font-terminus font-dejavu font-noto font-noto-cjk font-noto-extra terminus-font ``` Increase console font size: ``` vi /etc/conf.d/consolefont consolefont="ter-132n.psf.gz" rc-update add consolefont boot ``` UPDATE 2: mpv needs some xorg files: ``` setup-xorg-base ``` --- Comment to: => mailto:bla@bla.si3t.ch?subject=light-mediacenter-with-alpine Instructions for comments: => https://si3t.ch/log/_commentaires_.txt