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

How to install docker under centos and remotely publish docker in springboot

Table of contents 1. Installation of JDK1.8 under...

How to clear default styles and set common styles in CSS

CSS Clear Default Styles The usual clear default ...

JS implements sliding up and down on the mobile terminal one screen at a time

This article shares with you the specific code of...

Implementation of single process control of Linux C background service program

introduce Usually a background server program mus...

React introduces antd-mobile+postcss to build mobile terminal

Install antd-mobile Global import npm install ant...

Element sample code to implement dynamic table

Table of contents 【Code background】 【Code Impleme...

The difference between MySQL user management and PostgreSQL user management

1. MySQL User Management [Example 1.1] Log in to ...

MySQL index principle and query optimization detailed explanation

Table of contents 1. Introduction 1. What is an i...

Using zabbix to monitor the ogg process (Windows platform)

This article introduces how to monitor the ogg pr...

Detailed explanation of DIV+CSS naming rules can help achieve SEO optimization

1. CSS file naming conventions Suggestion: Use le...

How to support full Unicode in MySQL/MariaDB

Table of contents Introduction to utf8mb4 UTF8 by...

Solution to docker suddenly not being accessible from the external network

According to the methods of the masters, the caus...

Solve the problem of Docker starting Elasticsearch7.x and reporting an error

Using the Docker run command docker run -d -p 920...