Is it possible to access to the framebuffer in order to put a pixel on the screen from the command line?
yes, outside X-server, in tty, try command:
cat /dev/urandom >/dev/fb0
if colourfull pixels fills the screen, then your setup is ok, and you can try playing with this small script:
#!/usr/bin/env bash
fbdev=/dev/fb0 ; width=1280 ; bpp=4
color="\x00\x00\xFF\x00" #red colored
function pixel()
{ xx=$1 ; yy=$2
printf "$color" | dd bs=$bpp seek=$(($yy * $width + $xx)) \
of=$fbdev &>/dev/null
}
x=0 ; y=0 ; clear
for i in {1..500}; do
pixel $((x++)) $((y++))
done
where function 'pixel' should be an answer... write a pixel to screen by changing byte values (blue-green-red-alpha) on x-y offset of device /dev/fbX which is frame buffer for the video-card.
or try one liner pixel draw (yellow on x:y=200:100, if width is 1024):
printf "\x00\xFF\xFF\x00" | dd bs=4 seek=$((100 * 1024 + 200)) >/dev/fb0
UPDATE: this code works even inside X-server, if we just configure X to use frame buffer. by specifying fb0 inside /usr/share/X11/xorg.conf.d/99-fbdev.conf