Skip to main content

Demystify - Linux GUI


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 lie
in linux the X.org is the defacto of Display manger.

which has two components
  • X Server 
  • X Client
Here little twist server talks to the client ( opposite of client-server architecture )
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,widgets
few 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

Popular posts from this blog

Docker

Docker is used to run software packages called "containers". Containers are isolated from each other and bundle their own tools, libraries and configuration files; they can communicate with each other through well-defined channels                                                                                                --Wikipedia  I have already written a article about the containers you can check out in here https://thangaayyanar.blogspot.com/2018/06/containers.html This time, let's learn more about docker engine how we can use this. The important things we need to know in docker are Docker Image:  The container can be created with the help of Image. The Image file consists of code, libraries, environment variable...

BlockChain

As the name says chain of block Now what is a block?       A block typically contains a  cryptographic hash of the previous block,  a timestamp transaction data    Where it is used?      It is the backbone of cryptocurrency i.e it ensure the security and integrity of data. The usage doesn't stop here well blockchain are resistant to modification of the data. so it can used in Bank Identity verification Hospital records and much more   How it ensures security and integrity of data? Block added to the chain, contain the hash ( result obtained from hash algorithm such as MD5,SHA) of the previous block so changes in one block lead to mismatch. Proof of work algorithm - Adding a node in the block chain require validation whether the new block is valid or not which is done my miner if they find the valid hash they will be rewarded How to do one?      The most interesting part ...

My experience in iOS Hackathon

This is my second hackathon, my first hackathon was on machine learning if you want to check out that article by following the below link https://thangaayyanar.blogspot.com/2018/02/what-i-learned-from-machine-learning.html So let's get started First let us discuss about the idea of what we are trying to achieve in this hackathon. From the above image you can able to know that we are going to recognize text from the image and use it to do find which field it is.  we separated this idea into three modules Identify the region Recognize the text  Field classification Module I : Identify the region To identify the selected region we used Vision framework ( ML framework provided by apple to detect the object ). The vision framework give us the boundary of the text region ( i.e frame - x,y,width,height ).  Then using the above region we crop the selected region and pass it to the next module. Module II : Recognize the text To recognize the text we ...