That command does not work because the redirection is performed by the shell which does not have the permission to write to /dev/fb0. The redirection of the output is not performed by sudo.
It’s quite funny that person who don’t know how shell and sudo (nb: use doas or su instead) tells us a lengthy story about writing to framebuffers in Linux
That command does not work because the redirection is performed by the shell which does not have the permission to write to /dev/fb0. The redirection of the output is not performed by sudo.
How to do it here
You can use
teeas well:It’s quite funny that person who don’t know how shell and
sudo(nb: usedoasorsuinstead) tells us a lengthy story about writing to framebuffers in LinuxThe frame buffer is arguably a lot simpler than a *nix shell
You better don’t, it’s vulnerable to the ages-old TIOCSTI trick::
(in
.bashrcor so)This can be deterred by using
su -P, but it’s marked as experimental (according to the manpage), and I haven’t seen anyone using it.more info here, as I haven’t heard of it previously https://ruderich.org/simon/notes/su-sudo-from-root-tty-hijacking
This probably works for the author if they’re in the
videogroup:EDIT: I’m stupid, didn’t see that part of the article.
Related self-plug: https://cmcenroe.me/2018/01/30/fbclock.html
Forgot to read your write-up when you posted it originally. Thanks for the reminder, it’s great stuff.