set permanent script options

Page Version: 1.6
Page Updated: 2014-02-21

Please go to the options page if you are just looking for how to use script options, not set them permanently.

Sometimes you might want to always use a script option, or change some other value in a script. Now you can do this easily, by simply adding an option file, which the script will read.

This feature is available in smxi, svmi, and sgfxi.

ALERT: remember, you cannot override most of these options when you set them sticky. The only ones you can override are the ones that have a value other than 'true', otherwise it will always run, so be sure to only set options you always use.

All items in this file will be logged each time you run the script to assist with debugging (it's guaranteed, of course, that people will make typos or mistakes). Remember, if you don't spell the variable name right, it will get ignored in the script completely.

The first step is to make the script values file, which the script will always test for before running, and it will include automatically any options values you set in there. Remember, this is going to change the default global script values, so try to be careful.

You can either edit the /usr/local/bin/XXXX-values file directly, or simply echo the value to it. I'll use the echo method here to show it here to keep it simple.

For non standard use, advanced testing and development features, look at developer only options and information.

smxi :: sticky option file

First, make the file, which smxi will test for and use if present:

# create the file first, as root in terminal
touch /usr/local/bin/smxi-values

Here's a list of supported variables and option hard coding values, nothing else will be officially supported.

If you picked for example the ADVANCED_KERNEL and SCRIPT_COLORS options, your /usr/local/bin/smxi-values file would look like this:

ADVANCED_KERNEL='true'
SCRIPT_COLORS=3

And if you wanted to change that in the future, you can just edit that file, or delete it, and smxi will return to its defaults.

top

smxi :: manual settings in /etc/smxi.conf

There are a few options you can set in the smxi configuration file if you want. You will need to edit /etc/smxi.conf as root to make these changes.

Remember that you made these changes, they will run every time smxi runs.

top

sgfxi :: sticky options

There are a few options you might want to set to always run, but overall, because sgfxi changes so often, I don't recommend making very many options sticky.

First, create the sticky option file:

touch /usr/local/bin/sgfxi-values

top

svmi :: sticky options

svmi doesn't really have many options you'd want to set routinely, but in case you can think of anything, here's how.

# create the file first, as root in terminal
touch /usr/local/bin/svmi-values

In general, there really aren't that many options you'd want to always have on, because the only useful ones override script and run things automatically, which is a pain if you want to do anything else at some point. So I'm not going to recommend anything here.

top