本文介绍了如何使用 xrdp 在 ubuntu 中重用会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当远程到 ubuntu 14.04 时,我只想使用一个会话.google了一下,找到了方法,但是设置不成功.

I want to use only one session when remote to ubuntu 14.04. I searched in google and found the way, but the setup was not success.

  1. sudo apt-get 更新
  2. sudo apt-get install xfce4
  3. sudo apt-get install tinyvncserver
  4. sudo apt-get install xrdp
  5. 配置 xsession &startwm.sh 文件:

echo xfce4-session >~/.xsession

echo xfce4-session >~/.xsession

sudo nano/etc/xrdp/startwm.sh

sudo nano /etc/xrdp/startwm.sh

#!/bin/sh

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

startxfce4 
  1. 配置/etc/xrdp/xrdp.ini:

  1. Config /etc/xrdp/xrdp.ini:

[xrdp8]

名称=测试

lib=libvnc.so

lib=libvnc.so

用户名=用户

密码=密码

ip=127.0.0.1

ip=127.0.0.1

端口=5912

sudo service xrdp restart

sudo service xrdp restart

远程到 ubuntu PC,显示弹出窗口

Remote to ubuntu PC, The pop-up shown

开始连接

连接到 127.0.0.1 5912

connecting to 127.0.0.1 5912

错误:连接问题

我该如何解决这个问题.请帮我.先谢谢你

How can i solve this problem. Please help me. Thank you in advanced

推荐答案

sudo apt-get install tightvncserver not required to install.

Here I am gonna make use of xfce4 desktop environment.

Follow the steps below:---

1)sudo apt-get update
2)sudo apt-get install xrdp
3)sudo apt-get install xfce4
4)sudo apt-get install xfce4-terminal
5)echo xfce4-session >~/.xsession​
6)nano /etc/xrdp/startwm.sh


check below script content is there or not in your file (startwm.sh), if not then please add them. 

#!/bin/sh

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

startxfce4

7) check status whether running or not

   sudo service xrdp status


8) to use same session add below line in mentioned file

go to /etc/xrdp/xrdp.ini:

[xrdp8]
name=reconnect
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=ask5910 ( you can also use "port=ask" , but you need to remember previous running 
              port number. )

(注意:- 默认端口号是 5910 这就是我提到port=ask5910"的原因.)

( Note:- default port number is 5910 thats why i have mentioned "port=ask5910".)

这篇关于如何使用 xrdp 在 ubuntu 中重用会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 23:01