On Sat, 8 Sep 2001, Clarence Verge wrote:

> The bottom-most level is the video driver - part of SVGAlib or some
> other.  It is the hardware-specific interface.
> 
> Next is "X". What it does is beyond me right now. :-(  Xconfig allows
> you to select the proper video driver and the resolution(s) and color
> depths you wish to run in, as well as configuring your mouse I think,
> and selecting a "window" manager.

  svgalib is what allows graphical programs to run 
in the console.  It has its own drivers, and is
completely unrelated to X.

  "X Window System" has its own video drivers, and 
more than simply being a graphical hardware interface, 
is also a graphical server.  
  X listens on port 6000 for requests for graphical
service, and then answers those requests.  It's
just like when I point my browser to http://localhost
and Apache answers my request for a web page.

  To draw the analogy out farther, if our machines were 
set up correctly, we could both view the output of my
X server (or yours).  Everything I see on my screen, 
you could see on your screen (assuming you're using the 
same window manager I am, just as with the http analogy, 
we see *exactly* the same thing only if we're using the 
same browser)

> The window manager seems to be most important in the user interface
> arena, controlling the general appearance of your screen and providing
> menus and application launching.

  As it pertains to the "windows" aspect, yes.
  When you click on open desktop, the menus and behavior
you get there are determined by the window manager.
The number, look, and function of buttons on the
title bar are also controlled by the window manager.

  X itself can control many functions.  Next time you 
have X up, put your cursor over an xterm.  Now, hit
CTRL-left-click, CTRL-right-click, CTRL-middle-click.
These options are available to any xterm or xterm-based
app (such as PINE) no matter what window manager (if any)
you're using.  These options are all written into xterm,
but are made available via X.  Feel free to play with 
them, as they apply only to that single xterm.  If you
really mess it up, kill it off and start another. ;-)
 
> The application is last, even tho IT is what you were after in the first
> place.  Whether Netscape looks like Netscape intended or something else
> is my first question.
> What sets the appearance of the buttons ?  Netscape, the wm or X ?
> My Netscape included with RH5.? is ver 4.6 (or 4.06) and it looks
> like hell. How do I make the buttons look like buttons instead of
> flat squares ? (I don't use icons)

  Here's a screenshot of Netscape 3.04 taken from 
9wm, which has no title bars or title bar buttons.
http://wizard.dyndns.org/9wm_ns3.png
This is the same way it would appear without any
wm at all, so you can see, it's the wm which controls
the look of your buttons.
  Now here's a screenshot of the exact same browser,
but taken from icewm (infidel2 theme, overloaded style)
http://wizard.dyndns.org/ice_ns3.png

  Buttons and so-forth are controlled by the wm, and/or
its various "themes," "styles," or "looks."
You can see this icewm title bar is completely different
than those from the other screenshot I put up, um...
http://wizard.dyndns.org/screenshot_icewm2.png
 
> Next, what decides how much screen Netscape will occupy the next
> time I turn it on ? I can see that most X users like a mess of 
> little windows all over the place but I don't. I want to use the
> ENTIRE screen for the ONE application on which I am focussing my
> attention.  Every time I start Netscape it seems to only occupy
> 60% of the available area, and there is no way (except manual
> stretching) to make it go fullscreen.

  Depends on your configuration.  Try <CTRL><ALT><->
(keypad "minus" not the number-row-minus) and see
if that doesn't "zoom" things in for you.  :-)
  To change the actual size in pixels, you can use
the geometry option.

$ netscape -geometry =400x320+10+20
will put a 400x320 sized netscape at 10 pixels from
the left edge and 20 pixels from the top edge.
Omit the offsets and it'll just go to the default
location.  This is also configurable in a config
file somewhere, but I don't recall exactly where at
the moment.

  Anyway, I have both;  many things spread out over the
1152x864 desktop, and full-screen applications.  With a
normal viewing area of 640x480, I generally set Netscape 
to 646x585.  This way, I can move my "viewport" so I see 
fullscreen web pages.
  When I run Arachne, I often do <CTRL><ALT><+> to 
switch my "viewport" (actually, screen resolution) to 
800x600 since GGI Arachne runs at that size.  Now my 
entire screen is Arachne.  Nothing more, nothing less.  
(Even though I still might have an xterm or two off the 
side and/or underneath it, they're not visible at the 
moment... but a flick of the mouse, and there they are)

> Finally, my biggest question regards X. Does it actually DO anything?

  It's what allows bitmapped graphics to be displayed
and served.  It also provides a means for control when
lacking a window manager for certain apps 
(CTRL-mouse-click on xterm).

> It seems to be sandwiched between the important bits - the drivers
> and the manager. 

  Basically, yes.  It's the transport layer between the
hardware and the user.  It looks for mouse clicks
and movements (or keyboard alternatives) and act on them.  
I guess in essense, it's really the GUI.  The wm is just 
an optional GUI enhancement, as is the Desktop Environment.  

> Finally +1, the method used by Michael which appears to allow the
> application direct interface to the drivers makes most sense to me.
> Why isn't it used more often ? 
> This is theoretical only - I haven't got it working yet. :(

  Two reasons.
  
  First is that 'nix is designed as a multi-user,
multi-tasking environment.  When svgalib directly
accesses the video hardware, it sets up the 
potential for conflicts.  You may recall that
when I first ran SVGA Arachne, I complained that
it messed up my X-server.  
  The X server allows many users to simultaneously
access graphical applications, and it handles all
the interupts and access issues, so there aren't
any "conflicts" just "sharing."
(right now steve is running fvwm2 on F9 and crow is
running icewm on F10, both using the same X server)

  I haven't tried it, but I highly doubt steve could
run Arachne on F1 with crow running Arachne on F2.
Maybe someone with more interest in console Arachne
could prove or disprove that ... ugh.  True.
Will not work!  

  Second reason is that direct hardware access is
available only to root, or those with root permissions.
A bug in a program could trash a hard drive... or 
a trojan could.
  Graphical console programs in a multi-user OS are
considered a security risk (because they must be
setuid, i.e., the program is set to run as if root
is running it, no matter who runs it).

  Accessing X requires no special permissions, so
therefore has no more potential for damage than the
user invoking it.

 - Steve


Reply via email to