Sakis3G configuration

From Sakis3G wiki

Jump to: navigation, search

Notice: Not all pages of Wiki are reviewed yet for being current with version 0.2.0e, and might still describe 0.2.0d. Excuse me for the inconvenience. Issue will be fixed in the upcoming days.

PD

This wiki is supposed to hold all information required for letting someone use Sakis3G script. Feel free to register and contribute to this effort.
Notice: This page is released into public domain. Those who wish to contribute, should first read this page.

PD

Sakis3G script is supposed to be capable of getting you connected with your operator without requiring any additional configuration. However, neither world nor this script is perfect. Moreover, configuration helps you get rid of the same boring questions you need to answer every time you attempt to connect.


Contents

Configuration types

There are two types of configuration options for Sakis3G script:

  1. Switches. Switches alter behavior of script, enabling or disabling functionality. It is usually provided only one switch per functionality: the one that alters default operation. As an example, storage switch is a synonym for nostorage switch. There is not such thing as yesstorage since default functionality anyway respects storage personality of a USB device.
  2. Variables. Variables provide an other than default value to internal variables of Sakis3G script, or provide a shortcut mechanism to avoid answering the same question again and again. As an example, providing SIM_PIN="1234" makes sure that script will never ask you again for the PIN number of your SIM card (and will effectively block any other SIM card requiring PIN number, that might get connected to your PC).

Both configuration types can either be supplied on command line, or be placed within configuration files.


Keep in mind:

Syntax

Switches Syntax

Switches are supposed to be not prefixed, or prefixed with a single or double minus.

[-][-]<switch name|switch synonym>

Following our previous switch example, all:

have the exact same effect. Most switches also offer synonyms like our nostorage example.

  • Synonyms are only provided for aesthetic and backwards compatibility purposes.
  • Since a synonym's functionality may change in the future, you should generally avoid using synonyms.

Variables Syntax

Variables are expected to have the following syntax:

<Variable name> = [ "<Variable value>" | <Valuewithnospace> ]

Which means that quotes are not really needed when it comes to SIM_PIN variable, mentioned above, since PIN numbers are only consisted of decimal digits and spaces are not allowed.

Multiple values

There is also multiple values syntax:

<Variable name> = [ "<Value1> [ <Value2> [ ... ] ]" | <Valuewithnospace> ]

Multiple values syntax allows you to provide multiple valid values for a variable. Sakis3G script will iterate through supplied values until first one being valid is encountered. This value automatically replaces contents of variable and iteration stops.

Multiple values syntax is only available for the following variables:


Example

To better explore multiple values syntax, let's consider MODEM variable. This variable is expected to hold USB IDS of the USB modem (in case your modem is indeed a USB device) which is going to be used for getting connected. If you only posses one USB modem, you should not be concerned of this variable's content.

However, if you have two USB modems, one being a ZTE MF636 (19d2:2000→19d2:0031 through mode switching) and the other one being an Alcatel X200 (1bbb:f000→1bbb:0000 through mode switching), you can do yourself a little favor and permanently improve your productivity. Let's face the facts:

  • A switched modem can get you connected faster than one which still needs to get switched.
  • ZTE MF636 needs more time than Alcatel X200 to get switched since it includes a storage volume with loaded media, even when switched, which needs to be setup.
  • When ZTE MF636 is switched, it requires less time than switched Alcatel X200, since X200 may need additional time to wake up through appropriate AT command and then register network once more.

These all mean:

  • If none of the modems is already switched, switch Alcatel X200, since it takes less time.
  • If one of the modems is already switched, use this one unconditionally.
  • If both modems are already switched, use ZTE MF636 since it needs no wake-up time.

You can implement this scenario by loading MODEM variable with a properly crafted value:

MODEM="19d2:0031 1bbb:0000 1bbb:f000 19d2:2000"

This way, you exploit the way Sakis3G script iterates through multiple values, by eventually defining a preference order. Switched modems (19d2:0031 and 1bbb:0000) come before their non-switched counterparts. Switched MF636 comes before switched X200, while non-switched X200 comes before non-switched MF636.

Note Note: However, this one setup has a logical fault. If one modem is already switched, the other one will never get switched. So, this one rule actually means "avoid switching more devices if one is already switched".

Configuration files

When using configuration files, you should have the following in mind:

  • Sakis3G script will never generate or modify any configuration file. You need to create/edit configuration file(s) by yourself.
  • Lines starting with '#' and empty lines are ignored.
  • Only variables and switches are taken into consideration when parsing configuration files. It is not possible to define an actor within a configuration file.
  • Variable values and switches specified within configuration files:
    • cannot be overridden/purged from command line. Therefore, you should be cautious on what you place inside configuration file(s),
    • should appear one per line:
      --nostorage
      MODEM="19d2:0031 1bbb:0000 1bbb:f000 19d2:2000"
  • Every time script is started, configuration is determined by running a specific sequence. If more than one of the eligible configuration file(s) exist, they are processed in the order they appear below:
    1. $HOME/.3gpin ($HOME of invoking user)
    2. Command line arguments
    3. /etc/default/3gpin
    4. /etc/sysconfig/3gpin
    5. /etc/3gpin
    6. /etc/default/sakis3g.3gpin
    7. /etc/sysconfig/sakis3g.3gpin
    8. /etc/sakis3g.3gpin
    9. /etc/default/sakis3g
    10. /etc/sysconfig/sakis3g
    11. /etc/sakis3g.conf
    This means that /etc/sakis3g.conf overrides anything, still is unable to rollback switches enabled on command line. Instead, variables can be unset by assigning them nothing:
    MODEM=
  • Configuration files named ".3gpin", "3gpin" and "sakis3g.3gpin", regardless of their location, are only allowed to contain 4 digits denoting PIN number that should be used. If they contain more than 4 bytes, only first four bytes are taken into consideration.
    They are actually converted to SIM_PIN="<those four bytes>" statements and they are still available for backwards compatibility to older versions and as the only mean for a user to supply its own PIN number.


Reference

Switches

Switches alter behavior of script, enabling or disabling functionality. It is usually provided only one switch per functionality:

  • the one that alters default operation.

As an example, storage switch is a synonym for nostorage switch. There is not such thing as yesstorage since default functionality anyway respects storage personality of a USB device.


Switches can either be supplied on command line, or be placed within configuration files.

Note Note: If a switch exists in command line, there is no way it can be unset within a configuration file and vice versa.


Name Synonyms Description
-b --balloons balloon
baloons
baloon
ballons
ballon
balons
balon
This switch instructs Sakis3G script to:
  • display balloon notifications, using notify-send utility, when an action is complete.
  • display balloon notifications, using zenity, when events occur and script is running as helper.
