http://c-nergy.be/blog/?p=5305

Hello World,

Ubuntu 14.04 has been released on April 17th 2014 and we already released the traditional post about how to perform a fresh install. We didn’t covered the upgrade process because it’s quite easy nowadays. Basically, you will be notified that a new version is available and you will be asked if you want to upgrade to the latest version.

Some readers and some of my colleagues have been asking for a post about XRDP functionality in Ubuntu 14.04. If you follow me, you know that we have been using xrdp package in order to connect to linux machines using the built-in remote desktop client available within Windows Operating System.

You probably also know that since the introduction of Unity Desktop Interface in Ubuntu you need to tweak the configuration in order to have it working. The most annoying part while using xrdp (with Ubuntu) is the fact that you have to install an alternate desktop environment.

So, in this post, we will describe the steps needed in order to install xrdp and the xfce alternate desktop that will be used while remoting into your Ubuntu 14.04 machine.

Let’s Go !

Install XRDP Package from Ubuntu Repository

In this post, we will be installing the standard xrdp package from the Ubuntu Repository. In order to perform the installation of the xrdp package, you will login into your ubuntu 14.04 machine.

Using the Dash button, in the search box, type Terminal

Click on Picture for Better Resolution

Click on the terminal icon and the Terminal console will open

In the Terminal, type the following command

sudo apt-get install xrdp

You will be prompted for your password

Click on Picture for Better Resolution

You will be then informed about the package size. To proceed with the installation, press Y

Click on Picture for Better Resolution

Wait for the completion

When done, you need to install an alternate desktop environment. In our scenario, we are using xfce4

Installing the xfce4 Desktop environment

In the Terminal console; type the following command

sudo apt-get update

sudo apt-get install xfce4

Click on Picture for Better Resolution

You might be prompted for a password.Enter the password and press enter

You will be then informed about the package size. To proceed with the installation, press Y

Wait for the completion

Configure xrdp to use xfce desktop environment

At this stage, you have to configure your Ubuntu machine in order for xrdp to know that the xfce desktop will be used instead of the Unity or Gnome (which are not working anymore in Ubuntu). To configure this, from the terminal console, you will issue the following command

echo xfce4-session >~/.xsession

Click on Picture for Better Resolution

Restart the xrdp service by issuing the following command

sudo service xrdp restart

Test your xrdp connection

At this stage, you should have a basic xrdp working solution. When I say basic, I mean that you can indeed connect to your remote Ubuntu machine but if you disconnect your session and try to connect again, you will each time open a new session. (Read below section in this post to see how you can reconnect to the same session)

To test your xrdp solution, find the ip address of your linux machine (or use the name if you have DNS Infrastructure in place). To find the ip address, issue the command

hostname -I

Click on Picture for Better Resolution

Now go to your windows machine, start remote Desktop client and enter the ip address/name of your ubuntu machine

Click on Picture for Better Resolution

You should see then the login screen of xrdp presented to you. Note that, at this screen (and because we have not configured keyboard layout yet), the keyboard layout is set to English by default.

Click on Picture for Better Resolution

Enter your username and password and Press OK

You will see a dialog box showing the login process

Click on Picture for Better Resolution

If everything is configured correctly,you should see your xfce desktop loading and you should be able to perform you work through this desktop environment.

Click on Picture for Better Resolution

To set Keyboard layout at the xrdp Login screen, perform the following steps

As explained above, with no special configuration, the xrdp login screen keyboard layout is set to english by default.  if you need to change it to another keyboard layout, you should proceed with the following actions

This is the command you should issue in order to change the keyboard layout to be used during xrdp sessions…

Step 1 : You go to the /etc/xrdp directory

Step 2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use

Step 3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory

Step 4 : Check that you have a backup of your file by typing the dir or ls command

Step 5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini

Reconnect to the same session throug xrdp

