Aunque la respuesta de Foogod no funcionó para mí, me llevó a la dirección correcta, al proporcionarme la mitad de la solución (es decir, leer datos de framebuffer, mientras fbise muestra una imagen en la pantalla TTY). Por lo tanto, le he otorgado a su respuesta la recompensa.
Bellow es un script que facilita el inicio fbtermcon una ruta parcial a la imagen como un argumento de línea de comando único
Uso
La secuencia de comandos debe guardarse en un directorio que figura en su $PATHvariable. Preferiblemente debe estar en su $HOME/bincarpeta personal . Consulte ¿Cómo agregar un directorio a la RUTA? en la explicación de cómo agregar su personal bina $PATH, pero la creación de un directorio llamado binen su directorio personal es suficiente para añadirlo a PATHen la re-entrada.
El script también debe tener permiso ejecutable; puedes configurarlo con chmod +x /path/to/script.sh.
Finalmente, debe ejecutarse con sudo, para permitir el acceso de raíz para leer y escribir /dev/fb0.
Fuente de script
También disponible en mi repositorio de Github.
#!/bin/bash
# Author : Serg Kolo
# Date: Dec 5, 2015
# Description: Script to render image and set it as background
# in conjunction with fbterm
# Depends: fbterm,fbi, awk
# Written for: /ubuntu//q/701874/295286
function printUsage
{
echo "<<< Script to set background image in TTY console"
echo "<<< Written by Serg Kolo, Dec 5 , 2015"
echo "<<< Usage: scriptName.sh /path/to/image"
echo "<<< Must be ran with root privileges, in TTY only"
echo "exiting"
}
# check if we're root, if there's at least one ARG, and it is a TTY
if [ "$(whoami)" != "root" ] || [ "$#" -eq 0 ] || [ "$( tty | awk '{gsub(/[[:digit:]]/,""); gsub(/\/dev\//,"");print}' )" != "tty" ] ;then
printUsage
exit 1
fi
# read the full path of the image
IMAGE="$( readlink -f "$@" )"
# Launch fbi with whatever image was supplied as command line arg
# then take out whatever is the data in framebuffer;
# Store that data to /tmp folder
( sleep 1; cat /dev/fb0 > /tmp/BACKGROUND.fbimg ; sleep 1; pkill fbi ) & fbi -t 2 -1 --noverbose -a "$IMAGE"
# This portion is really optional; you can comment it out
# if you choose so
echo "LAUNCH FBTERM ?(y/n)"
read ANSWER
if [ "$ANSWER" != "y" ] ; then
echo exiting
exit 1
fi
# The man page states that fbterm takes screenshot of
# what is currently in framebuffer and sets it as background
# if FBTERM_BACKGROUND_IMAGE is set to 1
# Therefore the trick is to send the framebuffer data captured
# in the last step (which will display the image on screen)
# and then launch fbterm. Note, that I send output from the command
# send to background in order to avoid the extra text displayed on
# screen. That way we have clear image in framebuffer, without
# the shell text, when we launch fbterm
export FBTERM_BACKGROUND_IMAGE=1
clear
( cat /tmp/BACKGROUND.fbimg > /dev/fb0 &) > /dev/null; sleep 0.25; fbterm
información adicional
Resulta que el usuario no necesariamente necesita usar sudo; /dev/fb0pertenece al videogrupo, por lo que los usuarios podrían agregarse a ese grupo usando
sudo usermod -a -G video $USER
Por lo tanto, las comprobaciones de raíz en el script anterior se vuelven obsoletas, específicamente [ "$(whoami)" != "root" ] ||parte.