[comp.windows.x] menuwm and shell

mts@EMPTYS.CC.UMICH.EDU (Michael T. Stolarchuk) (05/08/87)

The current version of menuwm I have exec's a shell
depending on the SHELL environment variable.  This is
a good idea.  But I usually use the csh, and don't
want my SHELL=/bin/sh for menuwm...  the obivous solution
is a shell script...

	#/bin/sh
	# don't forget to set it (SHELL doesn't care)
	SHELL=/bin/sh
	menuwm ...

But for those who don't like to cover up programs with
additional scripts, and want more control over menuwm...
How about another variable in .menuwmrc... shell

... Like this
resizefont=9x15
shell=/bin/sh
...

(ps: maybe I did something else wrong.  when I used menuwm
with SHELL=/bin/csh, I ran menuwm in the background.  In doing
so, every command issued by menuwm was run by /bin/csh.  But
csh wanted to display the proc number of the background proc,
and needed the 'terminal' in the foreground... menuwm would
block until 'fg' was done to allow the background /bin/csh
to pring the process number. that's how my [this] mess started)

(pps: menuwm is nice)

*** uwm.h
260a261
> extern char Shell[];		/* Shell name */
*** global.c
112a113
> char Shell[NAME_LEN];		/* Shell to use */
168a170
>     { "shell",		IsString,	0,0,Shell,0 },
*** Menu.c
101c101,104
< 		shell = (cptr = getenv("SHELL")) ? cptr : "/bin/csh" ;
---
> 		if (Shell[0] == 0)
> 			shell = (cptr = getenv("SHELL")) ? cptr : "/bin/csh" ;
> 		else
> 			shell = Shell;

mrose@GREMLIN.NRTC.NORTHROP.COM.UUCP (05/16/87)

    Actually, I didn't bother with a shell, I just had it run a command
    (shell script) by adding a variable "startupcmd".  For example, in
    my .menuwmrc file

	startupcmd="exec Xgo"

    where xgo is the monstrous:

xterm -ai -ls -n "X Windows" -sl 100 =80x40+0+0 \#100x100-228+40 &
(xhost +gremlin; \
 rsh gremlin -n "( \
    xclock -analog =100x100-268+40 `hostname`:0 & \
    xwho -e  =350x750-18+150 `hostname`:0 &) >& /dev/null"; \
 sleep 20; \
 xhost -gremlin) &
xuseti -abfhhhg \
    'system mailb motherb ipgw-people isode isode-people memnet trusted-people' \
    '%D %M %d %h:%m%z%b %a:%l1[%l4]' 'isi-gateway:core:%U' \
    'gremlin:%a:%l1' 'nrtc:sh:%l1' '%a:%l1' mrose &
exec xface -e -h gremlin =100x100-18+40 -u

    This avoids any funny problems with i/o, job control, and the like
    as xterm, et. al., handle all that nonsense.

/mtr