0

I am currently trying to make an autonomous drone using the Robot Operating System (ROS). To do this, I have installed Raspbian Lite (Jessie) on a Raspberry Pi 3 and am currently using ROS Kinetic on it. Because it is Raspbian Lite, there were no window managers or desktop environments that came along with the installation. I decided to go with Openbox Window Manager and installed a terminal onto it for convenience. I can just call sudo startx, and the window manager opens up, which can be accessed by Ctrl + alt + F2`.

Now my question lies in the fact that I do not understand the process of creating new sessions within the system wide terminal. Is it called the system wide terminal to start with? What are these sessions, that I am invoking with the use of Ctrl+ Shift+ F? Some of them accommodate display managers and some of them accommodate terminals, while I imagine, that a whole desktop environment can be accommodated too. Is there a man page that I can look into?

5

They are kernel virtual terminal devices, multiplexed onto the physical framebuffer and human-input devices by a terminal emulator program that is built into the kernel itself. To applications programs running on top of the kernel, they look like any other terminal devices, such as a serial terminal device. (They have a line discipline, but no modem control.)

The system implements terminal login by dint of running a getty program (or equivalent) and a login program that accept user credentials and invoke login sessions.

The X server program also needs to use the physical framebuffer and human-input devices. It needs to negotiate sharing them with the kernel terminal emulator. It does so by allocating one virtual terminal and telling the kernel to disconnect that from the kernel terminal emulator.

Hence why it appears that the X server "runs" on a particular terminal. When the kernel terminal emulator sees the hotkey chord for switching to the allocated virtual terminal, it cedes control of the framebuffer and human-input devices to to the X server. When the X server sees the hotkey chord for switching to another virtual terminal, the X server cedes control back.

These hotkey chords are not necessarily symmetrical. On one of my systems the hotkey chord implemented by the kernel terminal emulation program for switching to virtual terminal #2 is Alt+F2 whereas the hotkey chord implemented by the X server for the same action is Ctrl+Alt+F2.

When it comes to graphical login, a display manager handles starting up X servers with greeter programs. You're just starting an X server directly and not using a display manager, of course. Once the user credentials have been authenticated, a desktop manager displays a desktop environment, which comprises a set of X client applications of varying degrees of complexity. For complex desktop environments, there is a whole bunch of server programs interconnected via a desktop bus. (On one of my systems, the so-called "small and lightweight" GNOME Editor requires a D-BUS broker and nine other server programs to be running.)

Some of those X client programs can be other terminal emulators, userspace ones, such as LXTerminal, Unicode RXVT, GNOME Terminal, Terminate, roxterm, evilvte, xterm, and so forth. These do not directly use physical framebuffer and human-input devices, and they make use of pseudo-terminal devices.

Further reading

1

The system is initialized either with the old SysVinit or with the new systemd. Depending on your distro.

On SysVinit are runlevels. Simply type runlevel in a terminal to get the number

  • 0 Power Off
  • 1/S Single User Mode (..to keep it simple)
  • 2 Multi User Text (Debian based default)
  • 3 Multi User Text (Red Hat based default)
  • 4 -
  • 5 Multi User + GUI
  • 6 Reboot

On systemd things are different. You get a unknown or error when typing runlevel

systemctl list-units --type=target

prints a list of targets like:

  • graphical.target
  • multi-user.target
  • ...

On runlevel 2 or without graphical.target

you just have the text console. You can switch between terminal sessions by pressing CTRL+F[1-7]

On runlevel 5 or graphical.target

OpenBox, KDE whatever is beeing started (see ~/.xinitrc I guess), based on X11/Xorg/Wayland/Mir whatever and hotkeys are mappend differently. Ctrl + Alt + F2 by default brings you to tty2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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