• Post Reply Bookmark Topic Watch Topic
  • New Topic

What are Motif and X Window?  RSS feed

 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what these words mean: Motif and X Window.
Motif is the industry standard graphical user interface, (as defined by the IEEE 1295 specification. Motif is the leading user interface for the UNIX based operating system.
The X Window System is the de facto standard graphical engine for the UNIX* and Linux* operating systems.

How are these two things, Motif and X Window related to Java AWT and Swing? Are they competing technologies? Are AWT and Swing built on top of them?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you've been raised up in Microsoft Winders, it's a little hard to picture, but the way things work on UNIX is that the sofwtare that deals with putting pixels on the screen -- the entire GUI presentation engine -- is just a plain old ordinary user-space program, the "X/Windows (or just X) server." An X server provides a blank canvas onto which other software can draw by sending commands to the X server through a named pipe (locally) or a socket (remotely.) Every program with a GUI is therefore an "X client".
Window-management functions -- drawing a frame around a window, hiding windows, letting the user drag and resize a window -- are handled by yet another user-space program, an "X window manager." There are literally dozens of different window managers to choose from, and some of them differ very radically from one another. The user gets to pick one.
Anyway, the X server handles very, very low-level commands like "draw a pixel" and "draw a line" and "paint a rectangle." To use X comfortably, you usually use a toolkit of some kind that builds on top of the X service. Motif is one such toolkit. It implements buttons and scrollbars and text widgets, all in terms of the X server's facilities. It used to be the defacto standard; nowadays you don't see it very much. Now there are other, better toolkits. You may have head of GTK or Qt, for example, both very common in the Linux world (note that you can have multiple toolkits in use at once.)
The AWT has to be implemented in terms of native widgets, so it is, indeed, implemented in terms of an X toolkit, invariably Motif. That's why AWT is so god-awful ugly on UNIX systems!
Swing, which doesn't use a toolkit, just builds on java.awt.Graphics2D, which can be implemented in terms of direct calls to the X API.
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Ernest. That is exactly what I wanted to know. Thank you for your nice long explanation and your time.
I don�t need to know anymore, but I am curious. Is there only one X Windows server program for all X clients and Java VMs?
[ January 29, 2004: Message edited by: Marlene Miller ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one X server per "display", and all the programs that use a given display talk to that one X server. The most common kind of display is the obvious one: the screen you look at. There are other kinds, though, including virtual ones, "offscreen pixmap" ones, etc.
Because multiple programs all talk to the same X server, it can be used as a kind of simple interprocess communication. So, for example, the X protocol includes a clipboard, and there's a standard drag-and-drop extension (actually, unfortunately, there are several of these, incompatible with one another.)
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you again Ernest.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!