I was told by a friend that the graphical system in Linux is run on TTY7. So I am wondering if all programs need a terminal (virtual terminal or pseudo-terminal) to be run on? Or can programs directly access kernel or shell?
My previous question may be similar but does not answer my current question. That question was about the relationship between a program, the kernel of the OS (any OS) and the hardware (CPU). I came to understand that for most programs running after booting the OS do need to go through the Kernel and about these differnt 'layers'. But my current question is about Linux.
From what I understand the GUI in Linux is much more loosely related to the OS than say in Windows. The GUI is a process (so an instance of a GUI shell program like GNOME?), and this is being run on TTY7. [Now I do understand terminal is a CLI and creates a shell session, and the shell takes care of executing the commands put into the terminal. GUI, like GNOME under Linux, are also shells (graphical shells), built on a windowing system, whose 'shell' session is running on the TTY7.]
So my question is: Do all programs/applications need to go through a terminal, like how the GUI shell program is running on TTY7?
[I know that starting a application, like a game or a web browser, from a terminal, locks the terminal to that application (i.e the shell session becomes the parent for the process). But when opening an application from the GUI, by mouse click, doesn't seem to open any new terminal?]
Also, why does the GUI run on a terminal (by default TTY7, or any other terminal) at all – why not run it directly?