You have mutliple ways to reconnect to the same session through xrdp. we have explained two of them. One method is based on performing a custom installation and use the X11VNC software. This is one is working well but requires a little bit more effort. (http://c-nergy.be/blog/?p=4168)

The other one is to use the xrdp package from ubuntu repository and tweak some configuration files whil connected to the session. This solution is really a workaround and it’s not our favourite one. (see http://c-nergy.be/blog/?p=4471)

Here, we will use a third method that can be used if you use the xrdp pakcage from the ubuntu repository. This method is much better than the one provided by us some time ago. In this method, we will tweak the xrdp login screen. We will add a field in the login box where the user can specify the port to be used when remoting to the ubuntu machine.

You will first need to edit xrdp.ini file located under the /etc/xrdp. To edit the file, issue the following command

sudo gedit /etc/xrdp/xrdp.ini

You might be prompted for a password. if this is the case, provide the password and Press enter
When the file is open, locate the section [xrdp1] and replace the following line

port=-1
with the line
port=ask-1

Save the file. The file should look like this

Click on Picture for Better Resolution

When done, restart the xrdp service by issuing the following command

sudo service xrdp restart.

You are done.

When trying to access your Ubuntu
machine through via the remote desktop client, you will see that the
xrdp login screen has indeed an additional field called port.

Click on Picture for Better Resolution

If this is your first connection, leave the default value in the port field (i.e. -1), you will be then connecting through xrdp to your ubuntu machine using a specified port that can be seen on the login process dialog box.

Click on Picture for Better Resolution

Take a note of this port.

When you need to reconnect, you will
have to specify the same port as your first connection and you should
see the same screen as you left it.

Click on Picture for Better Resolution

Note : This tip has been provided to us by one of our reader (Thank you Wei )

This is it for this post. Using only the
ubuntu xrdp package, we have been able to install and configure a
remote access solution. By tweaking the xrdp.ini file, we even have been
able to provide a simple and easy to use solution in order to reconnect
to an existing session.

However, we still have a problem with
xrdp used in conjunction with Ubuntu. In order to remote into your
ubuntu machine, you have no other choice than using an alternate desktop
environment (in our case its xfce). I find it quite irritating that we
cannot have the xrdp package working with Unity or Gnome desktop
environment.

We have installed fedora distribution
and installed the xrdp package. And guess what ! I can connect through
xrdp to fedora and have the gnome desktop environment working. Moreover,
I can disconnect and when reconnecting I will be reconnecting to the
existing session I just left. And all of this with no tweak in
configuration files.

I would love to see the same
functionality in Ubuntu. As one of our readers mentionned, it might be
time for Ubuntu users to fill in a bug report about xrdp and try to have
it fixed. If more and more users complains, maybe Ubuntu team will take
the request into account.     

Till next Time

See ya

-----------------------------------------------------------------------------------------------

X Server -- no display in range is available. xrdp_mm_process_login_response: login failed

X Server -- no display in range is available. xrdp_mm_process_login_response: login failed

 
 I was having this error xrdp_mm_process_login_response: login failed. I tried the solution from this blog entry, but the error remain xrdp_mm_process_login_response: login failed

When I look into the /var/log/ xrdp-sesman.log, the error is followed:

[20130913-14:11:00] [INFO ] starting Xvnc session...
[20130913-14:11:00] [ERROR] X server -- no display in range is available

I managed to solve the issue by changing /etc/xrdp/sesmain.ini - MaxSessions from 10 to 100

[Security]
AllowRootLogin=1
MaxLoginRetry=4
#TerminalServerUsers=tsusers
#TerminalServerAdmins=tsadmins [Sessions]
X11DisplayOffset=10
MaxSessions=100
KillDisconnected=0
IdleTimeLimit=0
DisconnectedTimeLimit=0

Restart the Service

# service xrdp restart
Posted by

kittycool

at

2:50 PM

Labels:
CentOS,
xrdp

 

3 comments:

Ghebaru Ion
said...

for me worked very well
...
thanks

March 20, 2014 at 3:02 AM

 
Shrey Mehrotra
said...

Thanks a lot....worked for me..

March 26, 2014 at 3:32 PM

Iain Elder
said...

I solved this by changing X11DisplayOffset to 1 instead.

Ubuntu 14.04 – How to install xrdp in Ubuntu 14.04的更多相关文章

  1. Ubuntu Linux: How Do I install .deb Packages?

    Ubuntu Linux: How Do I install .deb Packages? Ubuntu Linux: How Do I install .deb Packages? by Nix C ...

  2. install cinnamon on ubuntu 14.04

    emotion: I feel not comfortable with ubuntu 14.04 default desktop unity,i still look for a alternati ...

  3. Ubuntu 14.04 SSH + 远程登录xrdp

    1. 安装ssh 打开"终端窗口",输入"sudo apt-get install openssh-server"-->回车-->输入"y ...

  4. How To Install Cacti On Ubuntu 14

    How To Install Cacti On Ubuntu 14.04/14.10 by anismaj Cacti is an open source web based network moni ...

  5. How To Install Nginx on Ubuntu 16.04 zz

    Introduction Nginx is one of the most popular web servers in the world and is responsible for hostin ...

  6. [转]Ubuntu Tweak 0.8.7 发布:支持 Ubuntu 14.04

    原文网址:http://www.oschina.net/news/51054/ubuntu-tweak-0-8-7 这是我开发 Ubuntu Tweak 七年以来第一次没在 Ubuntu 正式发布之前 ...

  7. (转) How to install eclipse in ubuntu 12.04

    源地址:http://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/ Eclipse installation in ubuntu 12. ...

  8. Ubuntu 16.04: How to install OpenCV

    参考:https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/ 步骤# 1:安装opencv的依赖项 本 ...

  9. How to Install PhantomJS on Ubuntu 16.04

    Introduction PhantomJS is a scripted, headless browser that can be used for automating web page inte ...

随机推荐

  1. 30岁IT男连续工作一个月 突然失聪

    连续开发软件一个月,30 岁男子突然听不见声音了.近日,浙江省中山医院针灸科主任高宏主任中医师接诊了这名患者.高主任说,现在很多年轻人工作压力大,得突发性耳聋的越来越多,这种病听着不是威胁生命的大病, ...

  2. 【转】oracle数据库中varchar2陷阱

    源地址:http://www.cnblogs.com/iyangyuan/p/3491215.html oracle数据库相信大家都比较熟悉,数据库中有一种非常常用的数据类型:字符串型. 对应该类型, ...

  3. [InnoSetup]Inno Setup软件打包脚本

     脚本由 Inno Setup 脚本向导 生成! ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!   #define MyAppName "SFT期货交易系统&quo ...

  4. Regex.Replace的基本用法

    Regex构造函数Regex(string pattern)Regex(string pattern,RegexOptions options)参数说明pattern:要匹配的正则表达式模式optio ...

  5. [转]使用 HttpClient 和 HtmlParser 实现简易爬虫

    http://www.ibm.com/developerworks/cn/opensource/os-cn-crawler/ http://blog.csdn.net/dancen/article/d ...

  6. php中检查文件或目录是否存在的代码小结

    检查文件或目录是否存在 ,我们使用了php中常用的函数file_exists,这个函数就可以实现我想要的功能,下面大家慢慢参考一下下面是一个简单的检查文件是否存在的实例代码: <?php $fi ...

  7. 转 UITabBarController简单介绍

    文顶顶 iOS开发UI篇—UITabBarController简单介绍 iOS开发UI篇—UITabBarController简单介绍 一.简单介绍 UITabBarController和UINavi ...

  8. Android 使用NineOldAndroids实现绚丽的ListView左右滑动删除Item效果

    本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/18311877) 今天还是给大家带来自定义控件的编写,自定义一个Lis ...

  9. 从AlphaGo谈通用型人工智能设计

    最近赢了人机大战的AlphaGo火了,火得一塌糊涂,圈里圈外,是人都在谈AlphaGo.但是AlphaGo毕竟是为特定场景特定应用设计的特定型人工智能,和通用型人工智能还是有很大差别,离人工智能普及更 ...

  10. canvas-star6.html

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...