Note Note: This switch is disabled when using a text mode UI.
Note Note: Action completion notifications are disabled when --osd switch is set.
Note Note: Some systems fail to present notifications when notify-send is called by root, displaying following text:
libnotify-Message: Unable to get session bus: Did not receive a reply. Possible 
causes include: the remote application did not send a reply, the message bus sec
urity policy blocked the reply, the reply timeout expired, or the network connec
tion was broken.
-c --console stick_to_console This switch instructs Sakis3G script not to take into consideration any active X displays and instead remain in (virtual) terminal from which it was invoked.
Note Note: Use of this switch requires you to explicitly set:

if you need an interactive text mode UI to be used.

-d --debug DEBUG This switch enables debug mode.
  • This is the first step one should make when troubleshooting.
  • When Sakis3G script operates in debug mode a huge amount of debug information is sent to standard error.
  • Providing debug output when seeking support is essential.

To grab debug information use following syntax:

sakis3g connect --debug 2> /home/sakis/sakis3g.log
Note Note: Use of this switch significantly reduces performance. Make sure it is not set when not required.
-f --nofix fix
nosmart
smart
NOFIX
NOSMART
Whenever a data connection is initiated, and before informing you about connection being established, Sakis3G script performs the following two actions:
  1. Forces default gateway to be the IP of P-t-P peer provided by newly interface.
  2. If DNS servers, provided by operator, are 10.11.12.13 and 10.11.12.14, sets Google DNS servers instead.

These actions take care that newly initiated P-t-P connection is properly setup.


This switch allows you to prevent these actions from taking place. This can be useful:

  • if you do not want all traffic to pass through "expensive" WAN connection and only direct specific traffic through mobile internet, or
  • if you anyway set appropriate DNS servers using another method/interface/IP.
Note Note: Action which might be specified by CONNECTION_HOOK variable is still performed when this switch is set.
Note Note: This switch disables --googledns switch and DNS variable.
-g --googledns google
GOOGLEDNS
GOOGLE
Setting this switch instructs Sakis3G script to set Google DNS servers immediately after connection with operator is established, regardless of name servers provided by operator.
Note Note: This switch is equivalent to:
DNS="8.8.8.8 8.8.4.4"
Note Note: This switch is disabled when --nofix switch is set.
-h --nohal hal Sakis3G script interacts with HAL (if hald is installed) in two occasions:
  1. Before switching modem in order to exclusively lock interface "org.freedesktop.Hal.Device.Storage" and avoid HAL messing with USB device while Sakis3G script does not expect it.
  2. Immediately after modem has been PIN unlocked and registered to network (and before setting APN and connecting) in order to inform HAL that a modem exists.


This switch instructs Sakis3G script not to contact HAL.

Note Note:

This switch is automatically set when one or more of the following utilities are not found within path:

  • hal-device
  • hal-find-by-property
  • hal-get-property
  • hal-lock
  • hal-set-property
Note Note: This switch also implies --nohalinform switch.
-i --interactive This switch informs Sakis3G script that it can utilize its interactive mode and not abort when user interference is required.

This means:

  • It can ask user to perform selections when required,
  • It can prompt user to provide values when required,
  • User can provide root password if required.


Script takes this information into consideration when deciding which UI to use.

Note Note: Explicitly setting a UI (by using SGUI variable or respective switches) which requires --interactive switch being set, results into interactive mode anyway being set.
Note Note: When interactive mode is not set, and not implied, Sakis3G script will abort whenever user interference is required.
Note Note: When:
  • DISPLAY environment variable points to a valid local X session display, and
  • access is granted for that display, and
  • tools required for using at least one Graphical UI are available, then

this switch is set unconditionally. In other words, an X display implies interactive mode availability.

  • If you need to prevent this assumption (however, this will prevent you from using any Graphical UI):
    • consider using --console switch, or
    • unset DISPLAY environment variable before invoking Sakis3G script:
      unset DISPLAY; sakis3g
-k --nostorage storage
killstorage
Some USB modems provide a storage interface even after being mode switched. This is essentially true for devices offering an SD/microSD/MMC slot. This triggers numerous procedures being initiated for setting up those block device(s) exported by storage interface. Depending on kernel version and system setup:
  • Setting up those volume(s) may take several seconds.
    • Especially if your system intends to automatically mount exported volume(s).
  • Setting up those volume(s), may render modem unusable.
  • Accessing those volume(s) (even after data connection is established) may still render modem unusable.
  • Setting up modem-part and storage-part simultaneously may render one or both parts unusable.


Sakis3G script takes all measures required for preventing any simultaneous modem and storage operations, leading to an, as much as possible, stable environment:

  1. Locks HAL before switching device.
  2. Switches device.
  3. Checks if usb_storage got bound to storage interface.
    • If it is bound:
      • Unlocks HAL and checks if HAL spawned a polling process.
        • If a polling process was spawned:
          • Awaits for spawned process to finish mounting volumes.
    • If it is not bound:
      • Unlocks HAL.
  4. Then proceeds into setting up modem-part.


Doing all these may take several seconds (even up to 30 seconds). Even then, things can still be destroyed by another silly process messing with modem or volume(s).


This switch instructs Sakis3G script to safely unbind usb_storage module from storage interface (if possible). Chances of storage-part operations interfering with modem-part operations is then highly reduced.

Note Note: Using this switch renders USB modem's SD/microSD/MMC card slot unusable.
Note Note: Using this switch simultaneously with --nohal switch, may get you into various troubles:
  • Your system and/or file manager may complain about volume disappearing.
  • Your system may recover by re-binding usb_storage module to storage interface.
    • Still Sakis3G script will be considering it did its job into eliminating storage part and will proceed.
    • Simultaneous access/setup operations to modem and storage parts will be taking place, leading into one or both parts being unusable.
-l --nohalinform noinform Whenever Sakis3G script has finished setting up your modem, it updates serial node's HAL entry so that your system is aware of the newly attached modem. Using this switch you can disable this functionality.
Note Note: Disabling this functionality may be helpful if modemmanager keeps messing with newly appeared modems, preventing (or delaying) Sakis3G script from using modem.
Note Note: This switch is implied when --nohal switch is set.
-n --noprobegsm NOPROBEGSM
noprobe
NOPROBE
gsm
GSM
Sakis3G script probes character device node (aka. tty node) for GSM capabilities before proceeding into attempting data connection. However, some modems do not advertise their GSM capabilities resulting into Sakis3G script aborting connection.


Setting this switch allows you to force Sakis3G script consider tty node GSM capable.

-o --osd OSD
preferosd
prefer_osd
This switch instructs Sakis3G script to use OSD messages for verbosing and displaying progress bars, instead of method provided by UI.
  • This switch requires aosd_cat/aosd or osc_cat/xosd being available within PATH.
  • If none of them is found within PATH, this switch will be ignored.
  • If both of them are found, osd_cat/xosd is used since it is able to provide progress bar functionality.
  • If --noverbose switch is set, OSD messages still appear as a final notification text (e.g. "Connected to..." or "Disconnected").
    • If you do need to also eliminate these:
