xRDP – How to Install on Linux Mint – Part II

 

Hello World, 

In the previous post related to xRDP and Linux Mint, we have quickly described how to perform a basic installation of the xRDP software and how to configure it so you can use to remote connect to the Cinnamon Desktop interface.  However, the xrdp package that ship with Linux Mint 18.1 is not the most recent one.  Indeed, Linux Mint 18.1 is basically using the Ubuntu 16.04 repository for the packages to be used.

Since Ubuntu 16.10, the package repository has been updated and the newer version of xRDP package is available (version 0.9.0).  This new version of the package brings most requested features which are drive redirection and clipboard functionality.

In this post, we will provide you a simple way to perform the installation of xrdp 0.9.0 on a Linux Mint 18.1 machine.

Let’s go ! 

Custom Installation Script (version 1.7.1)

The xrdp package version 0.9.0 is available in the Ubuntu 16.10 repository. However, if you try to perform an installation using this xrdp package, this would not be working (out of the box) because you would probably lack needed dependencies.  To overcome this situation, we have updated our custom installation script and tuned it for Linux Mint.

Assumptions

Before running this script, be aware of the following assumptions

  • We have tested the script on Linux Mint 18.1 (and only this version)
  • No alternative desktop interface will be needed.  You will be connected to your Cinnamon (software redenring) Desktop after xrdp package is installed.
  • We have performed the test on a Virtual Machine running on Hyper-V Server and Virtualbox
  • Your virtual machine is connected to Internet (so you can download the necessary packages for the installation to occur). If you are not connected to internet, you can still manually download the xrdp package and modify the script accordingly

The script version 1.7.1

Below, you can see the script that can be used to install and configure xRDP package on the Linux Mint 18.1 systems.  We provide the script here so you can see what actions would be performed on your system

The script can be downloaded. A link has been made available at the end of this post  

Important Note :

If you copy/paste the script, you might encounter some issues because font formatting might be not maintained during the copy/paste operation. Please ensure that format is  accurate before launching the script.

Disclaimer : As usual, use this at your own risk !! 

 

################################################################
# Script_Name : xrdp-install.sh
# Description : Perform an automated custom installation of xrdp
# on Linux Mint 18.1 when systemd is used
# Date : December 2016
# written by : Griffon
# Web Site :http://www.c-nergy.be - http://www.c-nergy.be/blog
# Version : 1.7.1
#
# Disclaimer : Script provided AS IS. Use it at your own risk....
#
##################################################################

##################################################################
#Step 1 - Install prereqs for compilation
##################################################################

echo "Installing prereqs for compiling xrdp..."
echo "----------------------------------------"

sudo apt-get -y install libx11-dev libxfixes-dev libssl-dev libpam0g-dev libtool libjpeg-dev flex bison gettext autoconf libxml-parser-perl libfuse-dev xsltproc libxrandr-dev python-libxml2 nasm xserver-xorg-dev fuse automake

#Install git 
echo "Installing git software..."
sudo apt-get -y install git 

##################################################################
#Step 2 - Obtain xrdp packages and xorgxrdp packages
################################################################## 

#-Go to your Download folder
echo "Moving to the ~/Download folders..."
echo "-----------------------------------"
cd ~/Downloads

#Download the xrdp latest files
echo "Ready to start the download of xrdp package"
echo "-------------------------------------------"
git clone https://github.com/neutrinolabs/xrdp.git

#move to xorgxrdp folder and download needed packages
cd xrdp
git clone https://github.com/neutrinolabs/xorgxrdp.git

##################################################################
#Step 3 - Add/Remove Ubuntu xrdp packages (used to create startup service)
################################################################## 

echo "Add/Remove xrdp packages..."
echo "---------------------------"
sudo apt-get -y install xrdp
sudo apt-get -y remove xrdp

##################################################################
#Step 4 - compiling xrdp packages
################################################################## 

#Compile and make xrdp

echo "Installing and compiling xrdp..."
echo "--------------------------------"

# needed because libtool not found in Ubuntu 15.04 and later
# Need to use libtoolize

sudo sed -i.bak 's/which libtool/which libtoolize/g' bootstrap

sudo ./bootstrap
sudo ./configure --enable-fuse --enable-jpeg
sudo make
sudo make install

