Re: umask in modules
Manage your shell environment variables and aliases
Brought to you by:
leomania,
xdelaruelle
From: Istvan M. <mi...@im...> - 2000-05-30 21:40:12
|
"R.K. Owen Ph.D." <rk...@Ow...> writes: > If you really want to set a umask, it is already possible > within modules. In this case you want to communicate directly with > the shell, that can be done by outputting to stdout. Remember, that > "module" is just an alias that eval's the output of the modulecmd program. > > create a module with > ... > if [ module-info mode load ] { > puts stdout "umask 027;" > } > > if [ module-info mode remove ] { > puts stdout "umask 022;" > } Good idea. But since this relies on shell syntax you would have to check "module-info shell" in case the module is invoked from Perl or Emacs. But I agree, putting umask in Modules is probably not worth it. I personally wouldn't use it, it was the original poster asking... > ... > > In this case you use "exec xset" to communicate directly with your > X11 window server. The problem with xset fp+ is that it doesn't check for duplicate entries. I guess you could handle this in TCL by trying to parse the output of "xset q" but this feels a bit messy to me. Modules already does X resources so it already links against the X libraries. > As you can see from both of these examples, very little needs to be > added to modules, and most of what is needed can be done already > by understanding to whom you need to send a command and the underpinnings > of modules in Tcl and shell evals. Agreed. -- Istvan |