10

I'm now studying what is the mechanism behind Ctrl+Alt+F1~F7.

I found some infomation talk about framebuffer, VT, and tty. I know framebuffer is an anstraction to graphic card manipulation and tty(and pts) is something a program interact with. I also find some people talking about VT(virtual terminal), but I don't know what is the relationship between them.

After searching on the web, I made a figure.

figure

I think a VT is a set of monitor and keyboard. If I want to use many tty in one set(one VT), I have to switch between ttys because I only have one monitor to show them. This is VT Swich. But what is VT actually be? A driver, a module, or something else?

I guess if I have two set of monitors and keyboards connect to my computer, I can group them to form two VTs. And I can show my tty1 in monitor1 and control it use keyboard1, and tty2 with monitor2 and keyboard2. I can do VT Switch in both VT, too. Is that true?

And I think I can view framebuffer(fbcon + fbdev) as a graphic card driver, but it is design for console, not for general purpose(proprietary drivers).

Also, there are some special files under /dev

/dev/tty* and /dev/pts/* are for tty
echo can send input to the tty, and cat can recieve output from the tty.

/dev/vcs* are for screen of VT
cat can get the text in the screen, but use it under X get all zero(not empty).

/dev/fb* are for framebuffer
cat can get the whole pixel in the screen, but use it under X get all zero(not empty). I heard that X server doesn't use framebuffer, so what does it use?

Please tell me where I am wrong.

crusy
  • 1,424
  • 2
  • 25
  • 54
Jisa
  • 101
  • 1
  • 4

1 Answers1

1
  1. Correct tty and pty are terminals. but there is small difference. pty is pseudo terminals. open a terminal type tty will return pts terminal. tty are generally physical if you have used embedded linux you can redirect linux console to different tty which are uart terminals. if you use a 9 pin uart cable. then you can use ttyX.
  2. vcs are differant screens were used pre X-Server erra. or now in server where X server( or even Wayland Server) is not installed. in run level 3 and 5. to try use CTRL + ALT + F3 to access /dev/vc3. you can echo and cat simmilarly.

  3. frame buffer is part of Graphic subsystem its not supposed to be used with cat. It is matrix. its abstraction over any screen connected. to be used by graphical drivers and applications.

Devidas
  • 2,479
  • 9
  • 24