Follow these steps :
Step 1 – Install xRDP
Open Terminal (Crtl+Alt+T) and execute the following commands:
sudo apt-get update sudo apt-get install xrdpStep 2 – Install XFCE4 ( Unity doesn't seem to support xRDP in Ubuntu 14.04; although, in Ubuntu 12.04 it was supported ). That's why we install Xfce4.
sudo apt-get install xfce4Step 3 – Configure xRDP
In this step, we modify two files to make sure xRDP uses Xfce4. First we need to create, or edit, our
.xsessionfile in our home directory. We can either use nano or simply redirect an echo statement (easier):echo xfce4-session > ~/.xsessionThe second file we need to edit is the startup file for xRDP, so it will start Xfce4.
sudo nano /etc/xrdp/startwm.shThe content should look like this (pay attention to the last line and ignore
. /etc/X11/Xsession):#!/bin/sh if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi startxfce4Step 4 – Restart xRDP
To make all these changes effective, restart xRDP as such:
sudo service xrdp restartTesting your xRDP connection
On the computer that will remotely control your Ubuntu machine, start you RDP client. Windows comes standard with a Remote Desktop client (mstsc.exe – you can start it from a command prompt, or find the shortcut to Remote Desktop under Accessories). Or Search 'remote' in start (Windows 7) Or 'remote' in search box in Windows 8.
Whichever client you use, most will work with either the computer network name or IP address of your Ubuntu machine.
To find the IP address on your Ubuntu box, type:
hostname -I(note: this is a capital “i”)
Enter IP address of your Ubuntu machine. For example:
Depending on your RDP client capabilities and settings (for example: Microsoft RDP Client allows automatic login), you might or might not see the login screen. Here we enter our Ubuntu username and password and click “OK”
You are done,enjoy
PS: There are some good points mentioned in comments, so I thought to sum them up.
-
If you want to access Ubuntu from outside network, you'll need your Ubuntu at work to have it's own, proper, internet IP address - a fairly unlikely scenario. To work it otherwise, you need the externally visible address of work, AND have port forwarding set to direct incoming RDP requests to your work computer on the router. (Mark Williams)
-
To use the Ubuntu MATE desktop
meta-session, replace last linestartxfce4instartwm.shwithmate-session. (Frank N) -
You can use your actual machine name (by typing
hostname) rather than your IP as it might be more stable on dynamic IPs in future sessions. (Frank N) -
参考来自 https://askubuntu.com/questions/592537/can-i-access-ubuntu-from-windows-remotely
本文详细介绍了如何通过四步安装和配置xRDP及XFCE4,实现从Windows远程访问Ubuntu桌面的过程。步骤包括安装xRDP、安装XFCE4、配置xRDP使用XFCE4以及重启xRDP服务。此外,还提供了如何在Windows上使用RDP客户端连接Ubuntu的指导。




6353

被折叠的 条评论
为什么被折叠?