##################################################################
#Step 5 - compiling xorgxrdp packages
################################################################## 

cd xorgxrdp 
sudo ./bootstrap 
sudo ./configure 
sudo make
sudo make install
cd ..

##################################################################
#Step - Final Post Setup configuration
################################################################## 

echo "---------------------------"
echo "Post Setup Configuration..."
echo "---------------------------"

echo "Set Default xVnc-Sesman"
echo "-----------------------"

sudo sed -i.bak '/\[X11rdp\]/i [xrdp0]\nname=Sesman-Griffon \nlib=libxup.so \nusername=ask \npassword=ask \nip=127.0.0.1 \nport=-1 \ncode=20 \n' /etc/xrdp/xrdp.ini

echo "Symbolic links for xrdp"
echo "-----------------------"

sudo mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh
sudo mkdir /usr/share/doc/xrdp
sudo cp /etc/xrdp/rsakeys.ini /usr/share/doc/xrdp/rsakeys.ini

## Needed in order to have systemd working properly with xrdp
echo "-----------------------"
echo "Modify xrdp.service "
echo "-----------------------"

#Comment the EnvironmentFile - Ubuntu does not have sysconfig folder
sudo sed -i.bak 's/EnvironmentFile/#EnvironmentFile/g' /lib/systemd/system/xrdp.service

#Replace /sbin/xrdp with /sbin/local/xrdp as this is the correct location
sudo sed -i.bak 's/sbin\/xrdp/local\/sbin\/xrdp/g' /lib/systemd/system/xrdp.service
echo "-----------------------"
echo "Modify xrdp-sesman.service "
echo "-----------------------"

#Comment the EnvironmentFile - Ubuntu does not have sysconfig folder
sudo sed -i.bak 's/EnvironmentFile/#EnvironmentFile/g' /lib/systemd/system/xrdp-sesman.service

#Replace /sbin/xrdp with /sbin/local/xrdp as this is the correct location
sudo sed -i.bak 's/sbin\/xrdp/local\/sbin\/xrdp/g' /lib/systemd/system/xrdp-sesman.service

#Issue systemctl command to reflect change and enable the service
sudo systemctl daemon-reload
sudo systemctl enable xrdp.service

# Set keyboard layout in xrdp sessions
cd /etc/xrdp 
test=$(setxkbmap -query | awk -F":" '/layout/ {print $2}') 
echo "your current keyboard layout is.." $test
setxkbmap -layout $test
sudo cp /etc/xrdp/km-0409.ini /etc/xrdp/km-0409.ini.bak
sudo xrdp-genkeymap km-0409.ini

echo "Restart the Computer"
echo "----------------------------"
sudo shutdown -r now 


How to use this Script (version 1.7.1)

We will not repeat what has been already explained in our previous posts.  We provide here a quick explanation on how to use the script and run it. 

You first need to grab a copy of this script.  To avoid formatting issues, we have made the script available for download.  The download link is available at the end of this post.  

Then you have to mark the script as executable.  You can do this using the command line  by issuing the following command  chmod +x  ~/Downloads/xrdp-install-1-7.1.sh (adapt the path to reflect path location)

To execute the script, simply open your terminal console, navigate to the folder where the file is located and issue the following command

sudo ./xrdp-install-1-7.1.sh

As mentioned before,  we assume that you have internet connection and you will be able to download all the necessary packages needed to perform this configuration.

Note : The script will download the necessary files under the ~/Download folders.

Wait for completion of the script.  The machine will reboot automatically when done.  The operation can take up to 30 minutes to complete

Testing it ! 

At this stage, you can open your remote desktop client and make a connection to your Linux Mint 18.1 computer.  The xRDP login page will be presented to you and you should see as default choice the Sesman-Griffon option selected. Do not change this setting.

Click on Picture for Better Resolution

Provide your credentials and Press OK

After some time, you should your cinnamon desktop interface displayed through the remote desktop connection 

Click on Picture for Better Resolution

You are done 

Download Script

For your convenience, we are providing a downloadable version of the script. You can find it here

Final Notes

