-
Classification: FMOS
Category: User Environment Issue
Context: Command-Line Interface
Summary
Your SSH client may not support Unicode characters outside the 7-bit ASCII range. Problematic characters may include non-Latin or accented letters, symbols, and emoji. Either your client does not support these characters, or it is is not properly configured to inform FMOS that it does.
Description
In order to provide a rich user experience, the FMOS Command-Line Interface makes use of several advanced features of modern terminal emulators. Such features include Unicode symbols, colors, stylized text, and animation. While most terminal programs and SSH clients support these features, there is no reliable mechanism that FMOS can use to determine what features a terminal supports. It uses various techniques and heuristics to decide whether or not such features can be used, but in many cases, there is simply not enough information available to make a reasonable decision.
FMOS commands that use these advanced features will emit a warning if they could not detect whether the terminal supports them:
Your terminal may not support Unicode; command output may be garbled► For more information, please visit https://help.fmos.firemon.com/b8xt
Note the ► symbol on the second line. If this symbol is displayed correctly the terminal properly supports Unicode characters, but does not indicate this to FMOS. If the symbol is not displayed correctly, for example if something like â° is displayed instead, the terminal does not support Unicode characters.
Terminal Configuration
For the best FMOS CLI experience, be sure your terminal is correctly configured to support all modern features.
Windows Terminal + ssh
Using the ssh command inside Windows Terminal is the recommended way to connect to the FMOS CLI from a computer running Microsoft Windows.
The Windows Terminal default settings support all of the advanced terminal features used by FMOS, however FMOS cannot detect this. You will need to configure the LANG environment variable in order to disable the Unicode warning.
-
Before connecting to the FMOS machine, run the following (in a Windows PowerShell tab of Windows Terminal):
if (-Not (Test-Path ~\.ssh)) { mkdir ~\.ssh } cd ~\.ssh notepad config
This will launch Notepad.
-
Place the following text at the end of the file:
Host * SetEnv LANG=en_US.UTF-8
You can choose a different value for LANG, such as en_GB.UTF-8. You may also wish to use a different host pattern; see the ssh_config(5) manual page for details.
-
Save the file and close Notepad.
Alternatively, if you cannot or chose not to configure your SSH client, you can configure FMOS to assume the terminal supports Unicode characters even if it does not report that it does. After connecting to the FMOS machine, run the following:
export 'FMOS_UNICODE_SUPPORT=yes'
The Unicode warning will not show for any FMOS commands run in this session. You may wish to add this command to your ~/.bashrc file to make the setting persistent.
PuTTY
PuTTY is a very popular SSH client for Windows.
Important
PuTTY, like all SSH clients, is security-sensitive software. Always use the latest version of PuTTY!


-
Open the PuTTY Configuration screen by launching a new PuTTY process.
-
From the Category tree at the left, expand Window and click Translation.
-
Set the Remote character set setting to UTF-8.
-
Set Handling of the line drawing characters to Use Unicode line drawing code points.
-
Expand Connection from the category tree and click Data.
-
Set Terminal-type string to putty.
-
Under the Environment variables section:
-
Enter LANG in the box labeled Variable.
-
Enter en_US.UTF-8 (or another UTF-8 locale, e.g. fr_FR.UTF-8) in the box labeled Value.
-
Click the Add button.
-
Enter COLORTERM in the box labeled Variable.
-
Enter truecolor in the box labeled Value.
-
Click the Add button.
-
-
Click the Session item in the category tree.
-
Enter FMOS in the text box labeled Saved Sessions.
-
Click the Save button.
Before connecting to an FMOS machine using PuTTY, be sure to click the FMOS entry under Saved Sessions and click the Load button. This will automatically set all of these options.
Alternatively, you can save these settings as the defaults by saving the session as Default Settings.
You may also want to choose a different font. The default, Courier New, can be difficult to read, especially on high-DPI displays. Select a different font by expanding Window and clicking Appearance. Fira Mono, Droid Sans Mono, and Consolas are appropriate font families. Do NOT tick the Allow selection of variable-pitch fonts. Always use a monospace font for command-line interface applications.
PowerShell/cmd.exe (Command Prompt) + ssh
Neither Windows PowerShell nor cmd.exe (Command Prompt) can be configured correctly to use FMOS advanced terminal features. Some glyphs for multi-byte Unicode characters may be available, depending on the fonts installed on your computer.
To configure the font for Command Prompt or PowerShell:
-
Click the icon at the top-left corner of the window.
-
Click Properties.
-
Select the Font tab.
-
From the Font selection box, choose an appropriate font such as Fira Mono, Cascadia Mono, Droid Sans Mono, or Consolas.
-
Click the OK button.
Note that changing the properties of Command Prompt or PowerShell affects all processes launched from the same shortcut. For example, a PowerShell window launched from an icon pinned to the taskbar will have different settings from one launched from the Start menu.
You may need to change some of the sigil characters used by the FMOS CLI if your font does not include glyphs for them. After connecting to the FMOS machine, run the following commands:
export FMOS_CLI_OK_SIGIL='*'
export FMOS_CLI_ERROR_SIGIL='x'
export FMOS_CLI_WARNING_SIGIL='!'
export FMOS_CLI_SPINNER='line'
These settings will apply to all FMOS commands run in this session. You may wish to add them to your ~/.bashrc file to make the settings persistent.
Note
Consider using Windows Terminal instead of PowerShell or Command Prompt.
Other Software
The FMOS CLI can be accessed using any terminal software. The enhanced user experience features may not be available, though, unless the terminal software is correctly configured. Consult the documentation for your terminal software for instructions on how to configure it. For the best experience, be sure to
-
Use the UTF-8 character set
-
Set the LANG environment variable to the appropriate locale (e.g. en_US.UTF-8)
-
Set the TERM environment variable to the correct value
-
If applicable, set the COLORTERM environment variable to truecolor to enable 24-bit colors
Disable Unicode Usage
If you need to use a client that does not or cannot be configured to support Unicode characters, you can configure the FMOS CLI to avoid using them. To do so, simply run the following command:
:> ~/.nounicode
Close all active FMOS CLI sessions, then log back in. FMOS commands will no longer attempt to use advanced terminal features, and will not present any further warnings.
Comments
0 comments
Article is closed for comments.