Detailed explanation of Xshell common problems and related configurations

Detailed explanation of Xshell common problems and related configurations

This article introduces common problems of Xshell and related configurations. The configuration in this article is mainly for Xshell 5 or Xshell 6 versions.

Note: When it comes to the configuration of "properties", if the current Xshell is connected to a server, the property configuration performed in this session window will only take effect for the server session; if you want to configure all session properties, you need to perform the relevant property configuration operations in the session window that is not connected to the server.

1. In the vi editor, the Backspace key cannot delete characters in INSERT mode

To solve the above problem, you need to make the following settings:

a) Click the "Properties" button as follows:

Open the Properties Window.

b) Select the "Terminal" tab on the left side of the "Properties" window and set the "Terminal type" corresponding to the "Terminal" tab to "linux" as follows:

c) Select the "Keyboard" tab on the left side of the "Properties" window, set the "Function key type" corresponding to the "Keyboard" tab to "linux", the "DELETE key sequence" to "VT220 Del (Esc[3~])", and the "BACKSPACE key sequence" to "ASCII 127 (Ctrl+?)(I)", as shown below:

d) In some cases, due to compatibility issues between vim and the system's own vi and some default settings, you need to modify vim's configuration file .vimrc (this file is located in the user's root directory) and add incompatibility settings and some BACKSPACE settings to the file, as follows:

After completing the above settings, you can implement the Backspace function of deleting characters in vi's INSERT mode.

2. The problem of Chinese garbled characters in the vi editor

When Chinese garbled characters appear in the vi editor, we can troubleshoot the problem from the following three aspects:

1) xshell encoding format;

2) The default language (encoding) of the Linux operating system;

3) The encoding of the file where garbled characters appear.

Normally, keeping the encoding formats of these three consistent can solve the problem of garbled characters.

The following examples illustrate specific troubleshooting methods. The Chinese characters in the following test.cpp are garbled, as follows:

1) Let's first check the encoding format of xshell. Click the "Properties" button on the xshell interface to open the properties window and check the encoding format as follows:

From the above picture, you can see that the encoding format of xshell is "UTF-8".

2) Use the locale command to view the default language of the Linux operating system, as follows:

From the above picture, we can see that the default language of the current Linux operating system is "en_US.UTF-8".

3) Use the file command to view the encoding format of the Chinese garbled file, as follows:

In the above figure, you can see that the encoding format of the test.cpp file is "ISO-8859", which is inconsistent with the encoding format of the xshell and linux systems, so its encoding format needs to be modified. Use the iconv command to change the encoding format of the test.cpp file to "UTF-8", as follows:

iconv -f GBK -t utf-8 -o test.cpp test.cpp

After modification, check the encoding format of the test.cpp file again, as follows:

At this point, the encoding format of the test.cpp file has changed to UTF-8. Open the file and you can see that Chinese can be displayed normally, as follows:

This is the end of this article about detailed explanation of Xshell common problems and related configurations. For more related Xshell common problems and configuration content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Xshell and Xftp free download and installation steps (pictures and text)
  • How to connect XShell and network configuration in CentOS7
  • Detailed explanation of the idea of ​​xshell remote login to CentOS7 without password login
  • Tutorial on configuring SSH and Xshell to connect to the server in Linux (with pictures)
  • When using Xshell under Windows, msvcr110.dll and other dlls are missing
  • Xshell implements the method of uploading files from Windows to Linux host
  • Connect to the remote host using the key method based on Xshell
  • Ensure Linux VPS and server security Xshell set up key login
  • Solution to garbled Chinese output in remote Linux xshell

<<:  Vue implements multiple selections in the bottom pop-up window

>>:  MySQL explain obtains query instruction information principle and example

Recommend

Analysis of the reasons why MySQL's index system uses B+ tree

Table of contents 1. What is an index? 2. Why do ...

Example of using store in vue3 to record scroll position

Table of contents Overall Effect Listen for conta...

Detailed graphic tutorial on installing and uninstalling Tomcat8 on Linux

[ Linux installation of Tomcat8 ] Uninstall Tomca...

CSS code to achieve background gradient and automatic full screen

CSS issues about background gradient and automati...

Storage engine and log description based on MySQL (comprehensive explanation)

1.1 Introduction to storage engines 1.1.1 File sy...

Detailed explanation of Truncate usage in MySQL

Preface: When we want to clear a table, we often ...

Share 13 excellent web wireframe design and production tools

When you start working on a project, it’s importa...

Several practical scenarios for implementing the replace function in MySQL

REPLACE Syntax REPLACE(String,from_str,to_str) Th...

How to reset MySQL root password under Windows

Today I found that WordPress could not connect to...

Sample code for realizing book page turning effect using css3

Key Takeaways: 1. Mastering CSS3 3D animation 2. ...

JavaScript pre-analysis, object details

Table of contents 1. Pre-analysis 1. Variable pre...

CSS implements Google Material Design text input box style (recommended)

Hello everyone, today I want to share with you ho...