Synchronet v3.21e-Win32 (install) has been released (Mar-2026).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:env [2017/12/04 20:43] – Added new 'automatic' section to detail the env variables set by sbbs digital manconfig:env [2026/03/10 19:39] (current) – Update Windows section (e.g. remove Win9x reference) digital man
Line 13: Line 13:
 ===== SBBSEXEC ===== ===== SBBSEXEC =====
  
-The ''SBBSEXEC'' environment variable //may// be set to the path of your Synchronet ''[[dir:exec]]'' directory. This may be needed for some development situations.+The ''SBBSEXEC'' environment variable //may// be set to the path of your Synchronet ''[[dir:exec]]'' directory. This may be needed for some development situations (e.g. where your Synchornet ''exec'' directory is not ''../exec'' relative to your Synchronet ''[[dir:ctrl]]'' directory). Most sysops will not need to set this environment variable.
  
 ===== SBBSNODE ===== ===== SBBSNODE =====
Line 22: Line 22:
 ===== Setting ===== ===== Setting =====
  
-==== Windows NT ====+==== Windows ====
  
-For Microsoft Windows NT-based operating systems (this includes Windows 2000XP, Vista, and Windows 7), goto the Windows Control Panel->System->Advanced->Environment Variables->System Variables->New... and set+For Microsoft Windows NT-based operating systems, go to the Windows Control Panel->System->Advanced->Environment Variables->System Variables->New... and set
   * Variable name: ''SBBSCTRL''   * Variable name: ''SBBSCTRL''
   * Variable value: ''c:\sbbs\ctrl''   * Variable value: ''c:\sbbs\ctrl''
 (replace ''c:\sbbs\ctrl'' with the full path to your ''[[dir:ctrl]]'' directory) (replace ''c:\sbbs\ctrl'' with the full path to your ''[[dir:ctrl]]'' directory)
  
-==== Windows 9x ====+==== Debian-based Linux ==== 
 +(Yes, this includes Ubuntu Linux)
  
-For Mirosoft Windows 9x-based operating systems, edit your ''C:\AUTOEXEC.BAT'' file +See https://wiki.debian.org/EnvironmentVariables
-and add the line: +
-    SET SBBSCTRL=c:\sbbs\ctrl +
-(replace ''c:\sbbs\ctrl'' with the full path to your ''[[dir:ctrl]]'' directory)+
  
 +Example ''~/.profile'' addition that both sets the ''SBBSCTRL'' variable and adds the Synchronet ''[[dir:exec]]'' directory to the search path:
 +<code sh>
 +export SBBSCTRL=/sbbs/ctrl
 +export PATH=$PATH:/sbbs/exec
 +</code>
 ==== bash/sh ==== ==== bash/sh ====
  
Line 43: Line 46:
  
     SBBSCTRL=/sbbs/ctrl && export SBBSCTRL     SBBSCTRL=/sbbs/ctrl && export SBBSCTRL
-(replace ''/sbbs/ctrl'' with the full path to your ''[[dir:ctrl]]'' directory)+(replace ''/sbbs/ctrl'' with the full path to your Synchronet ''[[dir:ctrl]]'' directory)
  
 +=== /etc/profile ===
 +In Debian and Debian-based Linux distributions (e.g. Ubuntu), you can also set environment variables in your ''/etc/profile'' file (and/or ''~/.profile''), like so:
 +
 +  export SBBSCTRL=/sbbs/ctrl
 +  
 +=== env ===
 +You may also use the ''env'' utility to set an environment variable for a specific program invocation:
 +
 +  env SBBSCTRL=/sbbs/ctrl /sbbs/exec/sbbs
 +  
 +Note: You can use the same syntax **without** the ''env'' part. The environment variable(s) specified will only be set for the life of the process being invoked.
 +
 +=== sudo ===
 +When using the ''sudo'' command to execute a Synchronet program with elevated (e.g. root) privileges, you may need to pass the ''-E'' option to preserve the environment variables set in the parent shell:
 +
 +  sudo -E sbbs
 +  
 +=== Testing ===
 +
 +You can use either of the following command-lines to test if a particular environment variable is set correctly (the environment variable's current value should be printed in response to either):
 +
 +  * ''echo $SBBSCTRL''
 +  * ''printenv SBBSCTRL''
 +
 +
 + 
 ==== csh/tcsh ==== ==== csh/tcsh ====
  
Line 68: Line 97:
 | ''SBBSNNUM''  | Current node number                           | ''1'' | | ''SBBSNNUM''  | Current node number                           | ''1'' |
 | ''PCBNODE''   | Current node number (only for DOS programs)   | ''1'' | | ''PCBNODE''   | Current node number (only for DOS programs)   | ''1'' |
 +| ''PCBDRIVE''  | Current node drive letter                     | ''C:'' |
 +| ''PCBDIR''    | Current node path (sans drive letter)         | ''\SBBS\NODE1\'' |
 | ''DAY''       | Current day of the month (01-31             | ''01'' | | ''DAY''       | Current day of the month (01-31             | ''01'' |
 | ''WEEKDAY''   | Current day of the week abbreviation          | ''Mon''| | ''WEEKDAY''   | Current day of the week abbreviation          | ''Mon''|
Line 77: Line 108:
  
  
 +===== See Also =====
 +  * [[:config:|Configuration]]
 +
 +
 +{{tag>configuration operating_system}}