Subject: Re: Restart (PR#234)

From: Bob Woodside <[email-masked]>
Date: Wed, 10 Mar 1999 12:28:17 -0600 (CST)

Neil, FVWM doesn't support restarting a WM with command line
args. It doesn't parse the string you pass into individual args
to pass to the new program. So what happens is that the entire
string - "/usr/X11R6/bin/twm -f /etc/X11/twm/system.twmrc", for
example, is passed as the name of the program to exec. This, of
course, fails, so fvwm falls back to restarting itself. All you
can specify on the Restart command is the name of the program to
execute, I'm afraid.

    Although most WM's (unless they're descended from FVWM)
don't offer even this much flexibility, I think we could do
better. I think it would be a nice enhancement to allow the
passing of arguments to the new WM.

- Bob

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Neil Zanella <[email-masked]>
Date: Wed, 10 Mar 1999 16:00:19 -0330 (NST)

> passing of arguments to the new WM.

It would be a very nice enhancement: in fact, when I use

Restart /usr/X11R6/bin/twm

and twm restarts, it cannot find its default config file (bummer) and
I am stuck with frameless windows. Right now, the only way to solve this 
problem is to have a ~/.twmrc file. And since I am not seriously considering
running Twm at all (I'm just browsing), having to have an extra ~/.twmrc 
file on a permanent basis seems a bit unnecessary.

It would be a nice enhancement to have Restart deal with flags the right way.

---

From: [email-masked] (Paul D. Smith)
Date: 10 Mar 1999 14:47:09 -0500

%% Neil Zanella <[email-masked]> writes:

  nz> and twm restarts, it cannot find its default config file (bummer)
  nz> and I am stuck with frameless windows. Right now, the only way to
  nz> solve this problem is to have a ~/.twmrc file.

Well, you could write a little shell script that invoked twm with the
right -f option, then invoke that from Restart.

Hacky, but...

  nz> It would be a nice enhancement to have Restart deal with flags the
  nz> right way.

Agreed.  The only issue is, once we decide to allow cmd-line args,
people will want shell quoting, etc. etc.  Then we'll have to invoke a
shell to run the new WM, with an exec option, etc...

:)

At least, does fvwm print some kind of error when the original exec
fails?  Hopefully that error is somewhat meaningful?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Neil Zanella <[email-masked]>
Date: Wed, 10 Mar 1999 16:29:12 -0330 (NST)

On 10 Mar 1999, Paul D. Smith wrote:
> fails?

Yes. If this is what you mean then here it is:

$ cat .xsession-errors

[FVWM][Done]: <<ERROR>> Call of '/usr/X11R6/bin/twm -f /etc/X11/twm/system.twmrc' failed!!!! (restarting '/usr/local/bin/fvwm2' instead)

or

[FVWM][Done]: <<ERROR>> Call of '"/usr/X11R6/bin/mwm -f /etc/X11/mwm/system.mwmrc"' failed!!!! (restarting '/usr/local/bin/fvwm2' instead)

etc...

---

From: [email-masked] (Paul D. Smith)
Date: 10 Mar 1999 15:15:47 -0500

>> At least, does fvwm print some kind of error when the original exec

  nz> Yes. If this is what you mean then here it is:

  nz> $ cat .xsession-errors

  nz> [FVWM][Done]: <<ERROR>> Call of '/usr/X11R6/bin/twm -f /etc/X11/twm/system.twmrc' failed!!!! (restarting '/usr/local/bin/fvwm2' instead)

Ugh.  No, I don't consider this sufficient since it gives no info about
_why_ it failed.  At the very least it should print the errno string, so
you'd see something like "no such file or directory" at the end of the
above message.

That would be confusing here but at least you'd have a _chance_ of
figuring out the problem.

Of course, TFM is also an option, I guess :)

---

From: Julian Gilbey <[email-masked]>
Date: Wed, 10 Mar 1999 21:39:55 +0000 (GMT)

> passing of arguments to the new WM.

