Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 its w3m-img package). Executed from outside byobu (in tty1), though only if preceded by sudo, it displays web pages with images loaded as expected. However, if byobu is enabled (and thus my terminal is no longer identified as tty1, but rather as dev/pts/1), there's no way to get w3m to display images (no matter if I launch it with sudo or not).

The same applies to the fbi image viewer. Outside of byobu (but again, only if I launch it with sudo), it works without any problems. With byobu enabled, it instead produces an error message, the relevant bit of which seems to be

ioctl 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 the sudo requirement I mentioned seems to indicate).

Thanks in advance for any help with this!

share|improve this question
    
Have you tried adding yourself to the video group? –  B1KMusic Jan 27 at 19:18

2 Answers 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

share|improve this answer
    
I know there's a command for doing this, but I can never remember it, haha. –  B1KMusic Jan 27 at 19:43

As B1KMusic said in his answer, 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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.