Motherboard Forums


Reply
Thread Tools Display Modes

Working principle of a Desktop environment

 
 
piyushpandey
Guest
Posts: n/a
 
      03-06-2013, 05:28 AM
Hi guys

You guys have been always a great help to me.

Today I am posting or you can say asking something very unusual.

till now you guys have met people asking that questions about Linux an
it's development either in normal way or in embedded field.

But I am not going to ask this as there are lots of stuff out there o
google and others.


What I want to ask is that the working principle of the Deskto
environment, i.e. how it works and how it is laid over the Linux I mean th
way we run our applications over linux kernel just by installing the kerne
and providing a rootfs to it we are able to talk to the kernel with th
terminal or command line.

But this time I want to know that how the GUI layer is laid over the Linu
kernel.

I do a couple of hours search but found nothing very much informativ
except this link.

https://wiki.archlinux.org/index.php...op_Environment

It's very informative, but I want more information as deep as it would b
so that I would be able to get each and every bit of understanding of it.

All you guys are expert , So I though rather than wasting my time i
googling and searching in wrong direction I opt for you people support t
guide me in write direction.

Just give me hint that how to search for this matter on google, any specia
links if you have regarding that please do share with me and also any kin
of article or book is there please provide me link.


I hope that you guys would not mind I just want a kick start that's i
and nothing else. So please give me support in this regard and I am hopin
support from all specialists visiting this post.



Thanks and Regards.

---------------------------------------
Posted through http://www.EmbeddedRelated.com
 
Reply With Quote
 
 
 
 
Weland
Guest
Posts: n/a
 
      03-06-2013, 03:16 PM

> But this time I want to know that how the GUI layer is laid over the Linux
> kernel.


You should start by learning about the X11 server and what a window
manager is. It's a fairly good start.

--
Weland Treebark,
Wandering Philosopher and Engineer

 
Reply With Quote
 
 
 
 
Alexey Galakhov
Guest
Posts: n/a
 
      03-06-2013, 05:55 PM
On 03/06/2013 11:28 AM, piyushpandey wrote:

> But this time I want to know that how the GUI layer is laid over the Linux
> kernel.


The bird's eye view is as follow.


