Remote Desktop Connection between Windows and Linux

Remote Desktop Connection between Windows and Linux

When it comes to remote desktop connection to Linux, people may first think of using VNC. When it comes to remote desktop to Windows, people may first think of using the remote desktop that comes with Windows. So is there any way to remotely access Windows from Linux, and remotely access Linux from Windows? Today, let’s discuss the remote communication between Linux and Windows. Taking CentOS6.6 as an example, the steps are as follows:

Connect to Linux using Windows Remote Desktop

1. Check whether GNome is installed on the server

[root@admin /]# rpm -qa | grep desktop

If gnome-desktop does not appear in the query results, you need to configure the installation source and install the GNOME graphical interface. Command: yum -y groupinstall "X Window

System" "Chinese Support" "Desktop"

2. Install VNCServer, configure VNCServer and set password

[root@admin /]# rpm -ivh tigervnc-server-1.1.0-18.el6.x86_64.rpm #Local installation of VNCServer
[root@admin /]# vncpasswd #Set VNC login password
[root@admin /]# vim /etc/sysconfig/vncservers #Modify configuration VNC
[root@admin /]# chkconfig vncserver on #Configure startup
[root@admin /]# service vncserver restart #Start VNC service

3. Allow 5900~5905 and 3389 in the firewall

The released VNC port needs to be configured according to the actual situation

4. Install the epel library

[root@admin /]# yum -y install epel-release

5. Install xrdp

[root@admin /]# yum -y install xrdp

6. Modify xrdp configuration

[root@admin /]# vim /etc/xrdp/xrdp.ini
max_bpp=32 #Change the default 24 to 32

7. Start the xrdp service and set it to start at boot

[root@admin /] chkconfig xrdp on
[root@admin /] service xrdp start

The above are all online installations. If you need offline installation, you can go to the website: http://www.rpmfind.net/ Search for xrdp and select the version that suits your system to download

[root@admin /] rpm -ivh xrdp-0.6.1-5.el6.x86_64.rpm

8. Test Remote Desktop


Connect to Windows using Linux Remote Desktop

1. Confirm that Linux has installed the GNome graphical desktop

2. Configure the Windows that needs to be remoted to allow remote desktop connection

3. Open the Remote Desktop port in Windows Firewall (the default Windows port is 3389)

4. Install the remote connection package in Linux

[root@admin /]# yum -y install rdesktop
[root@admin /]# yum -y install tsclient

5. In Applications->Internet->Open Terminal Server Client

6. Click Add Connection, select Windows Terminal Service, and fill in Name, Host, Username, and Password in turn.

If the Windows Remote Desktop port is not 3389, use the format IP:Port when filling in the field.

7. After saving the configuration, double-click the session configuration just saved in the main interface


Connect to Linux using Linux Remote Desktop

1. Confirm that Linux has installed the GNome graphical desktop

2. Open the remote desktop port in the Linux firewall (the default port initial value is 5900 + connection ID) and install and configure VNCServer in the remote server

3. Install the remote connection package in Linux

[root@admin /]# yum -y install rdesktop
[root@admin /]# yum -y install tsclient

4. In Applications->Internet->Open Terminal Server Client

5. Click Add Connection, select VNC, and fill in Name, Host, and Password in turn.

The Host entry format is: IP: connection ID

6. After saving the configuration, double-click the session configuration just saved in the main interface


Exit full screen

In Linux, whether it is remote Windows or Linux, if the full screen appears and you don’t know how to exit the full screen, you can use the following method

1. Linux Remote Linux

Press F8, the VNC menu will pop up, click "Exit Viewer" or uncheck "Full Screen"

2. Linux remote Windows

Use the key combination Crtl+Alt+Enter to exit full screen

Common Mistakes

1. The username and password entered are correct, but the login prompt is "xrdp_mm_process_login_response: login failed". Check the xrdp log and the error message is as follows:

[root@admin xrdp] vim /var/log/xrdp-sesman.log
[20181107-09:17:36] [INFO ] scp thread on sck 7 started successfully
[20181107-09:17:36] [INFO ] ++ created session (access granted): username root, ip xxxx:57714 - socket: 7
[20181107-09:17:36] [INFO ] starting Xvnc session...
[20181107-09:17:36] [ERROR] X server -- no display in range is available # Error message

This error is caused by exceeding the maximum connection data. The solution is as follows:

[root@admin xrdp] ps -ef | grep xrdp | grep -v grep | awk '{print $2}' | xargs kill -9
[root@admin xrdp] vim /etc/xrdp/sesman.ini
MaxSessions=100 # Maximum number of session connections
[root@admin xrdp] service xrdp restart

or

[root@admin xrdp] vim /etc/xrdp/sesman.ini
MaxSessions=10 # Maximum number of session connections
KillDisconnected=1 # Change to 1, it means automatic logout after disconnection
IdleTimeLimit=1800
[root@admin xrdp] service xrdp restart

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of how to connect pycharm to the virtual environment of a remote linux server
  • How to solve the problem of Linux ssh remote connection disconnection
  • Alibaba Cloud Server Remote Connection Management Linux Server Graphic Tutorial
  • ftp remotely connect to Linux via SSH

<<:  Implementing carousel effects with JavaScript

>>:  MySQL 8.0.19 installation and configuration method graphic tutorial

Recommend

Detailed explanation of the solution to image deformation under flex layout

Flex layout is a commonly used layout method nowa...

JavaScript to achieve the effect of clicking on the submenu

This article shares the specific code of JavaScri...

Detailed explanation of how to use Docker-Compose commands

You can manage and deploy Docker containers in a ...

Summary of MySQL database usage specifications

Introduction: Regarding MySQL database specificat...

Summary of MySQL's commonly used concatenation statements

Preface: In MySQL, the CONCAT() function is used ...

Summary of bootstrap learning experience-css style design sharing

Due to the needs of the project, I plan to study ...

Implementation of Vue single file component

I recently read about vue. I found a single-file ...

WeChat applet implements countdown for sending SMS verification code

This article shares the specific code for the WeC...

Detailed explanation of mysql exists and not exists examples

Detailed explanation of mysql exists and not exis...

Solution to mysql login warning problem

1. Introduction When we log in to MySQL, we often...

React Hook usage examples (6 common hooks)

1. useState: Let functional components have state...

Introduction to using MySQL commands to create, delete, and query indexes

MySQL database tables can create, view, rebuild a...

Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7

yum or rpm? The yum installation method is very c...

Analysis of MySQL joint index function and usage examples

This article uses examples to illustrate the func...