>> On Linux, you can run it without a window manager -- then there won't
>> *be* any window controls accessible to the mouse.
> How? I must confess that I never spent much energy on trying to understand
> how X windowing really works . . . and I still find it a tad confusing.
> Normally I just run whatever X server configuration tool is at hand, and
> then run 'startx' which is configured to start the server with my
> favourite window manager (I mainly use Linux as a server OS, for samba,
> netatalk, apache, postgresql and the like, so I don't usually want a
> windowing system). Can you just start the X server by itself and the type
> xterm & and you'll have a terminal all by itself?
startx is just a script that's used to make starting up X and a bunch of
applications more convenient. It looks in the user's home directory for a
couple of different files (.xinitrc and .xserverrc) and, if it finds them,
passes them to xinit as parameters. If it doesn't find them, it has
default scripts that it uses.
xinit, in turn, simply starts up the client and server it's told to (which
can be scripts). It also has defaults for what it does (run an xterm as a
client, and X (which is generally a link to an X server program) as the
As for your example... in theory, yes. However, in practice, if you're on
the console, once you start the X server, you won't have anywhere to type
into. Under Linux and XFree, however, you could use the control-alt-Fkey
combination to get another terminal, log into it, and then start an xterm
When the client exits, xinit stops the server as well. Generally, the
"client" is a script which starts some programs in the background, then
execs a window manager (which means that when the window manager exits,
xinit will see the client exit, and then kill the X server. That's how a
window manager stops X. If you set things up so that the window manager
*isn't* the last thing run, you can stop the window manager and all your
other applications will keep going). However, you can have the client be
just about anything you want -- for example:
# script to run netscape in a loop
while 1; do
could be the "client". Since this script will never exit normally, xinit
will never kill the X server. If the user exits Netscape, it'll get
started again. If Netscape dumps core and halts, it'll get started again.
> [ . . . ]
>> To keep people from closing it, you can run it from a script that loops
>> so as to restart the app whenever it's closed.
> How does the script know that someone closed the application?
When the application exits. Take the script above; since netscape isn't
run in the background, when netscape exits, the script will continue on,
hit the "done", go to the "do", and run netscape again.
On a machine running XDM or another display manager, there will often be a
"failsafe" choice for logging in. Generally, that gives you xinit's
default -- an xterm and no window manager. You can then use the xterm to
start a window manager if you want one.
/,`.-'`' -. ;-;;,_ No one agrees with me. Not even me.
|,4- ) )-,_..;\ ( `'-'