Subject: Re: Regarding XFree
To: Rakhesh Sasidharan <rakhesh@cse.iitd.ernet.in>
From: Richard Rauch <rauch@eecs.ukans.edu>
List: netbsd-help
Date: 02/23/2001 05:03:26
(I am going to assume in this message that you have X properly configured.  
If you don't have it properly configured, then you may still see errors.  
In that case, please post again.  (^&)


Don't use ``X'' to start X.  Use startx.  Here's how I normally start
mine:

  startx -- -bpp 16

(That asks for a 16 bits-per-pixel display, under XFree86 3.3.6.  Under
XFree86 4.x, you should change ``-bpp'' to ``-depth''.)

The -- option says that the subsequent options are not for startx, per se.  
Instead, ``-bpp 16'' (and anything else past ``--'') is passed off to
another program.  See the startx man-page.

Sometimes I want to run a second X server (e.g., to use a different user
login to play with GNOME, KDE, or turn silly things like JavaScript on in
a web-browser).  In that case, I need to specify the dislay number, which
must be the first thing after the ``--'':

  startx -- :1.0 -bpp 16

...although you should be able to ask for any display number you want
(within some limits, at least; (^&), you can only have multiple concurrent
X servers running if you have virtual consoles.  This is true for port
i386, but is not true for all NetBSD platforms.

If you just say:

  startx

...startx will start up your X server in default mode (:0.0 for display, 8
bits per pixel, and any other defaults that I can't name/think of
offhand).


Alternatively, as another person has suggested, you can run XDM (which
will let you log in under XDM, at a graphical console, rather than at a
normal text login: prompt).  There are three reasons that I don't use XDM:

 * I've never taken the time to figure out how it works.

 * Sometimes I want a different color-depth for my X server.  One way
   to do this is to exit the X server and restart with a different -bpp
   option.  But, I don't think that you can manually exit/restart X from
   XDM.

   Of course, with virtual consoles, you can just run a second X server,
   concurrently, so this isn't such a problem on some NetBSD ports.  (You
   just have to be sure that no two X servers are trying to use the same
   display number (:0.0, :1.0, etc...) and that you have enough consoles
   to support all of the servers.

 * Sometimes I feel like using a regular text console.  Once again,
   virtual consoles should let you do this and still use XDM.


Since I'm using NetBSD/i386 1.5 (i.e., my system has virtual consoles),
only one of those reasons really applies to me in more than a historic
sense.  And even that one isn't a terribly good reason.  But, then again,
there's no terribly good reason to NOT use the standard text login.  (^&

But, if you run XDM, I think that you exchange the trouble of ``how to
start X'' for the trouble of ``how to configure XDM''.  Neither problem
should be all that large, but using XDM may not save you anything in terms
of hassle.  And knowing how to manage X manually may help in understanding
XDM (I assume that XDM more or less builds upon the interface that you
have for manually invoking X).


  "I probably don't know what I'm talking about." --rauch@eecs.ukans.edu