Note Note: You need to have access to a valid local X session display. Either appropriately set DISPLAY environment variable or use Sakis3G DISPLAY and LOCALAUTHORITY variables to specify target display.
Note Note: Use of this switch disables --balloons switch.
Note Note: This switch is disabled when using a text mode UI, even if an X session DISPLAY is available/detected.
-P --persist forever This switch is only taken into consideration with helper actor is running. This switch instructs helper to ignore user selecting Exit option and instead keep running.
  • This can be useful when you have to cope with users that keep selecting Exit and then complain that "it disappeared".
Note Note: Using this switch can be really annoying when you attempt to stop Sakis3G script by killing it.
-p --pppd ppp
directpppd
direct_pppd
This switch instructs Sakis3G script to directly use pppd and not call wvdial.
  • This switch is automatically set when wvdial is not found within path.
-q --quiet silent Eliminates any confirmation/information/error/verbose text and progress bars from appearing.
  • Dialogs prompting user to make a selection or provide a value will still appear.
Note Note: This switch implies all --noerrors, --nonotify and --noverbose switches.
--noerrors noerror Eliminates any error message from appearing.
Note Note: This switch is implied when --quiet switch is set.
--nonotify noinform
nonotifications
noinformation
Eliminates any confirmation/information text from appearing.
  • Dialogs prompting user to make a selection or provide a value will still appear.
Note Note: This switch is implied when --quiet switch is set.
--noverbose Eliminates any verbose text or progress bar from appearing while Sakis3G script is working.
Note Note: This switch is implied when --quiet switch is set.
-s --sudo alwayssudo
always_sudo
This switch instructs Sakis3G script to always use sudo utility for acquiring root privileges.
  • This can be useful when you do not want to share root password with users, still allow them to use Sakis3G script:
Type this:
$ sudo visudo
Append simular lines to file and save it.
%dialout   ALL=(root) NOPASSWD: /usr/bin/sakis3g
sakis      ALL=(root) NOPASSWD: /usr/bin/sakis3g
User sakis and members of dialout group will
then be able to use Sakis3G script without ever
being prompt to supply administrator password.
Note Note: When using a sudo based distribution (like Ubuntu), there is no need to use this switch, since gksu will anyway use sudo as backend.
Note Note: Setting this switch while using a Graphical UI, will force Sakis3G script to fail since sudo output will end up to void, unless you use NOPASSWD as illustrated in example above.
-T --showtext This switch (in conjuction with --debug switch) results into debug information, regarding translations, to appear in standard error.
-t --notranslate If there is a translation for your locale, it is automatically used as long as UI allows it. Setting this switch disables translations.
Note Note: If no appropriate translation is found, and no other translation file is provided through TRANSLATE variable, this switch is automatically set.
Note Note: If you can afford English text, setting this switch will significantly improve performance.
-u --unsafe nosafety Several USB devices have a tendency to "break" after being plugged for a while. This may happen due to:
  • Bad hardware implementation of modem or USB controller, or
  • Bugs in device EEPROM, or
  • An unknown/undocumented AT command is required to prevent device from enterring its propretiary "power saving" mode.

Sometimes, when this happens, any application trying to access USB bus goes stalled until device is physically removed from BUS. Sakis3G script uses safety checks to avoid being stalled. Instead, it informs user that he should try reconnecting device.


Setting this switch allows you to disable those safety checks.

  • If this never happens to your device, it is safe that you set it and reduce time required to connect by a maximum of 4 seconds.
  • If Sakis3G script incorrectly reports it happened and stops working for no reason, you can try setting this switch in case it helps (but I doubt it will).
-v --voodoo magic
please
Voodoo
Magic
Please
Enables Voodoo mode. When Sakis3G script is executed under voodoo mode it will attempt to perform without your interference (if possible).
Note Note: You should be cautious when using voodoo mode. If your modem is not found with embedded Usb-ModeSwitch device database, and in order to avoid asking you about which your modem is, Sakis3G script may consider an attached mass storage USB device being a not yet switched device. This will lead into device being ejected.
--9menu Forces script to use respective application as Sakis3G UI.
  • If respective application is not found within PATH, another UI will be used instead.
  • Equivalent to:
SGUI="9menu" or
SGUI="kdialog" or
SGUI="Xdialog" or
SGUI="zenity"
Note Note: You need to have access to a valid local X session display. Either appropriately set DISPLAY environment variable or use Sakis3G DISPLAY and LOCALAUTHORITY variables to specify target display. Otherwise, a text mode UI will be used instead.
Note Note: These switches imply --interactive switch.
--kdialog
--Xdialog xdialog
--zenity
--gnome-terminal Forces script to spawn a new Sakis3G script instance within respective terminal emulation application.
  • Spawned instance will be using best available text mode UI. There is no way to specify UI which spawned instance will be using.
  • If respective terminal application is not found within PATH, another UI will be used instead.
  • Equivalent to:
SGUI="gnome-terminal" or
SGUI="konsole" or
SGUI="xterm"
Note Note: You need to have access to a valid local X session display. Either appropriately set DISPLAY environment variable or use Sakis3G DISPLAY and LOCALAUTHORITY variables to specify target display. Otherwise, a text mode UI will be used instead.
Note Note: These switches imply --interactive switch.
--konsole
--xterm
--dialog Forces script to use respective utility for presenting UI.
  • If required utility is not found within PATH another UI will be used instead, not necessarily a text mode UI. If you want to make sure a text mode UI will be used, also supply --console switch.
  • Equivalent to:
SGUI="dialog" or
SGUI="whiptail"
Note Note: Both switches imply --interactive switch.
--whiptail
--iterm interactiveterminal Forces script not use any UI and instead resemble a simple text UI using colored output and gathering input through shell builtin commands.
  • Equivalent to:
SGUI="interactive terminal"
Note Note: Implies --interactive switch.
--term terminal Forces script not to use any UI.
SGUI="terminal"
--legacy Provided for convenience, simulating legacy version's appearance.
  • Equivalent to supplying both:
--9menu --osd

 

Variables

Variables provide an other than default value to internal variables of Sakis3G script, or provide a shortcut mechanism to avoid answering the same question again and again. As an example, providing SIM_PIN="1234" makes sure that script will never ask you again for the PIN number of your SIM card (and will effectively block any other SIM card requiring PIN number, that might get connected to your PC). Variables can either be supplied on command line, or be placed within configuration files.

Keep in mind:

  • If a variable exists in both the command line and a configuration file, value from configuration file will be used.