Again, I'm only looking at FVWM 2.2 at present, but all it would take
to provide this enhancement is to use a standard GetNextToken loop in
the Done() function to process the arguments to Restart instead of
copying the arguments we were given (which may be meaningless to the
new WM, although we should check for -d and -s options); of course,
the syntax of Restart would then be  Restart <WM> [<arg>] ...

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. [email-masked]
             Debian GNU/Linux Developer.  [email-masked]
       -*- Finger [email-masked] for my PGP public key. -*-
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Bob Woodside <[email-masked]>
Date: Wed, 10 Mar 1999 18:12:22 -0500

> shell to run the new WM, with an exec option, etc...

	"...and Bob was last seen running whimpering down the virtual hallway,
following Jason's still warm trail of screams."

	Erk! I really don't fancy getting into another of those fruitless "to
exec, or to exec exec" debates. I'll have to think on this one a bit.

- Bob

---

From: [email-masked] (Paul D. Smith)
Date: 10 Mar 1999 19:06:20 -0500

>> shell to run the new WM, with an exec option, etc...

  bw> 	Erk! I really don't fancy getting into another of those fruitless "to
  bw> exec, or to exec exec" debates. I'll have to think on this one a bit.

Well, whether to exec automatically on an Exec command is debatable
(although I'd have preferred it since it's _usually_ what you want, and
provided a different command to not exec).

But there should be no debate here: without the exec you'll change from
a window manager process to a shell process running a window manager
process, then if you restart again you'll have a shell running a shell
running a window manager, etc. etc. etc.

exec is the Right Thing in this case, without a doubt.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 11 Mar 1999 00:36:45 +0100

> figuring out the problem.

Just implemented :)

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Michael Han <[email-masked]>
Date: Wed, 10 Mar 1999 22:29:02 -0800

Previously...
>passing of arguments to the new WM.

While we're at it (though I see from Dominik's activity we're no
longer "at it", technically ;-), is there some reason that FVWM
doesn't restart itself using the commandline args it started with? An
unqualified "Restart" ought (IMHO) to bring back exactly the same
thing.

I poked around in the code for Restart and it seems that FVWM hangs
onto all the args it ran with right up to the bitter end, but for some
reason decides to just chuck them. Is this in the same boat as the
observation about quoting and exec'ing a Restart with multiple args?
Anyway, my personal feeling is that if Restart won't restore fvwm2
with the same commandline args it started with, commandline args are a
bit useless... My fvwm2 starts as 'fvwm2 -f $HOME/.fvwm/main' but I
*still* had to symlink $HOME/.fvwm2rc to .fvwm/main in order to
Restart with the right rcfile. Sigh.
-- 
[email-masked]
Organ transplants are best left to the professionals
 - The collected wisdom of Bart Simpson
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 11 Mar 1999 09:36:47 +0100

> unqualified "Restart" ought (IMHO) to bring back exactly the same

I was fiddling with the Restart function anyway to suppress an
error message that had bothered me a long time. I think the cmd
lime args are use now if you use Restart without parameters. Could
you check that is correct?

Bye

Dominik

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Michael Han <[email-masked]>
Date: Mon, 15 Mar 1999 23:02:26 -0800

Previously...
>you check that is correct?

Indeed, it appears that at some point from 2.0.46 to 2.2.0 this got
changed... Hurrah.
-- 
[email-masked]
I will not make flatulent noises in class
 - The collected wisdom of Bart Simpson
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 16 Mar 1999 10:18:55 +0100

> Indeed, it appears that at some point from 2.0.46 to 2.2.0 this got

Does this mean I can close the bug report? BTW, did you at least
consider asking Jason for Jitterbug access if I can't talk you
into joining the 'CVS team'?

Bye

Dominik

---

From: Jason L Tibbitts III <[email-masked]>
Date: 16 Mar 1999 10:25:44 -0600

>>>>> "DV" == Dominik Vogt <[email-masked]> writes:

DV> BTW, did you at least consider asking Jason for Jitterbug access if I
DV> can't talk you into joining the 'CVS team'?

This is easy; I just need the password encoded in the usual manner.

 - J<