博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Windows access Linux / Ubuntu via Remote Desktop via xrdp
阅读量:5366 次
发布时间:2019-06-15

本文共 2677 字,大约阅读时间需要 8 分钟。

Windows 多用户远程桌面连接到 Ubuntu / Linux
Access Ubuntu from Windows remotely
 

Follow these steps :

Step 1 – Install xRDP

Open Terminal (Crtl+Alt+T) and execute the following commands:

sudo apt-get updatesudo apt-get install xrdp

Step 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 xfce4

Step 3 – Configure xRDP

In this step, we modify two files to make sure xRDP uses Xfce4. First we need to create, or edit, our .xsession file in our home directory. We can either use nano or simply redirect an echo statement (easier):

echo xfce4-session > ~/.xsession

The second file we need to edit is the startup file for xRDP, so it will start Xfce4.

sudo nano /etc/xrdp/startwm.sh

The content should look like this (pay attention to the last line and ignore . /etc/X11/Xsession):

#!/bin/shif [ -r /etc/default/locale ]; then  . /etc/default/locale  export LANG LANGUAGEfistartxfce4

Step 4 – Restart xRDP

To make all these changes effective, restart xRDP as such:

sudo service xrdp restart

Testing 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.

Remote Desktop Connection

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:

enter image description here

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”

xRDP – Login screen

You are done,enjoy

RDP – Your Ubuntu xfce4 desktop

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. ()

    • To use the Ubuntu MATE desktop meta-session, replace last line startxfce4 in startwm.shwith mate-session. ()

    • 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. ()

 
 
 
来源: 

 

转载于:https://www.cnblogs.com/jins-note/p/10003926.html

你可能感兴趣的文章
【洛谷】【堆+模拟】P2278 操作系统
查看>>
hdu3307 欧拉函数
查看>>
Spring Bean InitializingBean和DisposableBean实例
查看>>
[容斥][dp][快速幂] Jzoj P5862 孤独
查看>>
Java基础之字符串匹配大全
查看>>
面向对象
查看>>
lintcode83- Single Number II- midium
查看>>
[工具] Sublime Text 使用指南
查看>>
Web服务器的原理
查看>>
#10015 灯泡(无向图连通性+二分)
查看>>
HAL层三类函数及其作用
查看>>
web@h,c小总结
查看>>
Data Structure 基本概念
查看>>
NEYC 2017 游记
查看>>
[搬运] 写给 C# 开发人员的函数式编程
查看>>
core--线程池
查看>>
他山之石:加载图片的一个小问题
查看>>
shell - 常识
查看>>
Spring Cloud Stream消费失败后的处理策略(三):使用DLQ队列(RabbitMQ)
查看>>
PKUWC2018 5/6
查看>>