Code Monkey home page Code Monkey logo

docker-ubuntu-xrdp-mate-custom's Introduction

Use https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom/issues to send feedback, issues, comments and general chat.

Quick Start

Run the following to get started.

echo "user:pass:N" > CREATEUSERS.TXT
docker run --name RattyDAVE20.04 \
           --privileged=true \
           -p 3389:3389 \
           -e TZ="Europe/London" \
           -v ${PWD}/CREATEUSERS.TXT:/root/createusers.txt \
           -dit --restart unless-stopped \
           rattydave/docker-ubuntu-xrdp-mate-custom

Then on a windows machine type

mstsc

Then put in the IP address of the docker host.

Login using the username user and the password pass

A virtual desktop docker container with persistant user information.

This image is automatically rebuilt when updates are realeased for Ubuntu.

Ubuntu 20.04 with XRDP and MATE. (latest)

Contents:

  • Ubuntu 20.04
  • Mate Desktop (ubuntu repo)
  • XRDP (built from source)
  • XRPDXORG (built from source)
  • tightvncserver (ubuntu repo)
  • Epiphany web browser (ubuntu repo)
  • Custom xrdp.ini script
  • Default UK Keyboard layout (Can be changed)
  • Default UK Timezone (Can be changed)
  • You are now able to set the time zone with the TZ variable
  • Ability to run a script on container startup. This is useful for installing packages that are needed.
  • Local Drive mapping (require elevated rights with this parameter --privileged=true)
  • Clipboard Sharing (require elevated rights with this parameter --privileged=true)
docker run --name RattyDAVE20.04 \
           --privileged=true \
           -p 3389:3389 \
           -e TZ="Europe/London" \
           -v %LOCAL_PATH_TO_CREATEUSERS.TXT_FILE%:/root/createusers.txt \
           -v %LOCAL_PATH_TO_STARTUP.SH_FILE%:/root/startup.sh \
           -v %LOCAL_PATH_TO_HOME_DIRECTORY%:/home \
           -dit --restart unless-stopped \
           rattydave/docker-ubuntu-xrdp-mate-custom:20.04
  • Replace %LOCAL_PATH_TO_CREATEUSERS.TXT_FILE% with the local filename of the createusers file.
  • Replace %LOCAL_PATH_TO_STARTUP.SH_FILE% with the local filename of the startup.sh script. This is run after the user creation and before the service start.
  • Replace %LOCAL_PATH_TO_HOME_DIRECTORY% with the local directory of the /home directorys.

This file contains 3 fields (username:password:is_sudo). Where username is the login id. Password is the password. is_sudo does the user have sudo access(only Y is recognised). It also needs a "newline" at the end of the line.

Example of a CREATEUSERS.TXT file

mickey:mouse:N
daisy:duke:Y
dog:flash:n
morty:rick:wubba

In this example 4 users will be created and only daisy will have sudo rights. At every reboot it will check this file and ADD any new users.

Example of a STARTUP.SH file to change locale.

apt-get update
apt-get -y install language-pack-de language-pack-gnome-de
locale-gen de_DE.UTF-8
update-locale LANG=de_DE.UTF-8

To Connect

Please note some clients need an extra parameter set glyph-cache. xfreerdp, remmina and others need this set.

Linux example of how to connect:

xfreerdp /size:1920x1140 /kbd:0x00000809 /v:%IP_ADDRESS% /gdi:hw /drive:home,$HOME +clipboard /sound:sys:alsa +glyph-cache

Windows example:

Open a command prompt and type

mstsc

Then put in the ip address of the docker host.

Auto Update

To automatically update I recomend using watchtower.

docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower

rattydave/docker-ubuntu-xrdp-mate-custom:20.04-tools

