Windows Remote Desktop (MSTSC) access to Ubuntu through the RDP protocol

Source: Internet
Author: User
Tags locale windows remote desktop mstsc

1. Install XRDP

zhou@desktop:~$ sudo apt-get install xrdp [sudo] password for Zhou:
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
The following additional packages will be installed:
Vnc4server xbase-clients
Recommended Packages to install:
Vnc-java
The following "new" packages will be installed:
Vnc4server xbase-clients XRDP
0 packages were upgraded, 3 new packages were installed, 0 packages were uninstalled, and 0 packages were not upgraded.
You need to download the 2,412 KB package.
Decompression will consume extra space in 7,086 KB.
Do you want to continue execution. [Y/n]y
Get: 1 http://cn.archive.ubuntu.com/ubuntu/precise-updates/main xbase-clients all 1:7.6+12UBUNTU2 [2,322 B]
Get: 2 http://cn.archive.ubuntu.com/ubuntu/precise/universe vnc4server amd64 4.1.1+xorg4.3.0-37ubuntu4 [2,143 KB]
Get: 3 http://cn.archive.ubuntu.com/ubuntu/precise/universe xrdp AMD64 0.5.0-2 [267 KB]
Download 2,412 KB, time consuming 4 seconds (492 kb/s)
Selecting previously unselected package xbase-clients.
(Reading database ...) The system currently has a total of 194,579 files and directories installed. )
Decompressing xbase-clients (from .../xbase-clients_1%3a7.6+12ubuntu2_all.deb) ...
Selecting previously unselected package vnc4server.
Decompressing vnc4server (from .../vnc4server_4.1.1+xorg4.3.0-37ubuntu4_amd64.deb) ...
Selecting previously unselected package xrdp.
Decompressing xrdp (from .../xrdp_0.5.0-2_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Ureadahead'll be reprofiled on next reboot
Setting xbase-clients (1:7.6+12UBUNTU2) ...
Setting Vnc4server (4.1.1+XORG4.3.0-37UBUNTU4) ...
Update-alternatives: Use/usr/bin/vnc4server to provide/usr/bin/vncserver (vncserver) in automatic mode.
Update-alternatives: Use/USR/BIN/XVNC4 to provide/USR/BIN/XVNC (XVNC) in automatic mode.
Update-alternatives: Use/usr/bin/x0vnc4server to provide/usr/bin/x0vncserver (x0vncserver) in automatic mode.
Update-alternatives: Use/USR/BIN/VNC4PASSWD to provide/USR/BIN/VNCPASSWD (VNCPASSWD) in automatic mode.
Update-alternatives: Use/usr/bin/vnc4config to provide/usr/bin/vncconfig (vncconfig) in automatic mode.
Setting XRDP (0.5.0-2) ...
* Generating xrdp RSA keys ...
Generating bit RSA key ...

Ssl_gen_key_xrdp1 OK

Saving To/etc/xrdp/rsakeys.ini

[OK]

* Starting Remote Desktop Protocol Server [OK]

2. Configure XRDP
The goal is to let XRDP transmit the remote service 2D desktop, the default transmission is 3D desktop, there may be a problem.
zhou@desktop:~$ sudo vim/etc/xrdp/startwm.sh
#!/bin/sh

if [-r/etc/default/locale]; Then
. /etc/default/locale
Export LANG LANGUAGE
Fi
echo "Gnome-session--session=ubuntu-2d" >.xsession #新添加行

. /etc/x11/xsession

3. Configure LIGHTDM
You need to configure the XDMP server here

zhou@desktop:~$ sudo vim/etc/lightdm/lightdm.conf

[Seatdefaults]
Greeter-session=unity-greeter
User-session=ubuntu

#以下为新加行

Greeter-show-manual-login=true #指允许通过键入用户名和密码的方式来登录系统
[Xdmcpserver] #字段指启动XDMCP服务器
Enabled=true

4. Restart XRDP and LIGHTDM

zhou@desktop:~$ SUDO/ETC/INIT.D/XRDP Rstart
Usage:/etc/init.d/xrdp {start|stop|restart|force-reload|status}
zhou@desktop:~$ sudo/etc/init.d/xrdp Restart
* Stopping RDP Session Manager [OK]
* Starting Remote Desktop Protocol Server [OK]
zhou@desktop:~$/ETC/INIT.D/LIGHTDM Restart
Rather than invoking Init scripts through/etc/init.d, use the service (8)
Utility, e.g service LIGHTDM restart

Since The script you are attempting to invoke has been converted
Upstart job, your may also use the Stop (8) and then start (8) Utilities,
e.g. stop LIGHTDM; Start LIGHTDM. The restart (8) utility is also available.
stop:rejected send message, 1 matched rules; Type= "Method_call", sender= ": 1.119" (uid=1000 pid=4742 comm= "Stop Lightdm") interface= "Com.ubuntu.Upstart0_6.Job" member= "Stop" Error Name= "(unset)" requested_reply= "0" destination= "Com.ubuntu.Upstart" (uid=0 pid=1 comm= "/sbin/init") ")

5. You can now remotely log on via Windows MSTSC



Original address: http://wangxiaoyu.blog.51cto.com/922065/1294098

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.