1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Working principle of a Desktop environment

Discussion in 'Embedded' started by piyushpandey, Mar 6, 2013.

  1. piyushpandey

    piyushpandey Guest

    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/Desktop_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
     
    piyushpandey, Mar 6, 2013
    #1
    1. Advertising

  2. piyushpandey

    Weland Guest


    > 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
     
    Weland, Mar 6, 2013
    #2
    1. Advertising

  3. 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
     
    Alexey Galakhov, Mar 6, 2013
    #3
  4. piyushpandey

    piyushpandey Guest

    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
     
    piyushpandey, Mar 6, 2013
    #4
  5. 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
     
    Alexey Galakhov, Mar 7, 2013
    #5
  6. On 2013-03-07, Alexey Galakhov <> 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
     
    Grant Edwards, Mar 7, 2013
    #6
  7. In article <khaav4$mm8$>, d
    says...
    >
    > On 2013-03-07, Alexey Galakhov <> 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
     
    Mark Borgerson, Mar 7, 2013
    #7
  8. Mark Borgerson <> writes:

    > In article <khaav4$mm8$>, d
    > says...
    >>
    >> On 2013-03-07, Alexey Galakhov <> 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
     
    John Devereux, Mar 7, 2013
    #8
  9. On 2013-03-07, Mark Borgerson <> wrote:
    > In article <khaav4$mm8$>, d
    > says...
    >>
    >> On 2013-03-07, Alexey Galakhov <> 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!!
     
    Grant Edwards, Mar 7, 2013
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dmoore
    Replies:
    0
    Views:
    254
    dmoore
    Nov 17, 2005
  2. dmoore
    Replies:
    0
    Views:
    236
    dmoore
    Nov 17, 2005
  3. No1
    Replies:
    0
    Views:
    224
  4. No1
    Replies:
    1
    Views:
    215
    FreeRTOS.org
    Nov 7, 2007
  5. Replies:
    0
    Views:
    204
Loading...

Share This Page