I doubt most people would want this version but I have made available. This release contains development tools.

  • x3270
  • filezilla
  • netbeans
  • dia
  • geany
  • putty
  • mysql-workbench
  • remmina
  • openjdk-11-jre
  • libreoffice
  • pasmo
  • BlueJ
  • Rocket2014 (A RC2014 Z80 emulator - https://github.com/trcwm/rocket2014 - ROMs located in /opt/rocket2014/examples)

Screen sharing: On the master user connect using the Xvnc option and login as normal. On the desktop there is a file called session_info.txt this will contain the display number and password.

       On the other clients connect using the Reconnect option.
       Using the information in the session_info file:
            PORT = 5900 + display number. (So if display is 11 then the port would be 5911)
            USERNAME = Username of the master account.
            PASSWORD = the password in the Session_info.txt file. (e.g. 1a2b3c4d)

Example of a working command line.

docker run --name RattyDAVE20.04-tools \
           --privileged=true \
           -p 3389:3389 \
           -e TZ="Europe/London" \
           -v %LOCAL_PATH_TO_CREATEUSERS.TXT_FILE%:/root/createusers.txt \
           -v %LOCAL_PATH_TO_STARTUP.SH_FILE%:/root/startup.sh \
           -v %LOCAL_PATH_TO_HOME_DIRECTORY%:/home \
           -dit --restart unless-stopped \
           rattydave/docker-ubuntu-xrdp-mate-custom:20.04-tools

Please note some clients need an extra parameter set glyph-cache. xfreerdp, remmina and others need this set.

Linux example of how to connect xfreerdp /v:xxx.xxx.xxx.xxx /drive:home,/home/xxxx +clipboard +glyph-cache

docker-ubuntu-xrdp-mate-custom's People

Contributors

rattydave avatar recklessop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-ubuntu-xrdp-mate-custom's Issues

Support for KDE instead of Mate

Is it possible to change the desktop from Mate to KDE?

I tried by myself by replacing mate packages with kubuntu-desktop in Dockerfile, but when trying to connect via rdp it seems to not starting the KDE Plasma desktop.

I didn’t figure out what’s the problem.

How to remote from Windows 10 using remote desktop

Hi, I have followed your instructions from ubuntu 19.04. I have build the image and running the container. However, I am not able to connect to the container using remote desktop. I am using the adress 0.0.0.0 to connect but the server cannot be found. Do I have to use a different ip adress, and how to find that adress?

The run command I used:

docker run -it --name xrdp-ubuntu-1904 --privileged=true -p 3389:3389 -v /createusers.txt:/root/createusers.txt -v /home:/home -dit --restart unless-stopped xrdp-ubuntu-1904:19.04

Docker ps

CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS              PORTS                    NAMES
05ed3697d89e        xrdp-ubuntu-1904:19.04   "/bin/bash"         23 minutes ago      Up 23 minutes       0.0.0.0:3389->3389/tcp   xrdp-ubuntu-1904

Cannot login if createusers.txt is one line only.

Hello,

Thanks for your container!
I had problems logging in and found that it was due to the fact that my createusers.txt file had one line only and did not have any "newline" at the end.
Adding a newline fixed this.

Greetings,
Hendrik

No root access for the user

echo "test:test:N" > CREATEUSERS.TXT
docker run --name RattyDAVE20.04 \
           --privileged=true \
           -p 3389:3389 \
           -e TZ="Europe/London" \
           -v ${PWD}/CREATEUSERS.TXT:/root/createusers.txt \
           -dit --restart unless-stopped \
           rattydave/docker-ubuntu-xrdp-mate-custom:20.04

I ran this.

But after login in to rdp,I don't have sudo access.getting the below error,kindly give me an urgent work around @RattyDAVE

getting "test not is not in the sudoers file. This incident will be reported"

Clipboard File Transfer Only One Direction

The clipboard only seems to be working one way when it comes to files. Text can be copy and pasted from both directions (client to server and server to client) without any issues. Files can be copy/pasted from the server (linux container) to the client (Windows 8/10 in my case), but not from the client to the server. I have compiled xrdp from source on a full VM and still seem to encounter the same behavior. Is there a configuration inside of the docker container that may be changed or is this a limitation of xrdp in general?

login failed

Hi i can't connect to session. I don't understand what's happening.
Thank you for your help !

docker creation:
image

docker log:
image

session error:
image

docker log:
image

just a question

may a question if you would provide the info how you achieved the dynamic screen resolution change without logging on/off (default behavior).

sample, vm here, xrdp session, i need to log off/on when changing client to get proper resolution change, when using your docker its perfectly working without leaving the session.

for an tipp thanks ahead and sorry to open a issue

timezone and locale support

as suggestion, timezone and locale support

locale can be adjusted by generating locale (de_DE....) and then is partly working

timezone ... no chance here, even setting date manually, after a restart we back to UK TZ ;)

xrdp vaapi support

may another question, actually no idea if thats even possible, using vaapi for hw acceleration to render xrdp sessions ?

what is working, using gstreamer to get video support in vlc as sample with vaapi, but i couldnt really find anything about hw acceleration in xrdp ...

Automatically start a graphical application

Hi!
First, thanks for this very useful container.

Here is my problem: I would like to use this virtual desktop to give access from outside using application such as Teamviewer or Anydesk. So these applications need to be started right after the startup of this container.
I've tried to add this command in my startup.sh:
DISPLAY=:10.0 su - myuser -c "Anydesk&"
It fails, because this is a graphical application, and so need to be runned while a xrdp session is on, which is not the case on the startup.
What would be the solution? Is there anyway to autmatically start a RDP session?

Thanks.

sound support

hi, just wanted to ask if its possible to add sound support to the docker,
i have added a usb sound card and added it to devices, but looks like the kernel driver is not included.

and thanks alot for this nice docker

Chat and notes for 20.04 beta version.

20.04 is the new long term release to replace 18.04. This will released in April 2020.

There is an alpha ubuntu build and I have rebased the 18.04 to 20.04 and added the startup scrip script from later versions.
Note: packages are prebuilt using the ubuntu repo not from source.

So we should have the start of a really good version!

Dumb Question

Does the server need a gpu to render the desktop?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.