Subject: Re: X Mice, buttons, etc.
To: None <macbsd-general@NetBSD.ORG>
From: Michael J. Oehler <mjo@epoch.ncsc.mil>
List: macbsd-general
Date: 02/10/1995 12:33:24
I do a little X development so if there's one thing I can explain its X...
I've seen a lot of X questions this past week and I'll group them here
(BTW, all have been correctly answered in only in the general sense.)
Erik Vogan <vogan@auriga.rose.brandeis.edu> writes:
> Here's what I get: A hatched background, and a single console window.
Every one says go get a window manager and run it. This is correct. You
can start uwm,twm,mwm,olmw,... from the command prompt (ie, by default,
an Xserver will bring up a single xterm with a command prompt. This prompt
is the shell type that`s listed in the password file, but you knew this.)
I'd also recommend running it in the background, eg, "uwm &", so you can
do some other stuff. However, this isn't very flexible. Here are the details.
Specifically, "X" isn't a single entity, lots of programs and files are
read to start "X". Generally, there is a the site specific scritp like,
startx, xstart, dox, etc... that initiates this whole process. The most
important command in this script is:
xinit -- /usr/X11/bin/X
Think of xinit as the boot strap, able to run one program, the X server.
Once executed, it will look for the X resource file, .xinitrc.
There may be a site specific .xinitrc, but most leave it up to you to create
one, because various window managers use different scripts, compare Sun's
OpenLook Window Manager & Motif's. You should create this file (its a text file)
and place it in your home directory. Here's mine:
xterm -C -iconic -n Console &
xterm -n Ren -iconic &
xterm -n Stimpy -iconic &
xterm -iconic &
xterm -iconic -fn 10x20 &
xsetroot -solid seagreen4 &
xclock &
perfmeter &
/usr/X11/bin/mwm
Note, how the Motif window manager is LAST & does not run in the background.
This is important. Second, the "-C" is a good thing to have. Make this
terminal the first entry. No explanation needed.
There are several other files you should keep track of:
1).Xdefaults files
This file specifies the your resource choices for client programs.
If there is interest (I'm reaching the noise limit for macbsd-general),
we can talk about the .Xdefault file too or e-mail directly if you like
a copy/example.) Try changing some simple settings & then reload with
"xrdb -load ~/.Xdefaults" (eg, put in "xterm*cursorColor: red" or "pink".)
2) .cshrc, .login, .logout
These are the general Unix files you should already know. But note, that
some X specific entries may need to go into them, eg, setenv LD_LIBRARY_PATH
& setenv MANPATH, etc.
3) Window Manager Resource File
The resource file (eg, .mwmrc) customizes your window manager.
Without one, you won't have any root pop up windows. Most WM should have a default though.
4) .xsession & xdm
Also, you may want to look into xdm (the X starter daemon) and its
corresponding .xsession file to compare another method of starting X.
5) Others
Generally, every client program will have a resource file. They can be in
/usr/X11/lib/X11/app-defaults or in your home directory.
There'll be other files I've missed so X experts lend a hand.
joel@itg.ti.com (Joel Quejada) writes:
> Fatal server error:
> Can't run X server with no screens
The boundaries between X & macBSD blur so I go on the limb here...
It appears the server is unable to find a usuable frame buffer. Typically,
servers are programmed to look for architecturally specific frame buffers
and then /dev/fb. I'd recommend that you check the X server documentation
specific to the Mac and see which device the server looks for, my guess
is yours isn`t listed, check the X start up script for the -dev server
option, and if none is specified, put yours in.
xinit -- /usr/X11/bin/X -dev /dev/grf0
I haven't tried/installed/read the Mac specific X materials yet.
My hats off to the developers. It had to be a tough job.
X is huge and I've tried to use as little bandwidth as possible.
-Mike
Oehler@Dockmaster.ncsc.mil