[Techtalk] detecting whether started at CLI or icon
Miriam English
mim at miriam-english.org
Tue Aug 28 21:16:43 UTC 2012
Hi folks,
I've been fiddling with a shell script that I sometimes start from the
commandline and sometimes from an icon. It would be nice to have some
way for it to detect how it started.
Do you know of any inherent difference?
Or do I have to resort to fudging it by doing something like having the
icon run a different script which then calls the main script after
setting an environment variable or passing a parameter, or something?
Cheers,
- Miriam
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs: http://miriam-e.dreamwidth.org
http://miriam-e.livejournal.com
More information about the Techtalk
mailing list