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

Re: Vá: Using wdm how to pass "-- -logverbose 6" to startx?



On Sat, Dec 29, 2007 at 08:19:32AM -0800, Daniel Burrows <dburrows@debian.org> was heard to say:
> On Fri, Dec 28, 2007 at 07:02:46PM +0100, Paul Csanyi <csanyipal@gmail.com> was heard to say:
> > 2007/12/28, Andrew Sackville-West <andrew@farwestbilliards.com>:
> > > you'll need to just press enter to keep it as currently set.
> > >
> > > Do you have a ~/.xinitrc or ~/.xsession file? if so, what are the
> > > contents?
> > 
> > I have not .xinitrc
> > 
> > less ~/.xsession is:
> > 
> > #!/bin/bash
> > 
> > ##[Desktop Entry]
> > #Encoding=hu_HU
> > #Name=Window maker
> > #Comment=This session logs you into Window Maker
> > #Exec=/usr/bin/wmaker
> > ## no icon yet, only the top three are currently used
> > #Icon=
> > #Type=Application
> 
>   So, you've told your X session to exit immediately.  This will
> probably produce the behavior you're seeing, of it exiting immediately. :-)

  Um, that was a slightly cryptic comment.

  What's happening is that you've copied the .desktop file for your
window manager into ~/.xsession.  .xsession is a bash script [0].  Desktop
files are not bash scripts, so including fragments of a desktop file in
a bash script will do nothing useful (in fact, it will probably produce
a syntax error).

  On top of this, you've commented out every line of the desktop entry,
which means that the lines will be completely ignored by the bash
interpreter.  That means that your .xsession has no effect at all, and
since your X session ends as soon as your .xsession script finishes,
this script will cause your X sessions to exit immediately (dumping you
back to the login screen).


  You want this script to run /usr/bin/wmaker and exit.  In fact, it
would be even better if it could run /usr/bin/wmaker and exit, but run
xterm if invoking wmaker fails for some reason.  Adding

    exec /usr/bin/wmaker || /usr/bin/x-terminal-emulator

  should do just that.  "exec FOO" causes the shell to run FOO and exit
immediately [1], except if FOO can't be found, in which case the "exec" will
fail and x-terminal-emulator will be run instead.

  Daniel

  [0] technically I think it could be any executable file, but bash
      scripts are typical, and of course since you put #!/bin/bash at
      the top, it will be interpreted by bash.

  [1] technically the running bash instance is replaced by a copy of
      FOO, but from the script's point of view it's as if it exited
      as soon as FOO did.


Reply to: