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

13 Most Frequently Asked Vue Modifiers in Interviews

Table of contents 1. lazy 2.trim 3.number 4.stop ...

How to find out uncommitted transaction information in MySQL

A while ago, I wrote a blog post titled "Can...

Detailed explanation of MySQL injection without knowing the column name

Preface I feel like my mind is empty lately, as I...

Vue+ssh framework to realize online chat

This article shares the specific code of Vue+ssh ...

Tutorial on installing MySQL under Linux

Table of contents 1. Delete the old version 2. Ch...

How to install ionCube extension using pagoda

1. First install the pagoda Installation requirem...

How to mount the CD to find the rpm package under Linux

Written in front Sometimes you need to install so...

Detailed explanation of PHP+nginx service 500 502 error troubleshooting ideas

Overview When a 500 or 502 error occurs during ac...

Detailed explanation of non-parent-child component communication in Vue3

Table of contents First method App.vue Home.vue H...

How to modify the time in centos virtual machine

The one above shows the system time, and the one ...

An example of refactoring a jigsaw puzzle game using vue3

Preface It took two days to reconstruct a puzzle ...

In-depth explanation of nginx location priority

location expression type ~ indicates to perform a...