Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 2009 15:48:04 -0800
From:      George Davidovich <freebsd@optimis.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: SLIM and XFCE4
Message-ID:  <20091105234804.GA24198@marvin.optimis.net>
In-Reply-To: <20091105224944.a6ce3874.freebsd@edvax.de>
References:  <20091105001628.3cd0319a.freebsd@edvax.de> <424233.42925.qm@web24816.mail.ird.yahoo.com> <20091105224944.a6ce3874.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 05, 2009 at 10:49:44PM +0100, Polytropon wrote:
> On Wed, 4 Nov 2009 23:01:19 -0800 (PST), Alexandre L. wrote:
> > mmm. I don't know.  But with this config file, XFCE4 launch is OK
> > (or seems OK).
> 
> That may be possible, as well as correct.
> 
> I have learned - many many years ago, so it may already have changed -
> that .xinitrc is a SHELL SCRIPT that is executed on X startup. So all
> the "rules" for shell scripts do apply, such as declaring the
> interpreter with the #!  special comment. Furthermore, .xinitrc serves
> as a kind of "init process", so that the "exec" statement is needed to
> replace the .xinitrc process by the window manager.

That's always been my understanding, but if you examine the startx
script, you'll see otherwise.  From xinit(1): 

	If no specific client program is given on the command line, xinit
	will look for a file in the user's home directory called .xinitrc to
	run as a shell script to start up client programs ... 
		^^^^^^^^^^^^^^^^^

The interpretation being that .xinitrc can be an ordinary file, but
should be written to follow certain syntax rules (not unlike
/etc/rc.conf).  An example to illustrate:

	$ echo 'var="Hello World"; echo $var' > filename
	$ sh filename
	Hello World

Put simply, .xinitrc does not need a shebang line, and does not need to
be executable.  A simple 'exec ...' statement as the final line will
suffice.


-- 
George



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091105234804.GA24198>