Subject: Re: FVWM: fvwm 2.0.42/Solaris 2.5

From: [email-masked] (Jeff Magill)
Date: Thu, 20 Jun 96 17:17:41 PDT

>I have a theory.
>Suppose the author of xlock was an idiot and used getlogin() to find the
>user's login name - fvwm will not have a controlling terminal or utmp entry
>and getlogin() will fail.

I just did a search on my xlock source code and I didn't find a call to
getlogin() (although there was an extern for it which may mean it was
used at one time).  There were bunches of calls to getuid().

Jeff
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Patrice Fortier <[email-masked]>
Date: Fri, 21 Jun 1996 11:49:35 +0200 (MET DST)

| I am experiencing a weird problem with FvwmButtons/fvwm-2.0.42 and xlock under
| Solaris 2.5.  If I have the following in my .fvwm2rc file:
| 
| *FvwmButtons Lock       xlock.xpm       Exec /usr/openwin/bin/xlock -mode random

*FvwmButtons	xlock		Diavolo.xpm	Exec ""	xlock -mode flame

This works for me... Solaris 2.5, fvwm-2.0.42, gcc-2.7.2

fortier@edwood > fvwm-2.0.42 : which xlock
/usr/openwin/bin/xlock

Lokh.

---

From: Daniel R Ehrlich <[email-masked]>
Date: Fri, 21 Jun 1996 11:12:56 -0400

>Try this test:
>	rsh yourhost /usr/openwin/bin/xlock -mode random
>If it fails the same way it's almost certainly a controlling tty problem.

Sorry, I ran

	daneel:9> rsh daneel /usr/openwin/bin/xlock -mode random

and it locked the screen.
	
>
>Best solution (assuming I'm right - I may not be):
>	- Fix xlock to use getuid(), not getlogin().
>
>Workaround:
>	- Get your shell startup (.env for ksh, cshrc for csh, etc)
>	  or your first xterm to write the tty name (if any) to a well known
>	  file.load the name when you invoke xlock and attach
>		#!/bin/sh
>		# attach to a useful tty
>		tty=`cat well-known-file`
>		if [ ! -c "$tty" ]
>		then  echo "$0: $tty: not a tty" >&2; exit 1
>		fi
>		exec "$@" <"$tty" >"$tty" 2>&1
>	  and say
>		Exec the-wrapper-above /usr/openwin/bin/xlock -mode rand
>
>Let me know how you go,
>	- Cameron Simpson
>	  [email-masked], DoD#743
>	  http://www.dap.csiro.au/~cameron/
>--
>The peever can look at the best day in his life and sneer at it.
>	- Jim Hill, JennyGfest '95
>