xinit vs. startx

Thomas Chadwick j_tetazoo@hotmail.com
Sat Oct 23 02:35:00 GMT 2004


>1. What exactly causes the different behavior between running xinit
>and running startx?  As far as I can tell, both xinit and startx use
>the directives listed in my .xinitrc file (which is identical to the
>file /etc/X11/xinit/xinitrc that is installed by default with cygwin).
>Does startx invoke xinit or the other way around (or none of the
>above)?

If you run xinit directly, it invokes the X server with no command-line 
arguments (assuming you're not setting any) and then sources your .xinitrc 
script.  startx is a "wrapper" script which invokes xinit with some 
additional command-line arguments.  Go ahead and look in 
/usr/X11R6/bin/startx to see what additional arguments it's passing to the X 
server.

Also, take a look at the man pages for xinit and startx.  They're pretty 
well documented.

>2. Is there any way I can (re)set the size of the desktop-like window
>produced by xinit so that it does not take up the entire screen?

You can customize the X server's behavior via command-line flags, documented 
here:

http://x.cygwin.com/docs/ug/configure-cygwin-x-options.html

>3. Is there any way that I can launch startx (and thereby get a
>terminal from which I can launch X applications) by clicking on some
>desktop/launcher icon without first needing to bring up a
>(non-X-capable) Cygwin terminal?

Use a Windows shortcut with a target of, e.g.:

c:\cygwin\usr\X11R6\bin\run.exe /usr/X11R6/bin/startx

I believe there is also a Cygwin package that installs Windows shortcuts 
that are intended for this purpose.  Don't recall the name, but it's in the 
same category as the X Server package.

-Tom




More information about the Cygwin-xfree mailing list