Denis Heidtmann
The short version is ...
(1) put a non-interactive executable in a directory somewhere in the
defined PATH - set permission correctly of course
(2) in the appropriate Default script, somewhere between the gdmwhich
function and exit (probably closer to exit?), get the full path to that
executable mentioned in step 1 ... something like this ...
command_to_execute=`gdmwhich name_of_program_without_path`
(3) execute that program, such as ...
command_to_execute
(3.1) of course the call for "command_to_execute" should be within some
sort of control structure for any appropriate exception handling, eh?
Does that help?
Regards
Fred James
[omissions for brevity]
Denis Heidtmann (sorry ... I have been misspelling your name ... sorry)
[more omissions for brevity]
gdmwhich () {} ...
Pre gdmwhich () the value of IFS is saved and then set to :
Then the directories in $PATH are searched for a match to COMMAND (which
is set to $1)
If the COMMAND is found and it is executable (test -x) and if the OUTPUT
is an empty variable (since OUTPUT= the "x$OUTPUT" should be "x")
set OUTPUT to be the directory in which COMMAND was found, followed
by COMMAND (inserting the required /, of course)
Reset IFS to its old value
"echo" or return that value of $OUTPUT
So far so good?
Now ... in both my PreSession and PostSession, the PATH is set to
include $PATH, /bin, and /usr/bin, although in PostSession /usr/bin is
listed twice (see above in quoted message)
In my PreSession there is the line ...
XSETROOT=`gdmwhich xsetroot`
... note that those are the forward single quotes (normally found on the
'~' key?), which calls the function with the argument xsetroot, setting
XSETROOT to whatever is returned (echo'd)
in other words the value of XSETROOT is whatever directory gdmwhich
() finds xsetroot in, followed by /, followed by xsetroot - in my case
that would be /usr/bin/xsetroot - your mileage may vary.
That does assume that xsetroot is found, of course, otherwise OUTPUT is
empty.
Does any of that help, or did I miss something?
Regards
Fred James
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug