Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.8
-
None
-
None
-
Normal
-
Patch available
Description
I believe that Forrest's documentation at:
Documentation current/Using Forrest/Installing Forrest/Setting up the Environment/In Unix/Linux
should contain a section for setting up using the update-alternatives system. I am new with Forrest, but it seems that it does not require any environment variables; this setup is only to achieve putting the executable on the path. The alternatives system would then be preferred for some, like myself, who do use it to administer these kinds of things.
The following may be viable to use in the (English) docs for this purpose:
* For systems the use the Debian update-alternatives system:
If your system uses the alternatives system to manage application binaries and their locations, you may use that to link Forrest into your system's binary directory, instead of explicitly exporting environment variables. To check if your system has the alternatives system installed, execute this command:
update-alternatives --version
Update-alternatives will print its version if it is installed. If so, you may then add an entry for Forrest. Installing an update-alternatives entry may need to be run with root privileges. On some systems, that can be achieved with the "sudo" command, which executes single commands as the super user: for example, Ubuntu's GNU/Linux system uses this feature. Or you may need to contact a system administrator to install.
To install a Forrest entry, first, gather the path to Forrest's executable, and also note its version. In this example, Forrest has been unpacked and placed into '/opt/Apache/apache-forrest-0.8' (the executable is at bin/forrest). Then execute this command (here we use sudo to execute update-alternatives with root privileges):
sudo update-alternatives --install /usr/bin/forrest forrest '/opt/Apache/apache-forrest-0.8/bin/forrest' 800
The arguments to this command include '/usr/bin/forrest' as the system's location for the binary link, 'forrest' as the update-alternatives short name for this entry, '/opt/Apache/apache-forrest-0.8/bin/forrest' as the actual binary's location, and '800' as the priority.
Alternatives entries have a priority because you may install other versions of Forrest, and switch among them using update-alternatives: the highest priority entry will be selected as the default until you explicitly select another one to become active. Here, we have chosen a number based on Forrest's version: version 0.8 is installed, and priority 800 leaves room for adding several other versions; for instance, 0.90 may use priority 900, and 1.0 may be 1000.
Forrest should now be available on your command line. Execute:
forrest --help
Forrest should print its help text. For more help with the alternatives system, use:
update-alternatives --help
or
man update-alternatives
Documentation current/Using Forrest/Installing Forrest/Setting up the Environment/In Unix/Linux
should contain a section for setting up using the update-alternatives system. I am new with Forrest, but it seems that it does not require any environment variables; this setup is only to achieve putting the executable on the path. The alternatives system would then be preferred for some, like myself, who do use it to administer these kinds of things.
The following may be viable to use in the (English) docs for this purpose:
* For systems the use the Debian update-alternatives system:
If your system uses the alternatives system to manage application binaries and their locations, you may use that to link Forrest into your system's binary directory, instead of explicitly exporting environment variables. To check if your system has the alternatives system installed, execute this command:
update-alternatives --version
Update-alternatives will print its version if it is installed. If so, you may then add an entry for Forrest. Installing an update-alternatives entry may need to be run with root privileges. On some systems, that can be achieved with the "sudo" command, which executes single commands as the super user: for example, Ubuntu's GNU/Linux system uses this feature. Or you may need to contact a system administrator to install.
To install a Forrest entry, first, gather the path to Forrest's executable, and also note its version. In this example, Forrest has been unpacked and placed into '/opt/Apache/apache-forrest-0.8' (the executable is at bin/forrest). Then execute this command (here we use sudo to execute update-alternatives with root privileges):
sudo update-alternatives --install /usr/bin/forrest forrest '/opt/Apache/apache-forrest-0.8/bin/forrest' 800
The arguments to this command include '/usr/bin/forrest' as the system's location for the binary link, 'forrest' as the update-alternatives short name for this entry, '/opt/Apache/apache-forrest-0.8/bin/forrest' as the actual binary's location, and '800' as the priority.
Alternatives entries have a priority because you may install other versions of Forrest, and switch among them using update-alternatives: the highest priority entry will be selected as the default until you explicitly select another one to become active. Here, we have chosen a number based on Forrest's version: version 0.8 is installed, and priority 800 leaves room for adding several other versions; for instance, 0.90 may use priority 900, and 1.0 may be 1000.
Forrest should now be available on your command line. Execute:
forrest --help
Forrest should print its help text. For more help with the alternatives system, use:
update-alternatives --help
or
man update-alternatives