The 2 part post about Linux Mint 18.1 and xRDP is completed.  If you follow these simple instructions, you should be able to perform a remote desktop connection to your Cinnamon Desktop environment.  In the part I, we have been using the official Ubuntu package but which is also a little bit outdated. In Part II, we have been using the latest version of the xrdp package and provided an updated script that can automate and simplify the installation.

We prefer the custom installation because it uses the latest version of the xrdp package, does not rely on any vnc server software anymore and provide drive redirection as well 

Hope this info we will valuable for some of you 

Till next time 

See ya

 

 

33 thoughts on “xRDP – How to Install on Linux Mint – Part II

  1. Many thanks for your continued efforts with xrdp!
    I have been trying to get xrdp 0.9.0 working on my virtual machine with no success.
    Today I tried using your script too with the same results.
    I am at a loss on why my Linux Mint 18.1 refuses to play nicely with the latest xrdp with any xorgxrdp, x11rdp or vncserver.

    [20170124-17:28:38] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
    [20170124-17:28:39] [INFO ] xrdp_wm_log_msg: sesman connect ok
    [20170124-17:28:39] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait..
    .
    [20170124-17:28:39] [DEBUG] return value from xrdp_mm_connect 0
    [20170124-17:28:39] [INFO ] xrdp_wm_log_msg: login successful for display 11
    [20170124-17:28:39] [DEBUG] xrdp_wm_log_msg: started connecting
    [20170124-17:28:42] [DEBUG] Closed socket 19 (AF_UNIX)
    [20170124-17:28:46] [DEBUG] Closed socket 19 (AF_UNIX)

    Snip repeated messages

    [20170124-17:32:00] [DEBUG] Closed socket 19 (AF_UNIX)
    [20170124-17:32:03] [DEBUG] Closed socket 19 (AF_UNIX)
    [20170124-17:32:07] [DEBUG] Closed socket 19 (AF_UNIX)
    [20170124-17:32:10] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
    [20170124-17:32:10] [DEBUG] Closed socket 19 (AF_UNIX)
    [20170124-17:32:10] [DEBUG] xrdp_wm_log_msg: some problem
    [20170124-17:32:10] [DEBUG] xrdp_mm_module_cleanup
    [20170124-17:32:10] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:50558)

    I am at a loss on what is causing it to fail (my VM virtual drive is restored to its original state from a snap shot after every failed install).

    Shooting in the dark here, but could this have anything to do with KVM and its networking as XEN users do not appear to encounter problems?


    # ifconfig
    enp2s1 Link encap:Ethernet HWaddr **:**:**:**:**:**
    inet addr:10.0.0.61 Bcast:10.0.0.255 Mask:255.255.255.0

  2. @DeadPan110,

    Interesting issue you are having there ? At the moment, Do not have an idea, I would need to check my installation and my logs files to see what’s happening…..

    I do not thing that the KVM hypervisor would cause the problem….If you have basic network connectivity to your Virtual machine (you can ping) and your firewall is allowing xRDP traffic, the xrdp functionality should be working just fine. My understanding is that you have run the script on different Virtual machines and it works. Right ? So, the script should be working fine. You could try to run part of the script from your command line and see if there any errors thrown at you…(missing dependencies,…) on the problematic machine

    Please confirm that you can have the xrdp solution working if you are using another hypervisor that kvm
    On kvm hypervisor, try to run the script, line by line in your command prompt to be sure that no errors are thrown at you
    Do no install any vnc server package and ensure that you select the correct sesman in the login
    Let’s check again the xrdp logs and compared them to logs on a working machine, is there any hints that could help us to find a solution for that

    Hope this help
    Keep me in the loop if you find something new… I will try to make some test about that….(when time permit)

    Till next time
    See ya

  3. I have it working!
    PEBKAC – I must remember to label my virtual machines and virtual drives better in the future (doh)!!
    I was using my Linux Mint (Mate) install and NOT my Linux Mint (Cinnamon) one.
    The performance seems really good with xorgxrdp – just what I was hoping (many thanks)!!
    One quick question:
    Is it possible to have sound working with xorgxrdp as I can remember doing it a long while back with X11rdp?
    Thanks again 🙂

  4. @Deadpan110,

    Good to hear that the post helped you and you finally were able to have xrdp working on a real Linux Mint OS 🙂
    xrdp latest version seems indeed to bring some improvements…..let’s keep an eye on it….

    Thank you for the feedback…

    Till next time
    See ya

  5. I have sound working!!!
    It had been a while since I have done this and for some reason I thought it was part of x11rdp but instead it is within xrdp/sesman/chansrv/pulse
    Using the instructions located at:
    https://github.com/neutrinolabs/xrdp/wiki/Audio-Output-Virtual-Channel-support-in-xrdp
    and:
    https://github.com/neutrinolabs/xrdp/blob/devel/sesman/chansrv/pulse/pulse-notes.ubuntu.txt
    I installed the module-xrdp-sink.so and module-xrdp-source.so into /usr/lib/pulse-8.0/modules directory (there is no lib64 as mentioned in the instructions) then edited /etc/pulse/default.pa
    After a quick reboot, sound was working on my local RDP client!

  6. @DeadPan110,

    Thank you very much for the useful input about xrdp and sound feature…. We will try (when time permits) try to wrap this up as well and mention your contribution….;-)
    I’m really please to see that xrdp is getting better and better with time
    Again thank you for the positive comments and input you are providing….

    Keep in touch
    Till Next Time
    See ya

  7. Thanks for the great effort.
    I literally spent more than a week to make X11rdp-O-Matic to work on Mint 18.1 mate with no success.
    Then I ran into your script and could make it work on Mint18.1 mate desktop environment with minor modifications.

    Basically I had to comment out the following two lines in your script

    sudo mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
    sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh

    meaning, xrdp supplied startwm.sh should be remain untouched.

    Also had to create .xsession file in the user home directory with mate-session as its content.
    There maybe a way to make this change system wide. Unfortunetly, I don’t know how to do it. 8-(

    With these modifications, I could successfully installed xrdp+xorgxrdp on 3 headless (that’s why I desperately need xrdp support) Mint 18.1 mate desktop.

    Performance seems to be just a little bit slower than that of x11rdp. I can live with that.

    Cheers.

  8. @Sang Ju Park,

    Thank you for your visit and the feedback….You are totally right.. These lines below should have been commented (this came from previous version of the script and there is no need to perform this change anymore….)

    sudo mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
    sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh

    If you want to use mate-desktop, you have two options indeed
    option 1 – You can to create for each user the ~/.xsession file and append the mate-session (cfr old post for more information that http://c-nergy.be/blog/?p=5382)
    Option 2 – you can modify the /etc/xrdp/startwm.sh and append at the bottom of the file the mate-session command so this setting would apply system wide (for more details, check the following post http://c-nergy.be/blog/?p=10165)

    As soon as I have a little bit of time, I will update the post and take into account your remarks

    Thank again

    Till next time
    See ya

  9. I have created a PPA with the latest version 0.9.1 of xrdp and xorgxrdp for Xenial and Mint 18 and 18.1

    To install the packages from the PPA do:

    sudo add-apt-repository ppa:hermlnx/xrdp
    sudo apt-get update
    sudo apt-get install xrdp xorgxrdp

  10. @herminx,

    Thank you for the info…and for the work provided. When time permits, we will test it and possibly update our post to mention your packages….
    This is really cool to see that people are sharing their work and knowledge….

    Till next time
    See ya

  11. Hi’

    Thanks for some great posts, with a lot of nice tips, when it comes to rdp and vnc 🙂

    @Sang Ju Park did send me a mail, and i finally find some time, to trying this out. Until now, i used TigerVNC combined with XRDP.

    I just tested the script on 18.1 with MATE-desktop and it looks like it fails with `cd xrdp/` – Cause i got two folders in Download: “xrdp” and “xorgxrdp”. Can’t say what is going wrong, but maybe the `cd ~/Downloads/xrdp/` will work out.

    I run through the script, typing all the lines (echo excluded of course…), and it WORKS – but i did also add mate-session to .xsession file in the home directory, cause i need the same setup as Sang using.

    I got some errors after running `sudo make` in step 4 (xrdp). But it looks like the xrp libs was installed just fine. Take a look at http://pastebin.com/HMi0rt9B – I just commented out the two lines, and removed “/” from the cd xrdp command (But i can’t tell any difference…)

    PROLEMS WITH KEYBOARD LAYOUT?
    As a sidenote for all other visitors trying to run the script within a SSH CLIENT connected to the target machine, the LAST LINES WON’T WORK, cause of setxkbmap won’t return the current used keyboard layout.

    Cant’ currently say anything about the performance, compared to the solution with TigerVNC. I will try looking into the performance-part – I did make full backup of the old VM in ESXi 🙂

  12. Sorry for the double-posts! You’re welcome to merge them @Griffon.

    As a tip – if you like me, don’t need any X running on the host machine, but only need it when connecting to the RDP-protocol. Here’s how to disable it (Tested just fine on Linux Mint 18.1)

    ## Disable X autostartup as host-machine (Linux Mint 18.1)
    `sudo nano /etc/default/grub`

    Find this line:
    `GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”`

    Change it to:
    `GRUB_CMDLINE_LINUX_DEFAULT=”text”`

    Update GRUB:
    `sudo update-grub`

    You ALSO need to tell systemd to not load the graphical login manager:
    “`
    sudo systemctl enable multi-user.target –force
    sudo systemctl set-default multi-user.target
    “`

    You will still be able to use X by typing `startx` after you logged in to your host machine.

  13. @Tobias,

    Thank you for the feedback and sharing info with us…
    Some comments from our side…..

    The cd xrdp/ was a typo and we have corrected it…

    The point of the post was to show that you would not need to install any additional desktop environment while using xrdp….
    If you use xrdp with tigervnc or the xrdp server compoment, no need to have MATE Desktop installed…. This is why in the
    script/post we do not modify .xsession file or startwm.sh file….. If you really want to use mate-desktop, then you can install it if you want to….

    The Keyboard layout issue => actually, this is a good point. We usually specify that this command needs to be run locally on the machine and not through xrdp or now ssh…..
    We will try to update the post and take into account these information

    Till next time
    See ya

  14. Question!

    XRDP works fine.

    Keyboard Language in XRDP-Session is German – OK
    System + Application Language in XRDP-Session is English ! – PROBLEM

    If I am logged in directly at the XRDP-Server (same User) all Applications+System are in German.
    The Location Settings Program in the XRDP-Session won’t start. (without message)

  15. @Thomas,

    Thank you for the information..I do not think I will have time to investigate this one..Based on the comments we have received, someone has made a xrdp 0.9 package available for Linux Mint. You might want to give it a try as well and see if this could fix your issues

    Till next time
    See ya

  16. Thank you for all your fine work and sharing. Installed both I and II. Got me farther than before. Can log in now but only see a blank blue screen. Appreciate any suggestions.

    Thanks again.

  17. @Fred,

    Ok, we have seen that time to time…can you have a look at the logs files and see if there is any hints over there….
    never really identified the root cause of such behavior…
    Please note also that the xrdp software has been updated quite heavily in the past few weeks/months so we might need to update our scripts and process to take that into account

    Hope this help
    Till next time
    See ya

  18. I tried the script above and it works on Mint Mate 18.1 but logout does not. It duplicates the icons on the panel and stays logged in. I tried the -once parameter but to no avail. Any ideas?

  19. @Edgar,

    When we did our tests, we didn’t encountered such issue.. The logout functionality seemed to work…XRDP software seems to have time to time difficulties to reproduce all functionalities of a Desktop Environment. The logout function seems not to work on gnome or unity as well….

    You could try to use this code and create a shortcut “logout” button and see if this is an acceptable workaround
    ps -ef h | grep Xvnc | grep `whoami` | tr -s ” ” | cut -d ” ” -f2 | xargs kill -9

    Hope this help
    Till next time
    See ya

  20. Hello,

    First, thank you for this excellent script. However, I’m having an issue, when I try to login to my machine via either Xorg or Sessman-Griffon the desktop loads and I receive an error message stating “Cinnamon just crashed. You are currently running in fallback mode”.

    It gives me the option to try and restart Cinnamon but the issue persists. If I choose to continue anyway it seems to be mostly working, although very very slow, and unable to open certain things such as terminal, no error message, just nothing opening up.

    Any idea what this could be due to? Or where I can find the logs?

  21. @Neko,

    Do not have really in idea on this possible issue. We would need to re-install Linux Mint in our test lab and see if we are experiencing some issues.
    Log files can be fount in

    ~/.xsession-errors
    /var/logs/xrdp*

    Thank you for notifying us with these errors. We will try to integrate them in our future post and improve content of the blog

    Hope this help
    Till next time
    See ya

  22. Thanks!
    Great Tutorial, but… i have mint 18.1 and i tried this part 2 tutorial, but i have same error that in part 1 without tightvns server… i installed tightvncserver from repos, but still not work…

  23. @Massimo,

    Tigervnc we know that there is some issues with the latest version of Ubuntu..was not aware of the same issues with Linux Mint…
    Are you using the xorgxrdp component when performing the remote connection ? If not, can you try… if yes, can you check your logs
    ~/.xsession and /var/log/xrdp.log /var/log/xrdp-session.log to get more info on what could be the problem

    Update : We have just tried the script and it works for us….in the xrdp login box, choose Xorg option…

    Till next time
    See ya

  24. I am having problems getting this to work. The script appeared to run OK, but when I try and connect using MS Remote Desktop, I get “Connection Refused”.

    Where should I start looking to see what is wrong ?

    Thanks
    Ian

  25. @Ian,

    Check the xrdp logs fies first to see what’s could be blocking the connection. (check /var/logs/Xrdp* and ~/.xsession-errors
    We are not Linux Mint users but you could have a look when time permit…

    Till next time
    See ya

  26. @Griffon,

    I would not find any /var/logs folder and there was no Xrdp* under /var/log.

    ~.xsession-errors looked like this:

    ian@ian-mint-machine ~ $ more .xsession-errors

    ** (cinnamon-session:2509): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-print-notifications:2644): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-a11y-settings:2643): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-mouse:2645): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-color:2641): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-clipboard:2649): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-a11y-keyboard:2661): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-xrandr:2664): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-screensaver-proxy:2669): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-automount:2671): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-wacom:2670): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-keyboard:2663): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-power:2687): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-housekeeping:2678): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-orientation:2688): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused

    ** (csd-background:2689): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-69WodZGsKf: Connection refused
    Activating service name=’org.a11y.atspi.Registry’
    Successfully activated service ‘org.a11y.atspi.Registry’
    [cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found
    cinnamon-session[2509]: WARNING: t+1,58334s: Child process 2710 was already dead.
    [cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found

    (csd-color:2641): color-plugin-WARNING **: failed to get edid: unable to get EDID for output

    (csd-color:2641): color-plugin-WARNING **: unable to get EDID for xrandr-Virtual1: unable to get EDID for output
    Cinnamon warning: Software rendering detected: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits)
    Cjs-Message: JS LOG: About to start Cinnamon
    Cjs-Message: JS LOG: ACTIVATING SOFTWARE RENDERING
    ** Message: nemo-desktop: session is cinnamon, establishing proxy
    St-Message: cogl npot texture sizes SUPPORTED
    Cjs-Message: JS LOG: Cinnamon started at Thu Dec 28 2017 19:33:24 GMT+0100 (CET)
    Cjs-Message: JS LOG: network applet: Cannot find connection for active (or connection cannot be read)

    (cinnamon:2819): St-WARNING **: Ignoring length property that isn’t a number at line 1526, col 13
    openGL version 3.3 detected (GL3 Cogl Driver)
    MetaSyncRing disabled: couldn’t find required GL extensions, or the minimum safe openGL version was not met
    Cinnamon warning: Log level 16: STACK_OP_ADD: window 0x4800001 already in stack
    Cinnamon warning: Log level 16: STACK_OP_ADD: window 0x4800001 already in stack
    Cjs-Message: JS LOG: Invalid network device type, is 14
    Cjs-Message: JS LOG: network applet: Found connection for active
    mintUpdate: no process found

  27. @Ian,

    sorry there was a typo in my previous comment => check logs at this location /var/log/xrdp*

    Ok, we have performed a test on linux Mint and custom xrdp script installation and we have it working…
    The post you are using is obsolete as newer version of xrdp (custom installation) are not relying anymore on vnc server components… So, we will provide you the steps needed here and will see if this can become a future post or i Linux Mint would become a supported OS version for our famous install-xrdp.sh script….

    Please try this…

    # Install git and download xrdp and xorgxrdp source binaries
    sudo apt-get -y install git
    git clone https://github.com/neutrinolabs/xrdp.git
    git clone https://github.com/neutrinolabs/xorgxrdp.git

    # install pre-reqs
    sudo apt-get -y install libx11-dev libxfixes-dev libssl-dev libpam0g-dev libtool libjpeg-dev flex bison gettext autoconf libxml-parser-perl libfuse-dev xsltproc libxrandr-dev python-libxml2 nasm xserver-xorg-dev fuse pkg-config automake

    #compile xrdp files first
    cd ~/Downloads/xrdp
    sudo ./bootstrap
    sudo ./configure –enable-fuse –enable-jpeg
    sudo make
    sudo make install

    #compile xorgxrdp
    cd ~/Downloads/xorgxrdp
    sudo ./bootstrap
    sudo ./configure
    sudo make
    sudo make install

    #start the service
    sudo systemctl daemon-reload
    sudo systemctl enable xrdp.service
    sudo systemctl enable xrdp-sesman.service
    sudo systemctl start xrdp

    Give it a try and see if this works for you… note that the .xsession file should not contain any info about the desktop you will be using

    Hope this help
    till next time
    See ya

  28. Hi Griffon.

    Thanks for all the help. Very much appreciated.

    I got it working, but had a few problems with the new instructions. Here is what I had to do just for your information:

    When I ran
    cd ~/Downloads/xrdp
    sudo ./bootstrap

    I got the message:

    /usr/bin/autoconf
    /usr/bin/automake
    error, install libtool

    I tried to fix this apparent lack of libtool issue by doing the following:

    sudo apt-get install libtool
    sudo apt-get install build-essential

    But nothing helped. Same problem. So I looked at the bootstrap script and just ran the command at the end:

    autoreconf -fvi

    This appeared to work.

    The next problem was when I tried to do the same for xorgxrdp:

    cd ~/Downloads/xorgxrdp
    -bash: cd: /home/ian/Downloads/xorgxrdp: No such file or directory

    In this case, I just used ~/xorgxrdp instead. This seamed to work, although I am not sure if there are any side effects.

    After this all the rest of the script worked.
    However when I try and login to the machine from a Mac using MS Remote Desktop, I get the following error:

    “login failed for display 0”

    If I just click OK here, I get to the xrdp “Just connecting” screen. If I fill in my credentials here and click OK, then it connects no problem.

    When logged into a remote session I got a wrong keyboard layout, but after changing this is preferences. It worked and was correct over sessions.

    On the plus side:
    A Remote Desktop session to Mint from my Mac via MS Remote Desktop recognises both my Mac screens, and I get a Mint desktop on each screen. Nice.
    Another plus is that scrolling with a magic mouse from a mac works on Mint, whereas on Gnome is just scrolls silly fast when with the smallest of touches of the mouse, which is very hard to work with.

    On the Downside, I get the “no graphics card” detected popup each time I login, and in general it seems slower than the Gnome desktop. But maybe that is just my impression.

    Thanks for the help.
    /Ian

  29. Hi Griffon,

    Thanks for your great scripts you post here! It makes installing XRDP a lot easier.

    Though it stil does not work properly. I used your script for several Linux Mint installations (18.1, 18.2 and 18.3 based on Mate). In first everything looks fine and you can make the connection. But when you connect with about 20 people at the same time there are some issues. When one person’s session hangs everyone else has to log out so the service can be killed and restarted. I’ve tried serveral settings in de ./configure when building but nothing helpes. Even a daily reboot can’t keep it stable enough so people can work. It looks like the session is not closed propperly and when it doesn’t it also affects new people who want to login because sesman is hanging. Are there some specific settings for Linux Mint 18.3 mate i can set?

    Thanks

    Michel Huiting

  30. @Michel Huiting

    Sorry for the delay in my answer Michel.. apparenlty your message was marked as spam…..
    have you tried to execute the following command

    ps -ef h | grep Xvnc | grep `problematic_user_name` | tr -s ” ” | cut -d ” ” -f2 | xargs kill -9

    This should kill the session of the problematic user and you can test if he can reconnect….using this command, you should be able to kill specific session and there should be no need to restart everything
    Never tested but we assume that should be working
    Give it a try and provide feedback

    Till next time
    See ya

Leave a Reply