How to enable display of framebuffer images (e.g. in w3m, fbi) within byobu (pts)?
Solution 1
As Braden Best's answer says, you need to add your user to the video
group.
But you can also do it with the following command:
sudo usermod -a -G video {your username}
Log out and back in (or reboot) after doing this to see the change.
Solution 2
The framebuffer device (/dev/fb0
) is owned by user root
and group video
$ ls -l /dev/fb0
crw-rw---- 1 root video 29, 0 Jan 27 11:00 /dev/fb0
To avoid using sudo
to make programs using the framebuffer work, you would add yourself to the video
group.
First, edit the file. I'm using vim for this example, and assuming no prior knowledge of how to use it.
$ sudo vim /etc/group
While in vim, find the video line. To do that, just type /video
followed by Enter
Then, add yourself to the group by typing Shift+A followed by your username, and then save the file by typing esc followed by :wq
, and Enter
A quick restart of your shell, and you should be able to use programs like fbi
without prefixing it with sudo
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
I'm trying to run a minimal Ubuntu 13.10 installation without X Window System on my old laptop. One of the most useful tools I rely on in this setup is
byobu
; however, it seems to prevent me from using applications capable of displaying images in framebuffer.One such program is the browser
w3m
(installed with itsw3m-img
package). Executed from outsidebyobu
(intty1
), though only if preceded bysudo
, it displays web pages with images loaded as expected. However, ifbyobu
is enabled (and thus my terminal is no longer identified astty1
, but rather asdev/pts/1
), there's no way to getw3m
to display images (no matter if I launch it withsudo
or not).The same applies to the
fbi
image viewer. Outside ofbyobu
(but again, only if I launch it withsudo
), it works without any problems. Withbyobu
enabled, it instead produces an error message, the relevant bit of which seems to beioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)
As far as I understand, it all has to do something with the fact that
byobu
relies on a pseudo-terminal, and with some arcane permission settings (as thesudo
requirement I mentioned seems to indicate).Thanks in advance for any help with this!
-
Braden Best over 10 yearsI know there's a command for doing this, but I can never remember it, haha.