You are not logged in.

#1 2010-10-30 23:12:57

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

urxvt -e and environment vars? [SOLVED]

Dear all,

I would like to open a window with an ncurses program that needs an environment var to be set before it starts. From a terminal, I can cast:

VAR=value /usr/bin/program

How can I embed this into an urxvt -e statement? The syntax

urxvt -e VAR=value /usr/bin/program

seems to be wrong.

Thanks,
Fabio

Last edited by iosonofabio (2010-10-31 09:03:26)

Offline

#2 2010-10-30 23:23:19

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: urxvt -e and environment vars? [SOLVED]

export VAR=value && urxvt -e program?

Last edited by skottish (2010-10-30 23:23:35)

Offline

#3 2010-10-31 09:02:58

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: urxvt -e and environment vars? [SOLVED]

I should have been more explicit. I want to embed this in turn into the i3 config file. I cannot export variables, because they would be set globally for my TTY1 and this is undesirable (the env var should be only set for THAT program). But your solution is almost right:

VAR=value && urxvt -e /usr/bin/program args

or, already embedded in .i3/config:

bind keycode exec VAR=value && urxvt -e /usr/bin/program args

Thanks, question solved!

Offline

Board footer

Powered by FluxBB