[PLUG] Environment variable for a program
patrick.t.finnegan.1
finnegpt@purdue.edu
Wed, 3 Oct 2001 14:08:57 -0500 (EST)
On Wed, 3 Oct 2001, Nolan Eakins wrote:
> I do not know if this will work in your crontab, but using the form
> "VARIABLE=value command" also sets the enviroment variable to value when
> the command is ran.
>
> Later,
> Nolan
There's another method that lest you do more:
make a shell script and run that!
eg:
------------run_it.sh-------------
#!/bin/bash
export DISPLAY=:0
ls -Ral / > /tmp/a
xedit /tmp/a &
rm /tmp/a
----------------------------------
(note that if you do that in crontab you'll get truely pissed at it really
quicky, especially if you make it fire up every minute or so. Also you'd
need to do an "xhost +localhost" in that user's session to make xedit be
able to access the display :)
-- Pat
Plug publicity committee -- http://plug.purdue.org
Slackware Linux -- http://slackware.com
"I just want an EDitor!! Not a 'viitor'. Not a 'emacsitor'. Those aren't
even WORDS!!!! ED! ED! ED IS THE STANDARD!!!"
-- Patrick J. LoPresti, 11 Jul 91 on alt.religion.emacs,alt.slack
"They said, 'What do you do for this country?' and I said 'I tell jokes.'"
-- Lewis Black