Ubuntu 14.04–how to install XRDP in Ubuntu 14.04

Source: Internet
Author: User
Tags vcard

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

Hello World,

Ubuntu 14.04 have been released on April 17th 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'll be notified. A new version is available and you'll be asked if you want to upgrade to the latest Version.

Some readers and Some of my colleagues has been asking for a post on XRDP functionality in Ubuntu 14.04. If you follow me, you know that we had been using XRDP package in order to connect to Linux machines using the built-in R emote desktop client available within Windows Operating System.

You probably also know this since the introduction of Unity Desktop Interface in Ubuntu you need to tweak the Configuratio N in order to has it working. The most annoying part and using XRDP (with Ubuntu) are the fact that they have a to install an alternate desktop enviro Nment.

So, in this post, we'll describe the steps needed in order to install XRDP and the Xfce alternate desktop that'll be U sed while remoting to your Ubuntu 14.04 machine.

Let ' s Go!

Install XRDP package from Ubuntu Repository

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

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

Click on the picture for Better Resolution

Click on the terminal icon and the terminal console would open

In the Terminal, type the following command

sudo apt-get install XRDP

You'll be prompted for your password

Click on the picture for Better Resolution

You'll be and then informed on the package size. To proceed with the installation, press Y

Click on the picture for Better Resolution

Wait for the completion

When do, you need to install an alternate desktop environment. In our scenario, we is 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 the picture for Better Resolution

You might is prompted for a password. Enter the password and press ENTER

You'll be and then informed on 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 had to configure your Ubuntu machine on order for XRDP to know that the Xfce desktop would be Used instead of the Unity or Gnome (which is not working anymore in Ubuntu). To configure this, from the terminal console, you'll issue the following command

Echo Xfce4-session >~/.xsession

Click on the picture for Better Resolution

Restart the XRDP service by issuing the following command

sudo service xrdp restart

Test your XRDP connection

At the this stage, you should has a basic XRDP working solution. When I say basic, I mean so can indeed connect to your remote Ubuntu machine If you disconnect your session and Try to connect again, and you'll each time open a new session. (Read below section in this post to see how can reconnect to the same session)

To test your XRDP solution, find the IP address of your Linux machine (or with the name if you had DNS Infrastructure in P Lace). To find the IP address, issue the command

Hostname-i

Click on the 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 the picture for Better Resolution

You should see then the login screens of XRDP presented to you. Note that, on this screen (and because we had not configured keyboard layout yet), the keyboard layout was set to Engl Ish by default.

Click on the picture for Better Resolution

Enter your username and password and press OK

You'll see a dialog box showing the login process

Click on the picture for Better Resolution

If Everything is configured correctly,you should see your XFCE desktop loading and you should being able to perform your work Through this desktop environment.

Click on the 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 are set to 中文版 by default. If you need-to-another keyboard layout, you should proceed with the following actions

The 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

Step 3 : Create a copy of the Km-0409.ini file into the same directory. It seems that's the default file used by XRDP to define the keyboard layout. You'll need to use sudo on order to being able to write into the directory

Step 4 : Check that you had 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 are mutliple ways to reconnect to the same session through XRDP. We have explained of them. One method is based on performing a custom installation and use the X11VNC software. This is one of the working well and requires a little bit more effort. (http://c-nergy.be/blog/?p=4168)

The other one was to use the XRDP package from Ubuntu repository and tweak some configuration files Whil connected to the S Ession. This solution is really a workaround and it's not our favourite one. (See HTTP://C-NERGY.BE/BLOG/?P=4471)

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

You'll 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 is prompted for a password. If the the case, provide the password and press ENTER
When the file was 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 the picture for Better Resolution

When did, restart the XRDP service by issuing the following command

sudo service xrdp restart.

You were done.

When trying to access your Ubuntu machine through via the Remote Desktop client, you'll see that the xrdp login screen h As indeed an additional field called Port.

Click on the picture for Better Resolution

If This is your first connection, leave the default value in the Port field (i.e.-1). Connecting through XRDP to your Ubuntu machine using a specified port the can is seen on the Login Process dialog box .

Click on the picture for Better Resolution

Take a note of the this port.

When you need to reconnect, you'll have to specify the same port as your first connection and you should see the same SC Reen as you left it.

Click on the picture for Better Resolution

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

This is the it for this post. Using the only of the Ubuntu XRDP package, we had been able to install and configure a remote access solution. By tweaking the Xrdp.ini file, we even has been able to provide a simple and easy-to-use solution on order to reconnect T o an existing session.

However, we still has a problem with XRDP used in conjunction with Ubuntu. In the order to the remote into the your Ubuntu machine, you has no other choice than using a alternate desktop environment (in our Case it Xfce). I find it quite irritating that we cannot has 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 has the GNOME desktop environment working. Moreover, I can disconnect and when reconnecting I'll be reconnecting to the existing session I just left. And all of the tweak in configuration files.

I would love to see the same functionality in Ubuntu. As one of our readers mentionned, it might is time for Ubuntu users to fill in a bug on XRDP and try to has it Fixed. If more and more users complains, maybe Ubuntu team'll take the request to 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 had 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 ten to 100
[Security] Allowrootlogin=1maxloginretry=4#terminalserverusers=tsusers#terminalserveradmins=tsadmins[sessions] X11displayoffset=10maxsessions=100killdisconnected=0idletimelimit=0disconnectedtimelimit=0

Restart the Service
# Service XRDP Restart


Posted bykittycoolat2:50 PM LABELS:CENTOS,XRDP

3 Comments:
Ghebaru Ionsaid ...

For me worked very well
...
Thanks

March at 3:02 AM
Shrey Mehrotrasaid ...

Thanks a lot....worked for me.

March at 3:32 PM
Iain Eldersaid ...

I solved the changing x11displayoffset to 1 instead.

Ubuntu 14.04–how to install XRDP in Ubuntu 14.04

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.