Sakis3G script does not require that you provide a value to any of these variables. Even if it fails to find appropriate value itself, it will ask that you do it through UI. You only need to supply a value on variables if:

  • no UI is available, rendering script unable to proceed lacking your feedback,
  • you want to avoid navigating and providing answers through UI,
  • automatically selected value is not correct,
  • you want to prevent users from making wrong decisions themselves, and instead force appropriate values through a configuration file.
  • you want to fine tune Sakis3G script operation.


Multiple values syntax is only available for the following variables:

Variable index by section

Section Device selection USB Device setup GUI related ISP related Menu actions
Variables MODEM
OTHER
USBMODEM
BLUETOOTH
UNDISCOVERABLE
RFSERVICE
RFCHANNEL
CUSTOM_TTY
USBDRIVER
USBINTERFACE
AOSDFONT
XOSDFONT
OSDFONT
MENUFONT
TRANSLATION
DESKTOPICON
SGUI
APN
APN_USER
APN_PASS
CUSTOM_APN
FORCE_APN
FORCE_ISP
DIAL
MENU
MOREMENU
Section Modem related Network related SIM card related System integration X session access
Variables CHAT_ABORT_STRINGS
INIT
DNS
PPPD_OPTIONS
SIM_PIN CONNECTION_HOOK
DESKTOP
LOGPOSITION
PPPD_PEERS
PPPINT
DISPLAY
LOCALAUTHORITY

Alphabetical index of variables

Variable Section
AOSDFONT GUI related
APN ISP related
APN_USER ISP related
APN_PASS ISP related
BLUETOOTH Device selection
CHAT_ABORT_STRINGS Modem related
CONNECTION_HOOK System integration
CUSTOM_APN ISP related
CUSTOM_TTY Device selection
DESKTOP System integration
DESKTOPICON GUI related
DIAL ISP related
DISPLAY X session access
DNS Network related
FORCE_APN ISP related
FORCE_ISP ISP related
INIT Modem related
LOCALAUTHORITY X session access
LOGPOSITION System integration
MENU Menu actions
MENUFONT GUI related
MODEM Device selection
MOREMENU Menu actions
OSDFONT GUI related
OTHER Device selection
PPPD_OPTIONS Network related
PPPD_PEERS System integration
PPPINT System integration
RFCHANNEL Device selection
RFSERVICE Device selection
SGUI GUI related
SIM_PIN SIM card related
TRANSLATION GUI related
UNDISCOVERABLE Device selection
USBDRIVER USB Device setup
USBINTERFACE USB Device setup
USBMODEM Device selection
XOSDFONT GUI related


Device selection

MODEM, OTHER, USBMODEM, BLUETOOTH, UNDISCOVERABLE, RFSERVICE, RFCHANNEL, CUSTOM_TTY

These variables guide device selection procedure into locating hardware that will be used as a modem.

Name Synonyms and examples Description
MODEM No Synonyms Possible values:
  • OTHER

This variable is expected to either hold USB IDS of the USB modem which is going to be used for getting connected, or the word "OTHER". If word "OTHER" is found, device selection procedure will refer to OTHER variable for locating modem that will be used.

  • If provided value refers to a USB modem not currently connected, its contents are discarded.
  • If no value is loaded (or loaded value was discarded previously) and only one USB modem is detected, this one USB modem is automatically selected.
  • If no value is loaded (or loaded value was discarded previously) and no other USB modem is detected, it is automatically loaded with the "OTHER" value.

