This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# | |
# ubuntu-install-xrdp.sh | |
# Tested in Ubuntu 20.04: Bidirectional clipboard does work. | |
# | |
# One line installer (change ubuntu by the username that you want to remotely login): | |
# curl -L https://gist.github.com/nestoru/fee24a59804d60ccba1a/raw | sudo bash -s ubuntu | |
# | |
START=$(date +%s) | |
if ! [ $(id -u) = 0 ]; then | |
echo "I will work only under root!" | |
exit 1 | |
fi | |
USAGE="Usage: `basename $0` <user>" | |
if [ $# -ne "1" ] | |
then | |
echo $USAGE | |
exit 1 | |
fi | |
user=$1 | |
if [ "$user" == "root" ]; then | |
user_home=/root | |
else | |
user_home=/home/$user | |
fi | |
apt-get update -y | |
apt-get install -y ubuntu-desktop | |
apt-get install -y xrdp | |
adduser xrdp ssl-cert | |
systemctl restart xrdp | |
echo Run the below commands if RDP is still not running to find out the cause: | |
echo " sudo systemctl status xrdp" | |
echo " tail -100 /var/log/xrdp-sesman.log" | |
END=$(date +%s) | |
DIFF=$(( $END - $START )) | |
echo "Finished in $DIFF seconds" |
Update 20161201: In 16.04 Clipboard is not longer working.
Update 20150731: Clipboard works great in Ubuntu 14.04 LTS, however Unity is not supported.
Original post for historical reasons: RDP has been for ages a great protocol giving Windows the big advantage on the Virtual Desktop Infrastructure (VDI) competition. The FreeRDP GitHub project is changing that little by little especially thanks to XRDP. Here is a POB Recipe to install XRDP. For the latest version of the script please pull the recipe from github pob-recipes project.
#!/bin/bash -e # common/ubuntu/xrdp-reinstall.sh apt-get -q -y remove xrdp apt-get -q -y update apt-get -q -y clean apt-get -q -y purge xrdp apt-get -q -y install xrdpAfter you have done so the Ubuntu Desktop will then be available via RDP so you can use any RDC to connect to it on default port 8309. You must login with an existing linux user so make sure the user you are trying to connect with is in /etc/passwd
I have found a very good performance after setting the desktop background to a simple color. Also restarting the desktop is recommended to make sure after a fresh reboot RDP will be available.
You can configure the port and a lot of other settings from ini files in /etc/xrdp/
No comments:
Post a Comment