Why can DOS run graphical games without a desktop, while Linux seemingly can’t?

0
2
Asked By MellowCedar27 On

I'm using Debian without a graphical desktop environment and mainly work from a text-only virtual console. Since DOS also presented a text interface, I'm wondering why older DOS games could switch to graphics and take over the display, while many Linux graphical applications seem to require X11, Wayland, or a desktop environment. Can Linux run graphical games directly from a console, and what makes the two systems different?

4 Answers

Answered By LunarPine53 On

A desktop environment is not the same thing as the graphics system. A desktop is a collection of panels, menus, settings tools, and other applications. X11 or Wayland provide a way for graphical programs to communicate with a display server, and a window manager handles windows. You can install and run those components without installing a complete desktop environment, or bypass them entirely with a framebuffer/DRM-based application.

Answered By SilverHawk19 On

If you are connected through a normal SSH session, your terminal is usually text-only, so a remote graphical program has nowhere to draw locally. Graphics can still be sent through a suitable display-forwarding system, or a program can render an approximation using terminal characters. That is separate from whether the Linux machine itself can display graphics from a local virtual console.

Answered By CopperFalcon6 On

DOS games generally assumed a single-user x86 computer and often accessed predictable VGA hardware directly, or used BIOS video services. DOS did little to isolate programs from the hardware, so a game could change the video mode and write directly to video memory. Modern Linux supports many kinds of hardware, multiple processes, permissions, and multitasking, so applications normally use standardized graphics interfaces instead of taking over the GPU themselves.

Answered By BrightOtter42 On

Linux can run graphics without a full desktop environment, and even without X11 or Wayland. Programs can use the kernel’s framebuffer or the newer DRM/KMS interfaces to access the display. Libraries such as SDL can use those backends, and some games or emulators are designed to run directly on a virtual terminal. The main difference is that this access is mediated by the kernel and usually requires the right permissions, rather than letting every application freely control the hardware.

QuietMaple88 -

A simple framebuffer program can be a useful way to learn how this works, although most applications use SDL or another library instead of implementing the graphics setup themselves.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.