An X server (X11) runs on top of the Linux kernel. It grabs the whole
display and listens to unix domain socket and/or TCP/IP for the
connections. (There are alternatives, I'll tell you later).

The software uses some kind of GUI toolkit library (GTK+, Qt, E17 etc.)
to draw its widgets. The toolkit library is a wrapper on top of
low-level graphics API, X11 protocol. The X11 protocol library connects
to X server via the socket. If the connection is done locally, the
socket connection is usually immediately upgraded to faster shared
memory connection.

Each toolkit library has its own high level rendering engine. Qt has
everything built-in. GTK+ uses Cairo for vector graphics and Pango for
font rendering, and Pango uses Freetype.

Most toolkits are able to use OpenGL and/or OpenVG if available. The
OpenGL is forwarded to the X server (so-called GLX).

Window decorations (window manager), toolbars etc. are separate programs
that communicate with each other by means of the X server. The X server
itself just splits the screen into overlapping rectangles where the
clients could draw their images.


Alternatives to X11:
Wayland/Weston is proposed to replace X11.
A full-screen program on an embedded system may use kernel framebuffer
and/or OpenGL directly or via DirectFB library. Qt has an option for that.

There are toolkit-independent wrappers around simple 2D/3D graphics (no
widgets), i.e. SDL. SDL is able to work fullscreen without X. There are
cross-platform widget library wrappers like wxWidgets if you want to
write the same code for Windows and Linux.

Regards,
Alex
 
Reply With Quote
 
piyushpandey
Guest
Posts: n/a
 
      03-06-2013, 06:32 PM
Hi that's a very good explanation from Alex.

I think wanderer is right that I should start from the X11 and window
manager

if I stuck anywhere I will ask you guys.


Thanks a lot Alex and wandere.


Meanwhile this is for you Alex , do you have good collections or link
about this topic if yes please do share it with me.


Thanks again.

---------------------------------------
Posted through http://www.EmbeddedRelated.com
 
Reply With Quote
 
Alexey Galakhov
Guest
Posts: n/a
 
      03-07-2013, 02:16 PM
On 03/07/2013 12:32 AM, piyushpandey wrote:
> Meanwhile this is for you Alex , do you have good collections or links
> about this topic if yes please do share it with me.


Unfortunately I don't have one. I would recommend you the "Linux from
Scratch" book that describes the build process of everything. All the
dependencies between the components are explained here.

http://www.linuxfromscratch.org/

The X11 is the most widely used technology. It is however considered
outdated by many people, and all modern GUI libraries use only about 10%
of X11 functions, replacing everything else with their own more
effective solutions. That's why Wayland was created - like "X11 without
unused obsolete stuff". If you're building an embedded system from
scratch, consider learning Wayland too.

Qt Embedded may be the easy way to build GUI without X. But I don't like
it due to the way how it is made. For really very simple drawings just
use Cairo on top of fbdev, it is very easy to do but very limited.
OpenGL (ES) is very easy without X too.

Regards,
Alex
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      03-07-2013, 03:15 PM
On 2013-03-07, Alexey Galakhov <(E-Mail Removed)> wrote:

> The X11 is the most widely used technology. It is however considered
> outdated by many people, and all modern GUI libraries use only about
> 10% of X11 functions, replacing everything else with their own more
> effective solutions.


That's why "modern" X11 applications can't be run remotely the way
older X11 applications can be. One of the things that modern GUI
libraries are "effective" at is creating tens of thousands of extra
network transactions that will stop an application dead in its tracks
if you try to use a link slower than 100Mbps.

--
Grant Edwards grant.b.edwards Yow! Are you mentally here
at at Pizza Hut??
gmail.com
 
Reply With Quote
 
Mark Borgerson
Guest
Posts: n/a
 
      03-07-2013, 03:31 PM
In article <khaav4$mm8$(E-Mail Removed)>, (E-Mail Removed)d
says...
>
> On 2013-03-07, Alexey Galakhov <(E-Mail Removed)> wrote:
>
> > The X11 is the most widely used technology. It is however considered
> > outdated by many people, and all modern GUI libraries use only about
> > 10% of X11 functions, replacing everything else with their own more
> > effective solutions.

>
> That's why "modern" X11 applications can't be run remotely the way
> older X11 applications can be. One of the things that modern GUI
> libraries are "effective" at is creating tens of thousands of extra
> network transactions that will stop an application dead in its tracks
> if you try to use a link slower than 100Mbps.


I'm a bit puzzled here. The OP is asking about a desktop GUI. I don't
see how the external network speed should affect transfers to and
from the X11 server. Do those transactions actually go in and out
of the physical network interface? That would certainly be useful
for a remote desktop, but is it actually done for the desktop on
a single system?


Mark Borgerson


 
Reply With Quote
 
John Devereux
Guest
Posts: n/a
 
      03-07-2013, 03:50 PM
Mark Borgerson <(E-Mail Removed)> writes:

> In article <khaav4$mm8$(E-Mail Removed)>, (E-Mail Removed)d
> says...
>>
>> On 2013-03-07, Alexey Galakhov <(E-Mail Removed)> wrote:
>>
>> > The X11 is the most widely used technology. It is however considered
>> > outdated by many people, and all modern GUI libraries use only about
>> > 10% of X11 functions, replacing everything else with their own more
>> > effective solutions.

>>
>> That's why "modern" X11 applications can't be run remotely the way
>> older X11 applications can be. One of the things that modern GUI
>> libraries are "effective" at is creating tens of thousands of extra
>> network transactions that will stop an application dead in its tracks
>> if you try to use a link slower than 100Mbps.

>
> I'm a bit puzzled here. The OP is asking about a desktop GUI. I don't
> see how the external network speed should affect transfers to and
> from the X11 server. Do those transactions actually go in and out
> of the physical network interface? That would certainly be useful
> for a remote desktop, but is it actually done for the desktop on
> a single system?


No of course not, not when the X server is the same machine as the X
client.

X has the advantage that everything still works the same as before when
they are *not* the same machine - when you are running applications
remotely, with the physical display (x server) on a separate machine
from the application (x client). But modern GUIs can be very slow when
run like that on a network, due to latencies of all the transactions
involved. Much slower than you would think just from looking at the
bandwidth.


--

John Devereux
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      03-07-2013, 07:51 PM
On 2013-03-07, Mark Borgerson <(E-Mail Removed)> wrote:
> In article <khaav4$mm8$(E-Mail Removed)>, (E-Mail Removed)d
> says...
>>
>> On 2013-03-07, Alexey Galakhov <(E-Mail Removed)> wrote:
>>
>> > The X11 is the most widely used technology. It is however considered
>> > outdated by many people, and all modern GUI libraries use only about
>> > 10% of X11 functions, replacing everything else with their own more
>> > effective solutions.

>>
>> That's why "modern" X11 applications can't be run remotely the way
>> older X11 applications can be. One of the things that modern GUI
>> libraries are "effective" at is creating tens of thousands of extra
>> network transactions that will stop an application dead in its tracks
>> if you try to use a link slower than 100Mbps.

>
> I'm a bit puzzled here. The OP is asking about a desktop GUI. I don't
> see how the external network speed should affect transfers to and
> from the X11 server. Do those transactions actually go in and out
> of the physical network interface?


On a typical desktop, they don't go through a physical network
interface (no Ethernet packets are sent down twisted-pair). However,
they _do_ go through network sockets, and the X11 system was designed
to be transport-agnostic so that it would work the same if the
server<->client connection was a Unix-domain socket or a TCP/IP
connection via Ethernet, DSL, PPP, SLIP or whatever.

> That would certainly be useful for a remote desktop, but is it
> actually done for the desktop on a single system?


Usually an actual Unix-domain stream socket is used, but it's all
handled locally by the OS.

NB: There are some X11 extension that can allocate a local shared
memory segment that is then used for communications between client
and server. I think this is typically done for things like video
playback.

--
Grant Edwards grant.b.edwards Yow! I'm GLAD I
at remembered to XEROX all
gmail.com my UNDERSHIRTS!!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a revolutionary principle > please read that No1 Embedded 1 11-07-2007 12:18 PM
a revolutionary principle > please read that No1 Dell 0 11-07-2007 11:14 AM
Desktop Support Position for MAC Environment mczarnowski@ensynch.com Apple 0 12-28-2005 07:40 PM
Principle SW Design Engineer Any of C, Assy, UNIX Kernel, Compiler dmoore Embedded 0 11-17-2005 10:11 PM
Principle SW Design Engineer Any of C, Assy, UNIX Kernel, Compiler dmoore Embedded 0 11-17-2005 10:11 PM


All times are GMT. The time now is 11:55 PM.


Welcome!
Welcome to Motherboard Point
 

Advertisment