>
>
>-------- Original Message --------
>Subject: Re: FVWM: Extracting an Environment Variable from FVWM
>From: Thomas Adam <tho...@fvwm.org>
>Date: Thu, August 25, 2011 2:24 pm 
>To: msib...@crosswire.com
>Cc: fvwm@fvwm.org
>
>On Thu, Aug 25, 2011 at 11:07:04AM -0700, msib...@crosswire.com wrote:
>> Howdy,
>>  
>> I'd like to be able to read FVWM's environment variables from an outside
>> script. I can set variables with:
>>  
>> FvwmCommand Foo bar
>
>No. You set them with:
>
>FvwmCommand 'SetEnv FOO bar'
>
>> And can pass through to another script by doing something like this:
>>  
>> FvwmCommand Test (EnvIsSet Foo) Exec somescript $[Foo]
>>  
>> But I want to be able to do set/get from the same script. Is there a
>> way to do this with one of the perl modules perhaps? I've looked at the
>
>Because they're in FVWM's process space and not anything else, and you're
>wanting to use them elsewhere, you can do nothing *but* ask FVWM about them.
>Again, I would just use FvwmCommand to echo the appropriate environment
>variable.
>

Right, but I presume it is possible to export the namespace using perlxs
or something. Probably a PITA to do it, which is why I was hoping there
was some existing IPC way of getting access to FVWMs environment
variables. The alternative is either writing a patch, wrapping
FvwmCommand, or using something else even more kludgy. 

>
>Alternatively, what's the problem you're trying to solve? Perhaps there's
>an easier way, rather than relying on this rather bizarre solution to a
>problem you've not (yet) stated.
>
>-- Thomas Adam
>
>-- 

Not a problem so much as a feature. If I can read/write to FVWMs
environment space, I can use it for token passing between scripts.
Essentially it gives me a place to cache IPC data, so that programs
don't have to be running symultaneously in order to communicate with
eachother.

Obviously the ultimate evolution of something like this would be an FVWM
Module that embeds an instance of SQLite into the window manager. But
for the moment, I don't need that much state. 

There are many potential applications for this: Network sychronization
for example, or embedding localized algorithms for window placement.
IMHO it just makes FVWM easier to extend. 

As I said before: I'd rather not have to wrap FvwmCommand. So if there
is a programatic way of getting access to FVWM's environment variables
without spending a week doing it, I'm all ears. 

Thanks in advance! 
Matt



Reply via email to