Subject: Re: FVWM: Help required.

From: [email-masked]
Date: Thu, 6 Apr 2000 14:01:26 +0100

> From: "Thomas A. Gardiner" <[email-masked]>

> As for shutting down there are a couple of possibilities which have been
> suggested in the past.  One is
...

Here's two more suggestions:

1) If you're on RH6, then you'll (probably) have a package installed called
`usermode'. This provides a program /usr/bin/shutdown (among others). It pops
up a dialogue, prompts for the *user's* password, and shuts the machine down!

So add a menu item somewhere (see AddToMenu in man fvwm2):

	+ "Shut down" Exec /usr/bin/shutdown -h now

and perhaps also

	+ "Reboot" Exec /usr/bin/shutdown -r now

(I'm going to add this feature to my AnotherLevelUp package soon.)

2) Add a user called stop -- then you can shutdown at the login prompt. This
may not be wise in a `hostile' environment -e.g. if your machine has a
permanent internet connection. It definitely works if you have text logins, I
haven't tried it with xdm/gdm, but it ought to work.

In /etc/passwd, add the line (as root, carefully)

	stop:XX:0:0::/sbin:/sbin/shutdown -h now

assuming that shutdown lives in /sbin. Note that this is the real shutdown
command, rather than the gui wrapper for it mentioned above, which is (may be)
in /usr/bin. This new user is an alias for root, so make sure it appears AFTER
the entry for root in the passwd file (otherwise all/most references to the
user root will appear as stop!).

Now set the password for stop, running (still as root):

	passwd stop

and follow instructions. You may find an empty password is permitted by passwd
(after it objects about it being `WAY too short') but does not work when you
try to use it, depending on the `pam' set up for logins. However, you should
be able to get a nice short password (single character?) to work, even though
passwd will object when you set it.

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

---

From: [email-masked]
Date: Fri, 7 Apr 2000 03:01:18 +0100

I (partly stupidly) said:

> From: [email-masked]
> Date: Thu, 6 Apr 2000 14:01:26 +0100
> To: [email-masked], [email-masked], [email-masked]
> Subject: Re: FVWM: Help required.

> haven't tried it with xdm/gdm, but it ought to work.

Doah! Of course that will NOT work with xdm/gdm, as they do not start the
user's `shell' (i.e. `shutdown -h now') when you login! You can tell I prefer
text logins! Sorry about that. It's still a reasonable suggestion if you're a
text login user, and as has been pointed out, gdm has a halt option anyway.

John