[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: last question



On Sun, 31 Mar 1996, T. Moore wrote:

>  I really appreciate all the help people have given on this group, it has
>  been very prompt and pertinent!  I almost have everything running great
>  on my debian machine, but have one last problem.  In X, for some strange
>  reason, if I try to put a .xsession file in my home dir as root or
>  another user,and run startx, it always just bombs out back to the prompt.
>  I havemade the .xsession file +x, and it just contains one line "xterm &".
>  I even renamed it to .xinitrc, and .xinit, but to no avail.  Anyone have
>  any idea why it wont read my .xsession?  Thanks!

You must have one program started in the foreground (i.e. without the "&").

Simply put, your X session terminates when the .xsession files
terminates. So you can have:

xterm

as an .xsession file and then you just "exit" the xterm to end your
session.

Or, assuming you will want to start a window manager too:

#!/bin/sh
# 
# Local Xsession file.

# Start window manager first... (I use fvwm)
fvwm & wmpid=$!

# ...then the other stuff (all running in the background)
xterm &
# etc.

# Wait for window manager to terminate.
wait $wmpid

The "wait $wmpid" will block until your window manager terminates. So with
this .xsession file, you quit the window manager to end your X session.

   Christian

PS Maybe a sample .xsession file should be put in
/usr/doc/examples/something...



Reply to: