0

I am trying to understand the concept of virtual terminals in unix and I am not able to figure out the need of terminal emulator and concept of virtual consoles clearly.

I was going through a video lecture on youtube and the lecturer says that now a days we do not have a terminal as we have full fledged setup of monitor, keyboard and mouse. Why we can not consider them as terminal ? According to the definition of a terminal, it is a set of hardware used to communicate with processes. Then why the author says that we do not have terminals now a days ?

Why do we need terminal emulator ? Lecturer says that the terminal emulator sits between "x window system server" and the processes talk to the output devices using terminal emulator. But in case of GUI processes talk directly to "x window system server" which in term communicates with device drivers for stdin/stdout. But why do we need terminal emulator in case processes are capable to talking to "x window server" directly. Is it the case that for "x window server" does not support CLI and for command line interaction, terminal emulator acts as an adapter between process and "x window server" ?

EDIT:-

I went through the answer below and some other resources and here is what I got. Display can work in both character mode as well as APA mode. When we use command line interface, the system expects terminal character device files for I/O. Now when we are already running a GUI which means we have display in non character mode, and we open up a CLI, that session expects a terminal character file to communicate, which is not there. So, we need terminal emulators which creates pseudo terminal character files and also communicates with x-window-server and acts like an adapter.
Kernel also have some device specific actual terminal character files which come into play when we connect it to any display using text mode. When we are using GUI there is no need of terminal character files.

Is the correct or I have got it wrong ?

  • 1
    When you say "Author says", please mention the book and the author with the chapter. When you say "According to the definition of a terminal", please provide the source of this definition. Is it a book? Wikipedia? Your lecturer's definition? Some random website? Or was it a voice you heard emanating from the Heavens? – 7_R3X Oct 09 '18 at 04:32
  • @7_R3X Added sources – Krrish Raj Oct 09 '18 at 04:39
  • @muru The question is whats the need rather than what it is. – jdwolf Oct 09 '18 at 05:32
  • @jdwolf I think the question is predicated on a hazy understanding of what the terms mean. – muru Oct 09 '18 at 05:39
  • 1
    @muru Yes and I think that vagueness comes from people not knowing the historical significance of terminals in computing. Hints the why rather than the what. – jdwolf Oct 09 '18 at 05:41
  • @jdwolf and Gilles's answer there covers "historical significance". – muru Oct 09 '18 at 05:43
  • @muru I feel its more an etymology rather than an explanation. – jdwolf Oct 09 '18 at 05:50

1 Answers1

1

Unix-like operating systems were designed for time sharing environments which used terminals and terminal protocols to talk to processes running on those systems.

In modern Unix-like systems simply both the process and its terminal are running on the same system. Therefor a terminal emulator acts like a physical terminal running in software and then talks to a process.

There are practical reasons for keeping that system around including maintaining POSIX compatibility as well it is just a convenient form of inter process communication.

jdwolf
  • 5,017
  • 1
    and systems are still compatibles with physical terminals of course.... using serial ports & usb ports with cable adapter. – francois P Oct 09 '18 at 06:26
  • So when I open a terminal in my ubuntu, basically it is simulating a physical terminal in software, and we are maintaining it for backward compatibility ? Also when you say that it helps in IPC, it is about pipes or something else ? – Krrish Raj Oct 10 '18 at 07:01