Re: dominate xdm?
On Tue, Sep 04, 2001 at 06:13:37AM +0000, Johnny Ernst Nielsen wrote:
> >On Mon, Sep 03, 2001 at 11:43:07AM -0400, richard wrote:
> >> New install and just got X to work. xdm starts twm, which is lame, on
>
> >> VC7 with a login. You can't get out of it on that console. Startx won't
>
> >> work anywhere of cours.
> >>
> >> I want to use e.g. icewm. How do I reconfigure xdm to default to a
> >> different
> >> window manager, and/or turn xdm off? I couldn't find the script to
> >> change in /etc/X11.
> >>
> >> I wrote a test .xsession file (did make executable) with just exec
> >> xterm. Even though allow-user-xsession does in
> >> /etc/X11/Xsession.options, that $HOME/.xsession doesn't prevail and
> >> still stuck with twm.
> >
> >If you don't want a graphical login remove xdm with apt-get.
> >
> >To load icewm from xdm or startx, if the executable name is "icewn" put
> -
> >exec icewm
> >in ~/.xsession
> >
> >Make sure all "exec" lines are backgrounded with "&" except one.
> >
> >For example -
> >
> >#!/bin/sh
> >exec xterm &
> >exec icewm
> >
> >Used in this manner .xsession doesn't have to be set as executable.
>
> FYI
> I don't think it is a good idea to use exec more than once.
> In the above case do not exec xterm.
>
> I read somewhere (in bash' man pages I think) that exec substitutes the current
> shell with the exec'ed command.
> In the case of X the effect would be that when ending the exec'ed command
> X would also end.
> In the above case I am not sure what would happen if the user decided that
> he did not need the xterm any longer, but would like to stay in X.
> I'm not in front of a Linux box right now, so I can't test what will happen.
>
>
> See man bash or try apropos exec - or just test the above setup of course
> :o)
I've been using the .xsession configuration as listed above for
several years with no problems. The reason I've been using .xsession
in this manner is because I learned that way in the beginning and it has
always worked for me. At any rate I decided to do a little
investigative work.
Many times I have read .xsession has to be set executable. Mine is not
and as far as I can tell doesn't have to be.
I tried .xsession with "exec" and without "exec." I didn't see any
difference from the standpoint of a user. When I closed out an xterm
it went away and didn't bring X down whether "exec" was used or not.
So I took a look at the XFree86 HOWTO. Found what I was looking for -
http://www.linuxdoc.org/HOWTO/XFree86-HOWTO/x116.html
Basically what Mr. Raymond says is the last command in the file should
be started with "exec" and not backgrounded with "&" The last command
is the window manager. Used in this manner the window manager replaces
the xinit process and if the window manager is closed then X will shut
down.
So with the above knowledge in hand I will retract what I said and offer
the revised example:)
#!/bin/sh
xterm &
exec icewm
kent
--
"The significant problems we face cannot be solved at the
same level of thinking we were at when we created them."
--Albert Einstein
Reply to: