zsh-workers
 help / color / mirror / code / Atom feed
* "Remote" execution - is this possible?
@ 2011-03-31 16:22 Helmut Jarausch
  2011-03-31 17:07 ` Benjamin R. Haskell
  0 siblings, 1 reply; 2+ messages in thread
From: Helmut Jarausch @ 2011-03-31 16:22 UTC (permalink / raw)
  To: zsh-workers

Hi,

on a remote machine to which I have root access I'd like to
fix some environment setting for running zsh processes, i.e.

there are some xterms running zsh.

I'd like to achieve the effect as if a local user had entered
export BROWSER=firefox
in his xterm.

Is this possible?

Many thanks for a hint,
Helmut.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: "Remote" execution - is this possible?
  2011-03-31 16:22 "Remote" execution - is this possible? Helmut Jarausch
@ 2011-03-31 17:07 ` Benjamin R. Haskell
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin R. Haskell @ 2011-03-31 17:07 UTC (permalink / raw)
  To: Helmut Jarausch; +Cc: zsh-workers

On Thu, 31 Mar 2011, Helmut Jarausch wrote:

> Hi,
>
> on a remote machine to which I have root access I'd like to fix some 
> environment setting for running zsh processes, i.e.
>
> there are some xterms running zsh.
>
> I'd like to achieve the effect as if a local user had entered
> export BROWSER=firefox
> in his xterm.
>
> Is this possible?

No.  The environment in which a process starts is typically passed to 
the main routine.  You can't simply modify it after the program has 
started.

What are you trying to achieve with the 'export BROWSER=firefox'?

If you're calling some kind of URL-launcher (looks like something you'd 
need for `xdg-open` or such), you could modify the launcher to set that 
variable if none is passed in.

Even better, if your running zsh'es have something like ~/bin/ in their 
path, you could insert a wrapper program:

e.g. I have:

$ cat ~/bin/xdg-open
#!/bin/zsh
exec chromium -remote $argv

(In your case, sounds like you'd want 'firefox' where I have 'chromium')

Otherwise, let us know what you're trying to do, rather than how you 
want to accomplish it.

-- 
Best,
Ben


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-31 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-31 16:22 "Remote" execution - is this possible? Helmut Jarausch
2011-03-31 17:07 ` Benjamin R. Haskell

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).