Therefore, use of MODEM variable is only meaningful when:

  • There are more than two USB modems plugged and you need to select a specific one (see example #1).
  • Your USB device is not automatically detected as a USB modem (see example #3).
  • Your modem is not a USB modem (see example #4).
Examples:
1. Select one among many modems.
MODEM="19d2:2000"
2. Force script to always ask about modem type.
MODEM="OTHER"
3. Consider a USB device as a USB modem.
MODEM="OTHER" OTHER="USBMODEM" USBMODEM="19d2:2001"
4. Define a specific tty as an already setup modem. 
MODEM="OTHER" OTHER="CUSTOM_TTY" CUSTOM_TTY="/dev/ttyS1"
OTHER No Synonyms Valid values:
  • USBMODEM
  • BLUETOOTH
  • CUSTOM_TTY

This variable should only contain one of possible values. It is only taken into consideration if MODEM variable contains word "OTHER" and is used for determining type of modem. According to its value, device selection procedure will refer to USBMODEM, BLUETOOTH or CUSTOM_TTY variable for locating modem that will be used.

Examples:
1. Modem is a USB modem.
MODEM="OTHER" OTHER="USBMODEM"
2. Modem is a Bluetooth modem.
MODEM="OTHER" OTHER="BLUETOOTH"
3. Modem is already setup and a tty already exist.
MODEM="OTHER" OTHER="CUSTOM_TTY"
USBMODEM No Synonyms

This variable should only contain USB IDs of a currently connected USB device. If value is not valid, or device is not currently connected, value of this variable is discarded. This variable is only taken into consideration when OTHER variable contains word "USBMODEM" and is used for selecting the USB device which is actually a modem.

While this variable looks an equivalent to MODEM variable, they actually differ:

  • MODEM variable considers valid USB IDs those listed within its own device database, or within embedded Usb-Modeswitch device database.
  • USBMODEM variable considers valid all USB IDs of currently connected USB devices.
Example:
Consider a USB device as a USB modem.
MODEM="OTHER" OTHER="USBMODEM" USBMODEM="19d2:2001"
BLUETOOTH No Synonyms Possible values:
  • UNDISCOVERABLE

This variable should either contain the Bluetooth address of a currently discoverable Bluetooth device, or the word "UNDISCOVERABLE". If value is not valid, or device is not currently discoverable, value of this variable is discarded. This variable is only taken into consideration when OTHER variable contains word "BLUETOOTH" and is used for selecting a discoverable Bluetooth device. If value "UNDISCOVERABLE" is loaded, device selection procedure refers to UNDISCOVERABLE variable.


Note Note: Even if device is discoverable, you may find defining it as undiscoverable more convenient (see example #2). This can save you a couple of seconds by avoiding scan of Bluetooth devices.
Examples:
1. Define discoverable device.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="00:25:47:59:AA:00"
2. Define undiscoverable device.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="UNDISCOVERABLE" 
UNDISCOVERABLE="00:25:47:59:AA:00"
UNDISCOVERABLE No Synonyms

This variable should only contain a valid Bluetooth address of a Bluetooth device. If value is not valid, or device is not currently within range, connecting will be impossible. This variable is only taken into consideration when BLUETOOTH variable contains word "UNDISCOVERABLE" and is used for manually specifying the Bluetooth address of a Bluetooth device.


Note Note: Even if device is discoverable, you may find defining it as undiscoverable more convenient (see example #2). This can save you a couple of seconds by avoiding scan of Bluetooth devices.
Examples:
1. Define discoverable device.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="00:25:47:59:AA:00"
2. Define undiscoverable device.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="UNDISCOVERABLE" 
UNDISCOVERABLE="00:25:47:59:AA:00"
RFSERVICE No Synonyms Possible values:
  • RFCHANNEL

This variable should contain the decimal representation of a discoverable RFCOMM channel of the Bluetooth device previously defined using BLUETOOTH or UNDISCOVERABLE variables. If value is not valid, or RFCOMM channel was not reported by device, value of this variable is discarded. If this variable is loaded with the "RFCHANNEL" value, device selection procedure skips validating RFCOMM channel by querying Bluetooth device and uses channel defined by RFCHANNEL variable unconditionally.


Note Note: Even if device reports RFCOMM channel, you may find defining it through RFCHANNEL variable more convenient (see examples #2 and #3). This can save you a couple of seconds by avoiding querying Bluetooth device for available services.
Examples #1 and #3 have exactly the same effect if device and appropriate channel are discoverable. Example #3 skips all validation saving up to 6 seconds. However, this may lead into problems later on.
Examples:
1. Define discoverable channel.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="00:25:47:59:AA:00"
RFSERVICE="1"
2. Define undiscoverable channel.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="00:25:47:59:AA:00"
RFSERVICE="RFCHANNEL" RFCHANNEL="1"
3. Skip all validation.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="UNDISCOVERABLE" 
UNDISCOVERABLE="00:25:47:59:AA:00"
RFSERVICE="RFCHANNEL" RFCHANNEL="1"
RFCHANNEL No Synonyms

This variable should contain the decimal representation of an RFCOMM channel of the Bluetooth device previously defined using BLUETOOTH or UNDISCOVERABLE variables.

  • This variable is only taken into consideration when RFSERVICE variable contains word "RFCHANNEL".
  • If value is not valid, or RFCOMM channel defined is not available/valid in device, connection will be impossible.


Note Note: Even if device reports RFCOMM channel, you may find defining it through RFCHANNEL variable more convenient (see examples #2 and #3). This can save you a couple of seconds by avoiding querying Bluetooth device for available services.
Examples #1 and #3 have exactly the same effect if device and appropriate channel are discoverable. Example #3 skips all validation saving up to 6 seconds. However, this may lead into problems later on.
Examples:
1. Define discoverable channel.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="00:25:47:59:AA:00"
RFSERVICE="1"
2. Define undiscoverable channel.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="00:25:47:59:AA:00"
RFSERVICE="RFCHANNEL" RFCHANNEL="1"
3. Skip all validation.
MODEM="OTHER" OTHER="BLUETOOTH" 
BLUETOOTH="UNDISCOVERABLE" 
UNDISCOVERABLE="00:25:47:59:AA:00"
RFSERVICE="RFCHANNEL" RFCHANNEL="1"
CUSTOM_TTY No Synonyms

This variable should only contain the full path of an existing character device node.

  • This variable is only taken into consideration when OTHER variable contains word "CUSTOM_TTY" and is used for selecting an already existing character device node offering modem capabilities.
  • If value is not valid, or node does not exist already, value of this variable is discarded.


Note Note: If character device node is within /dev directory, then you may just provide its basename (see example #2).
Examples:
1. Use already existing /dev/ttyS0 as a modem.
MODEM="OTHER" OTHER="CUSTOM_TTY" CUSTOM_TTY="/dev/ttyS0"
2. Same effect as example above.
MODEM="OTHER" OTHER="CUSTOM_TTY" CUSTOM_TTY="ttyS0"

USB Device setup

USBDRIVER, USBINTERFACE

These variables are only taken into consideration when modem is a USB device. You should normally not need to set them yourself.

Name Synonyms and examples Description
USBDRIVER No Synonyms

This variable:

  • should contain the name of kernel module that should be bound to USB interface which provides a usable data modem, for corresponding device node to be created.
  • if assigned value is not valid, or if this kernel module does not exist, value is discarded.
  • if no value is assigned, or value was discarded previously, script will seek for a candidate driver.
  • if no candidate is found, it automatically selects option module.


Note Note: Sometimes is useful that you explicitly define option module, for avoid having to select it among other candidates.
Examples:
1. Select cdc_acm module.
USBDRIVER="cdc_acm"
2. Explicitly select option module.
USBDRIVER="option"
USBINTERFACE No Synonyms

This variable:

  • should contain the decimal representation of USB interface that should be used.
  • if assigned value is not valid, or if this interface number does not exist, value is discarded.
Example:
Select interface #3.
USBINTERFACE="3"


GUI related

AOSDFONT, XOSDFONT, OSDFONT, MENUFONT, TRANSLATION, DESKTOPICON, SGUI

These variables affect UI aspects of Sakis3G script.

Name Synonyms and examples Description
AOSDFONT No Synonyms

This variable defines font that should be used when displaying OSD messages using aosd_cat utility. If no value is provided, default value "DejaVuSans 36" is loaded. If value specified refers to a font not available in system, aosd_cat replaces it with a valid one.

Example:
AOSDFONT="DejaVuSans 24"
XOSDFONT No Synonyms

This variable defines font that should be used when displaying OSD messages using osd_cat utility. If no value is provided, default value "-*-freesans-bold-r-*-*-36-*-*-*-*-*-*-*" is loaded. If value specified refers to a font not available in system, osd_cat does not display message requested. You can use xlsfonts or xfontsel utilities for discovering/constructing a valid font string.

Examples:
XOSDFONT="-*-helvetica-*-r-*-*-36-*-*-*-*-*-*-*"
XOSDFONT="-adobe-helvetica-*-r-*-*-24-*-*-*-*-*-*-*"
XOSDFONT="-misc-fixed-medium-r-semicondensed--36-*-*-*-c-*-*-*"
XOSDFONT="-monotype-arial-medium-r-normal-*-36-*-*-*-*-*-*-*"
OSDFONT No Synonyms

This variable defines font string that should be used when displaying OSD messages regardless of backend utility. It just sets both AOSDFONT and XOSDFONT variables to the same content. It is user's responsibility to supply font string expected by selected OSD backend.

Examples:
Defining a font appropriate for use with aosd_cat 
OSDFONT="DejaVuSans 24"
Defining a font appropriate for use with osd_cat 
OSDFONT="-misc-fixed-medium-r-semicondensed--36-*-*-*-c-*-*-*"
MENUFONT Synonyms: menufont

This variable defines font that should be used when using 9menu UI. If no value is provided, default value "-monotype-arial-medium-r-normal-*-18-*-*-*-*-*-*-*" is loaded. If value specified refers to a font not available in system, 9menu replaces it with a valid one. You can use xlsfonts or xfontsel utilities for discovering/constructing a valid font string.

Examples:
MENUFONT="-unknown-freesans-medium-r-normal-*-17-*-*-*-*-*-*-*"
menufont="-unknown-freesans-medium-r-normal-*-17-*-*-*-*-*-*-*"
MENUFONT="-dejavu-sans-medium-r-normal-*-18-*-*-*-*-*-*-*"
TRANSLATION No synonyms

This variable defines full path name of translation file that should be used. This is useful for testing purposes, when creating a new translation for Sakis3G script.


Note Note: Setting this variable equal to empty will not succeed into preventing Sakis3G script from using translations. If you want to prevent translations you should use --notranslate switch.
Example:
TRANSLATION="$HOME/Documents/sakis3g.translation.txt"
DESKTOPICON No synonyms Valid values:
  • SAKIS3G
  • OPERATOR

This variable defines icon that should be used when Sakis3G script is requested to create a desktop shortcut. It can only contain "SAKIS3G" or "OPERATOR". If a value other than those two is loaded, it gets automatically discarded. If no icon is defined for your operator, or if you are not connected when creating desktop shortcut, value is automatically set to "SAKIS3G".

Example:
Use official Sakis3G Tux-enabled icon
DESKTOPICON="SAKIS3G"
Use operator logo (if defined in database)
DESKTOPICON="OPERATOR"
SGUI No synonyms Valid values:
Text mode Graphics mode
  • terminal
  • interactive terminal
  • dialog
  • whiptail
  • xterm
  • konsole
  • gnome-terminal
  • 9menu
  • xdialog
  • kdialog
  • zenity

This variable defines UI that should be used, overriding the one that Sakis3G script would automatically select.

  • If value is not within list of valid values, it is automatically discarded and UI selection procedure will proceed like this variable was not set.
  • If value specified refers to a UI not currently available, it is automatically discarded:
    • If you selected a graphical UI while no X session exists, or
    • If utility required for selected UI was not found within path.

Keep in mind that:

  • All values, except "terminal", also set --interactive switch.
  • Values "xterm", "konsole" and "gnome-terminal" spawn corresponding terminal emulation utility, within which Sakis3G script is executed, with --console switch enabled, leading into one of "whiptail", "dialog" or "interactive terminal" being selected as UI.
Note Note: There is no way to affect UI that will be used by newly spawned Sakis3G script instance within terminal emulation utility.
Note Note: You can easily render Sakis3G script invisible (thus, unusable) by modifying desktop shortcut so that it appoints SGUI variable a value referring to a text mode UI. This way, whenever you double-click desktop shortcut, Sakis3G script will actually being started, but its output will end-up to void.
Example:
Use 9menu
SGUI="9menu"
Use dialog
SGUI="dialog"


ISP related

APN, APN_USER, APN_PASS, CUSTOM_APN, FORCE_APN, FORCE_ISP, DIAL

These variables affect details of connection, specific to your network operator.

  • If your operator is found within list of known operators, script might only ask for your confirmation before using details found.
  • If no information is found within list of known operators, it will prompt you to supply it. This information is (usually) easily retrieved through a fast call to customer support. If you are indeed going to make this call, you should ask them to provide you with:
    1. APN name that should be used.
    2. Username required by that APN.
    3. Password required by that APN.
    4. Phone number that should be dialed (usually *99# or *99***1#, or something like this).
Note Note: If you gathered this information, consider sending them to me.

If you want to avoid supplying/confirming same information again and again, consider using one of these variables.


Name Synonyms and examples Description
APN No Synonyms Possible values:
  • CUSTOM_APN

This variable defines APN (Access Point Name) that should be used to establish connection.

  • Value assigned must be a valid APN for your operator, or word "CUSTOM_APN".
  • If value assigned is not a valid APN for your operator, value is discarded.
  • If your operator is not found within list of known operators, Sakis3G script will check if your modem has an APN stored since its last connection. If it has, that APN will be considered a valid APN.
  • If none of the above methods indicated a valid APN for you to use, no matter what value is already loaded, "CUSTOM_APN" is automatically set.
  • When value "CUSTOM_APN" is specified, APN name is instead retrieved from CUSTOM_APN variable.


Note Note: When you use a value originated by internal Sakis3G script database, you do not need to supply APN_USER and APN_PASS variables, as they are usually also contained within database. Except in cases where operator requires real details. For example, some operators require as username or password, a portion of (or even whole) your phone number.
Examples:
APN="internet.myprovider.com"
APN="CUSTOM_APN"
APN_USER No Synonyms

This value defines username which operator requires when using selected APN (Access Point Name).

  • If operator provided you with a username, required for performing connection, this is the place to put it.
  • Most operators are reasonable enough not to require a special username for widely used APNs.
  • If operator does not require a username, you can place anything you like.


Note Note: Even if your operator does not need a username, you still have to provide a value in this variable. By convention, on these cases we usually use "user" as username, indicating that no exact value is required.
Example:
APN="CUSTOM_APN" CUSTOM_APN="internet.myprovider.com"
APN_USER="myphonenumber"
APN_PASS No Synonyms

This value defines password which operator requires when using selected APN (Access Point Name).

  • If operator provided you with a password, required for performing connection, this is the place to put it.
  • Most operators are reasonable enough not to require a special password for widely used APNs.
  • If operator does not require a password, you can place anything you like.


Note Note: Even if your operator does not need a password, you still have to provide a value in this variable. By convention, on these cases we usually use "pass" as password, indicating that no exact value is required.
Example:
APN="CUSTOM_APN" CUSTOM_APN="internet.myprovider.com"
APN_USER="myphonenumber" APN_PASS="internet123"
CUSTOM_APN No Synonyms

This variable defines the APN (Access Point Name) that should be used to establish connection, which can be different than the one that internal database of Sakis3G script indicates, and the one that your modem might remember since its last connection. This variable is only taken into consideration variable when APN variable contains value "CUSTOM_APN".

  • If value assigned is not an acceptable APN by your operator, connection will fail.
Example:
APN="CUSTOM_APN" CUSTOM_APN="internet.myprovider.com"
FORCE_APN No Synonyms

This variable defines the APN (Access Point Name) that should be used to establish connection, no matter what internal database of Sakis3G script or your modem might indicate.

  • If value assigned is not an acceptable APN by your operator, connection will fail.
  • This variable seems like a duplicate to APN and/or CUSTOM_APN but is not:
    • APN variable can only contain a value found within list of known operators, or retrieved from your modem's memory.
    • CUSTOM_APN can indeed contain any value but causes both internal database and modem be queried, while seeking for a valid APN, in cases that operator was not found within list of known operators.
    • FORCE_APN bypasses all validation, queries to internal database and query against modem memory to unconditionally set specified APN.


Note Note: You can use FORCE_APN to improve performance by skipping internal database lookups (compare examples #3 and #4).
Note Note: FORCE_APN variable offers an alternative syntax which allows setting up APN_USER and APN_PASS variables also (compare examples #4 and #5).
Examples:
1. Operator is found within database and APN
   was also mentioned. Username and password
   are also retrieved from database.
APN="internet.myprovider.com"
2. Operator was not found within database
   but APN was retrieved by modem's memory.
   In this case, you have to supply username
   and password.
APN="internet.myprovider.com" 
APN_USER="postpay" APN_PASS="internet"
3. Operator was not found within database
   and modem did not report any recent APN
   being used. Or, what was found within
   database is not appropriate for your
   contract. In both cases, you have to
   supply all information yourself.
APN="CUSTOM_APN" CUSTOM_APN="internet.myprovider.com"
APN_USER="postpay" APN_PASS="internet"
4. No matter if operator exists or not in
   database, defined APN is used and modem
   is never queried.
FORCE_APN="internet.myprovider.com"
APN_USER="postpay" APN_PASS="internet"
5. An alternative syntax having the same
   effect with example #4.
FORCE_APN="internet.myprovider.com::postpay:internet"
FORCE_ISP No Synonyms

This variable instructs Sakis3G script to disable roaming on modem and instead stick with network specified in value. Value should contain the numeric ID of network to be used.

  • If an invalid value is supplied, behavior depends on your modem (whether it will disconnect from any network already registered to, or will remain connected).
  • If network specified is not available, or modem refused to register network, Sakis3G script will refuse to proceed with connection.
  • This can be useful, when you leave near a country's borders, into avoiding unintended roaming costs.
  • However, this may lead into limited network coverage on cases where your operator transparently (without additional cost) cooperates with another network to extend coverage.


Note Note: To discover your network's ID, consult Connection Information after getting connected, or use:
$ sakis3g console info
Example:
Force modem to stick with GR COSMOTE
FORCE_ISP="20201"
DIAL Synonyms:
  • CUSTOM_DIAL

This variable forces Sakis3G script to dial whatever is supplied as value, when attempting to establish data connection. Value should only contain decimal digits or symbols "#" and "*".

  • If an invalid value is supplied, behavior depends on your modem, but it will usually fail to find carrier.
  • If this value is not set, internal operators database is consulted to determine phone number to dial.
  • If no value was supplied using this variable and no entry was found within internal operators database, default number "*99#" is dialed.
Examples:
DIAL="*99***1#"
CUSTOM_DIAL="*99***1#"


Menu actions

MENU, MOREMENU

Setting menu related variables should normally be useless since:


Name Synonyms and examples Description
MENU No Synonyms
Valid value Actor
  • CONNECT
connect
  • DISCONNECT
disconnect
  • INFO
info
  • DESKTOP
desktop
  • ABOUT
about
  • MOREMENU
moremenu
  • EXIT
  • If value assigned is not valid, it is automatically discarded. This is essentially true when:
    • Assigned "DISCONNECT", "INFO", "DESKTOP" value while not connected.
    • Assigned "CONNECT" value while already connected.
  • Value assigned to this variable is discarded when menu actor is executed, and only after actor specified by value has finished (regardless of success or failure).
Examples:
1. Implement splash-like functionality
   for the first time that menu will
   appear.
MENU="ABOUT"
2. Force menu not to appear. However,
   defining menu actor twice, will
   eventually make menu visible.
MENU="EXIT"
MOREMENU No Synonyms
Valid value Actor
  • CONNECT
connect
  • RECONNECT
reconnect
  • DISCONNECT
disconnect
  • PREPARE
prepare
  • SETUP
setup
  • SWITCH
switchonly
  • COMPILE
recompile
  • INFO
info
  • REPORT
report
  • DESKTOP
desktop
  • ABOUT
about
  • HELP
showhelp
  • EXIT
  • If value assigned is not valid, it is automatically discarded. This is essentially true when:
    • Assigned "DISCONNECT", "RECONNECT", "INFO", "REPORT" value while not connected.
    • Assigned "CONNECT", "PREPARE", "SETUP", "SWITCH" value while already connected.
  • Value assigned to this variable is discarded when moremenu actor is executed, and only after actor specified by value has finished (regardless of success or failure).
Examples:
1. Implement splash-like functionality
   for the first time that moremenu will
   appear.
MOREMENU="ABOUT"
2. Force moremenu not to appear. However,
   defining moremenu actor twice, 
   will eventually make menu visible.
MOREMENU="EXIT"

 

Modem related

CHAT_ABORT_STRINGS, INIT

These variables provide limited access to modem initialization and responses.

Name Synonyms and examples Description
CHAT_ABORT_STRINGS No Synonyms

This variable provides control over chat abort strings. You can find additional information on chat(8) manpage.

  • If no value is assigned, default value is automatically set.


Default value is:

ABORT BUSY ABORT ERROR ABORT BLOCKED ABORT NOCARRIER
Example:
Prevent any PIN operation.
CHAT_ABORT_STRINGS="ABORT BUSY ABORT ERROR 
                    ABORT BLOCKED ABORT NOCARRIER 
                    ABORT 'SIM PIN'"
INIT Synonyms:
  • MODEM_INIT

This variable provides access to initialization AT commands that will be sent to modem. Value provided here is sent to modem just before dialing operator and immediately after Sakis3G script has finished all initialization it should do. This variable is provided for end-user to be able to supply the "weird-non-standard" command that might be required by its modem for establishing a reliable connection.

  • Dialing will occur even if AT commands specified by this value produce ERROR.
Example:
Request some information from modem.
INIT="ATI AT+CGDCONT? AT+COPS=0,2 AT+COPS? AT+COPS=0,0 AT+COPS?"


Network related

DNS, PPPD_OPTIONS

These variables offer the ability to affect network setup after connection with operator is established.

Name Synonyms and examples Description
DNS No Synonyms

This variable allows you to provide specific DNS servers that should be used after connection with operator is established.

Example:
Equivalent to --googledns switch.
DNS="8.8.8.8 8.8.4.4"
PPPD_OPTIONS No synonyms Valid values:

Please consult pppd(8) manpage for information on valid values.

This variable allows you to modify arguments that will be passed to pppd daemon.

  • This variable is only taken into consideration when wvdial is not installed, or when --pppd switch is set.
  • If no values are provided, default values are used.
  • If, within directory denoted by PPPD_PEERS variable, exists a peer (a file) named sakis3g, then:
    • this variable is ignored, and
    • daemon pppd is called with the following arguments:
      460800 -detach dump logfd 2
      maxfail 3 name sakis3gpeer call sakis3g
    • and you should instead edit file "PPPD_PEERS/sakis3g" to modify pppd options.


Note Note: Default values used when no value is supplied are:
460800 modem crtscts -detach defaultroute dump
noipdefault replacedefaultroute usepeerdns 
usehostname ktune logfd 2 noauth name sakis3g
lock maxfail 3
Example:
Options to pppd are read from file: /home/sakis/custom
PPPD_PEERS="/home/sakis" PPPD_OPTIONS="call custom"


SIM card related

SIM_PIN

This variable allows you to explicitly provide PIN number that should be used if SIM card placed inside modem requires it.

Name Synonyms and examples Description
SIM_PIN No synonyms Valid values:

Any decimal number consisted of exactly four digits.

This variable allows you to explicitly provide PIN number that should be used if SIM card placed inside modem requires it.

  • This value is only utilized when modem reports that SIM card needs PIN number.
  • If value provided is not consisted of exactly four decimal digits, it is automatically discarded.
  • If no value is provided, or is discarded already, then Sakis3G script:
    • will ask you to provide it, if selected UI allows it.
    • will abort execution, if selected UI does not provide a way to ask you.


Note Note: If value supplied, by any means:

that value is rejected by modem, Sakis3G script will immediately cease operation to prevent you from having your SIM card PIN-blocked, from accidental consequent failed attempts.

If forementioned failed attempt, had been the last one allowed by your SIM card, then you just succeed into PIN-blocking your SIM card.

Note Note: When modem reports SIM card needs another kind of number (PIN #2, PUK, PUK #2), Sakis3G script will refuse to proceed. You might temporarily place your SIM card to a cellular phone, unlock card so that it asks for PIN number instead.
Example:
SIM_PIN="1212"


System integration

CONNECTION_HOOK, DESKTOP, LOGPOSITION, PPPD_PEERS, PPPINT

These variables allow you to better intergrate Sakis3G script to your system.

Name Synonyms and examples Description
CONNECTION_HOOK Synonyms:
  • HOOK
  • connection_hook

This variable allows you to specify a command that should be run, whenever a connection with an operator is succesfully established.

  • If no value is provided, nothing is executed.
  • Connection hook is executed even if --nofix switch is set.
  • This variable cannot be used from command line for security reasons. It would be risky to allow users provide a command to be executed with root privileges.
  • Connected notification dialog of Sakis3G script does not appear before Connection hook has returned.
  • When executed, Connection hook may enjoy information found within environment variables (see example).
  • There is no "formal way" that Connection hook could use to inform back Sakis3G script to terminate connection. Both output and result status of Connection hook are discarded.


Note Note: If you need to disconnect from within Connection Hook you could still call:
sakis3g disconnect

You should however know that, when Connection Hook has finished execution, Sakis3G script will display error Failed to connect.

Example:
Save environment variables, during connection
of Connection hook, onto a file. You can
later review them and construct amazing shell
scripts like this one.
CONNECTION_HOOK="set > /var/log/sakis3g.environment"
DESKTOP No synonyms

This variable allows you to specify directory where your desktop resides.

  • This variable is only taken into consideration only during desktop shortcut creation.
  • If no value is provided, and DESKTOP environment variable exists, it is used instead.
  • If directory specified does not exist and $HOME/DESKTOP/ also does not exist, value is discarded.
  • If no directory is found, desktop shortcut is created within your home directory.


Note Note: You need to set this variable if you are using a localized name for your desktop folder.
Examples:
1. Set your own desktop.
DESKTOP="/home/sakis/Επιφάνεια εργασίας"
2. A more appropriate form, with the
   same effect, for use within global
   configuration file.
DESKTOP="Επιφάνεια εργασίας"
LOGPOSITION Synonyms:
  • logposition

This variable allows you to specify position of log file that should be used when Sakis3G script is called through udevd.

  • If no value is provided, default value "/var/log/sakis3g.log" is used.
  • If value provided refers to a non-existing path, value is discarded.
Example:
LOG_FILE="/var/log/sakis3g/log"
PPPD_PEERS No synonyms

This variable allows you to specify directory where pppd peer files are located.

  • If no value is provided, default value "/etc/ppp/peers" is used.
  • If:
    • directory specified exists, and
    • within directory a file named "sakis3g" exists, and
    • wvdial is not installed, or --pppd switch is set, then
pppd is instructed to read options from "PPPD_PEERS/sakis3g" file.
Example:
Let it check for if file named
/etc/ppp/peers/custom/sakis3g
exists.
PPPD_PEERS="/etc/ppp/peers/custom"
PPPINT Synonyms:
  • pppint

This variable allows you to specify interface name your system uses for 3G P-t-P connections.

  • If no value is provided, default value "ppp0" is used.
  • This value is only taken into consideration when checking status of connection.
  • This value is not taken into consideration when disconnecting:
    • All active pppd sessions are terminated, eliminating all your P-t-P connections.
    • While disconnecting, this script will kill all running pppd instances, thus eliminating any other P-t-P connections you might have running.
Note Note: If value provided does not match interface name created, you should expect some serious Sakis3G script malfunctions to occur.
Note Note: If you have a complex setup (i.e. bridging across ppp connections or multilink ppp connections), you should NOT (need to) use this script, as it also messes up with your routing tables: you were warned.
Example:
Use ppp1 instead of ppp0.
PPPINT="ppp1" PPPD_OPTIONS="unit 1 ...

 

X session access

DISPLAY, LOCALAUTHORITY

These variables allows you to redirect Sakis3G UI to a specific X session.

Name Synonyms and examples Description
DISPLAY No synonyms

This variable allows you to explicitly specify the X session display on which Sakis3G UI should appear.

  • If no value is provided, environment variable DISPLAY is automatically loaded if available.
  • If loaded value does not refer to a valid local display, it is automatically discarded.
  • If you have no access to display specified, value loaded is automatically discarded. To avoid such thing:
    • Merge cookie to your authority file, or
    • Use LOCALAUTHORITY variable to point to an authority file which contains a valid cookie for display specified.
  • If no value is provided, or is discarded already, then Sakis3G script will attempt to locate a text-mode UI instead.
Example:
DISPLAY=":1"
LOCALAUTHORITY Synonyms:
  • XAUTHORITY
Valid value:
  • Full path name of an X authority file.

This variable allows you to specify an alternative X session file which contains a valid cookie for X display selected (either by environment variable DISPLAY, or by DISPLAY variable).

  • If no value is provided, your own X authority file is assumed.
  • If value does not refer to an X authority file, or read access is not granted, it is automatically discarded.
  • If both your own and the alternative X authority files do not contain a valid cookie for X display selected, Sakis3G script will attempt to locate a text-mode UI instead.
Example:
XAUTHORITY="/home/sakis/authorities/cryo"
Personal tools