Joined: July 2004
||Posted: May 01 2006,13:05
The PATH variable, as well as any other environment variable, can be set from anywhere. Typically if you just need the change applied to the current shell you'd set and/or export the variable from the shell (in bash: export PATH="/opt/tcltk-8.4/bin:$PATH") and then start the application from that same shell. This is one thing a shell wrapper will do, automating the task.
If it's a change that you will need to make permanently, the typical location would be /home/dsl/.bash_profile for your user, or /etc/profile for all users. .bashrc can be used instead of .bash_profile, but the new path will be added to $PATH every time you open a new shell. If you never use the console you could export it from .xinitrc instead, which would mean having only to restart X rather than drop to console, source .bash_profile, and then restart X.
Once wish is in your path, you will still need to modify the script, because it calls /usr/local/bin/wish8.1 specifically. One common way to avoid this problem is to start the script with this instead:
Note the commented backslash...this is vital to allow bash to run exec, but to prevent it from being rerun in wish.
|Code Sample |
exec wish "$0" "$@"
The tkcon menu item/icon sets the path for the consoles, which is why that works. I didn't include wrappers for Tcl because that would be an extra complication just to make things more convenient for the newbie. I assumed that a person who is scripting would already be familiar with common tasks like setting envrironment variables =o)