Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hello This is a general newbie question about using a GUI on Linux: If I got it right, all graphical applications in Linux ultimately call the X server to display ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Nov 2007
    Posts
    127

    Question GUI without X?


    Hello

    This is a general newbie question about using a GUI on Linux: If I got it right, all graphical applications in Linux ultimately call the X server to display output on the screen, even on the local host.

    Isn't there a performance penalty to go through a local server application to write output instead of just writing to the video card?

    Can Linux GUI apps run without an X server?

    Thank you.

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,167
    I don't know if existing apps will, but it is certainly possible to write Xlib- or gtk-based apps that run in the kernel's framebuffer and therefore don't need X. Here's an example.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    A more active project would be DirectFB. It has a couple of ported applications and there is even an official backend for it in GTK.

    Isn't there a performance penalty to go through a local server application to write output instead of just writing to the video card?
    That's right. Even though the performance loss due to the routing in X is not that big. The reason for X to feel so sluggish has more to do with its limited set of native drawing operations. For example, there is no common set of decorations for windows and borders. You need additional toolkits for that. This "assume nothing"-approach gives much flexibility but makes it harder to accelerate drawing operations smartly.

    If I got it right, all graphical applications in Linux ultimately call the X server to display output on the screen, even on the local host.
    There are some mechanisms in place that allow bypassing the server. For example DRI for OpenGL.
    Debian GNU/Linux -- You know you want it.

  4. #4
    Linux Newbie
    Join Date
    Nov 2007
    Posts
    127
    Thanks guys for the infos.

  5. #5
    Linux User twoHats's Avatar
    Join Date
    Jan 2005
    Location
    NH, USA
    Posts
    280

    efficiency not that easy...

    Trying to determine the efficiency of a particular software architecture is not that easy for an expert, much less someone just wondering ..."Hmmm? could this be more efficient?".

    Usually, software is made from a lot of interconnecting modules, and to look at one and say "is this a good idea?" usually won't work without looking at (perhaps many) others. Also one must have some idea of an alternative architecture in mind to be able to make any judgment at all.

    In other words, the answer to your question is ...

    It's Complicated!
    - Clouds don't crash - Bertrand Meyer

    registered Linux user 393557

    finally - hw to brag about - but next year it will look pitifully quaint:
    Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
    circa 2006

  6. #6
    Linux Newbie
    Join Date
    Nov 2007
    Posts
    127
    Thanks for the input.

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    One of the contributing factors to the perceived performance issues of X-Windows is that it is a very verbose message-based architecture, designed so that applications that run on one system can be displayed easily on another machine across the network. There are other windowing systems that do not support (easily) remote output, and are generally much smaller and faster - more suited to embedded applications. One good example is the QNX Photon windowing system that runs with the QNX Neutrino real-time operating system. It has a lot of the same capabilities as X, but is designed for local rendering in small footprint systems. As a result, it is smaller, faster, and in many situations a lot easier to program with.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #8
    Linux Newbie
    Join Date
    Nov 2007
    Posts
    127
    Thanks. It's just that users of desktop Linux have no need for remote display, so I was wondering if it were possible to bypass X and have the OS write contents directly to the video card instead.

    Another issue I've had with all Linux distros, is that, on the exact same hardware, the fonts look blurry, not as sharp as compared to Windows. I don't know if this is due to X or that the open-source fonts don't work the same way.

  9. #9
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    155
    Quote Originally Posted by littlebigman View Post
    Thanks. It's just that users of desktop Linux have no need for remote display
    That assumption is far from correct. There are many installations of Linux whose primary purpose is to support X for running applications on other hosts. It's one of the real strengths of X over local-only display. I personally cannot imagine going back to any local-only displays. Even Windows users adopt this paradigm occasionally; remote-desktop.

    There may be efficiencies to be gained by eliminating part of the the X layer, however X itself has some built-in efficiencies for this reason. The Direct Rendering Interface in particular provides for very efficient access to video hardware. There are other accelerating interfaces, as well.

    --- rod.
    Stuff happens. Then stays happened.

  10. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    Ditto to what Nbomr said. In any case, you can't just write to video memory any longer with today's video hardware unless you want to be stuck in VGA resolution at best (640x480). My phone does better than that... In any case, there IS a standard set of API's that all modern video hardware supports that provides better resolution than VGA. It's called VESA. However, it is sort of a lowest-common-denominator interface that is only used when better drivers are not available for your particular hardware. So, you COULD write your applications to use the VESA API's directly, but you still have to do all of your own font rendering, window management, etc. Trust me as an engineer who has done this at the most fundamental level, you REALLY don't want to!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •