GUI In Linux
GUI ( Graphics User Interface ) as everyone know about. I am writing this article so that we can able to understand how to run GUI apps in containers but we need to understand how it works in linux.
Why linux?
Most of the container we use are Linux based inorder run GUI in Linux we need know how it works..
Back in early days computer fill the entire room and if you want to access it you will be presented TTY (TeleType Machine)you can still see this screen if you press CTRL + ALT + F1 in Linux. ( To get back to GUI press CTRL + ALT + F7 )
Linux spin off 8 TTY when it boots ( we can configure more or less )
Graphics in linux is handled by bunch of little programs.
They are
Display manager
Display manger which is the key component for graphics in which mainly graphics servers liein linux the X.org is the defacto of Display manger.
which has two components
- X Server
- X Client
server send and recieve data from client through X protocols
Display manager can able to draw windows in the screen but cannot able to manage window this where Window Manager comes into play
typing startx to start the basic X client from the TTY
Other than X.org there are few
- wayland
- mir
Window manager
Window manage take care of the window decoration, which manage window layouts such as tiling,tabs,stack,floating( which is what we mostly use ) and enable us to resize,move,hide,show windows.Window manager is enough to control graphics in most part.There are lot of window manager to use below are the few
- openbox
- fluxbox
- i3wm - my favourite
- dwm
- awesome
- xmonad
This is my old configuration of the i3wm. you can find the configuration file for the above image in https://github.com/ThangaAyyanar/dotfile
These window manager communicate with X server only.Window manager comes with a price - you need to configure it most of the times.
The configuration may vary from editing simple text file to writing in programming language.Funny thing is you need to set wallpaper using other programs mostly.
if your using wayland then you cannot use the above window manager directly ( we can able to run X.org on top of wayland and run window manager but it is costly ).
To make it even more simple we create a desktop environment.
Desktop environment (or) Graphical Interface
which contain window manager and other extra features such as Icons,toolbars,wallpapers,widgetsfew desktop environment are
- GNOME
- KDE
- Mate
- XFCE
- LXDE
- Budgie
- Cinnamon
This is XFCE desktop environment with little bit customization.
This is simple article to illustrate the Linux graphics. In upcoming article we will discover how we can able to run GUI from docker.
Resources:
- DotShareIt -> here you can find the different configuration for window managers and TUI apps (TUI - Terminal User Interface).
- X over SSH -> how you can forward x-server through SSH.
- Desktop Environment -> More desktop environment screenshots and concepts.
- X Protocol -> How X protocol works.
Comments
Post a Comment