GithubHelp home page GithubHelp logo

sharunkumar / ubuntu-xrdp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielguerra69/ubuntu-xrdp

0.0 0.0 0.0 602 KB

Docker fully implemented Multi User xrdp with xorgxrdp and pulseaudio on Ubuntu 22.04. Forked from danielguerra69/ubuntu-xrdp

License: MIT License

Shell 53.07% Dockerfile 46.93%

ubuntu-xrdp's Introduction

Ubuntu 20.04/18.04/16.04 Multi User Remote Desktop Server

Fully implemented Multi User xrdp with xorgxrdp and pulseaudio on Ubuntu 20.04/18.04 Copy/Paste and sound is working. Users can re-login in the same session. Xfce4, Firefox are pre installed.

Tags

danielguerra/ubuntu-xrdp:18.04 or latest danielguerra/ubuntu-xrdp:20.04

Usage

Start the rdp server (WARNING: use the --shm-size 1g or firefox/chrome will crash)

docker run -d --name uxrdp --hostname terminalserver --shm-size 1g -p 3389:3389 -p 2222:22 danielguerra/ubuntu-xrdp:20.04

*note if you already use a rdp server on 3389 change -p :3389 -p 2222:22 is for ssh access ( ssh -p 2222 ubuntu@ )

Connect with your remote desktop client to the docker server. Use the Xorg session (leave as it is), user and pass.

Creation of users

To automate the creation of users, supply a file users.list in the /etc directory of the container. The format is as follows:

id username password-hash list-of-supplemental-groups

The provided users.list file will create a sample user with sudo rights

Username: ubuntu Password: ubuntu

To generate the password hash use the following line

openssl passwd -1 'newpassword'

Run the xrdp container with your file

docker run -d -v $PWD/users.list:/etc/users.list

You can change your password in the rdp session in a terminal

passwd

Add new users

No configuration is needed for new users just do

docker exec -ti uxrdp adduser mynewuser

After this the new user can login

Add new services

To make sure all processes are working supervisor is installed. The location for services to start is /etc/supervisor/conf.d

Example: Add mysql as a service

apt-get -yy install mysql-server
echo "[program:mysqld] \
command= /usr/sbin/mysqld \
user=mysql \
autorestart=true \
priority=100" > /etc/supervisor/conf.d/mysql.conf
supervisorctl update

Volumes

This image uses two volumes:

  1. /etc/ssh/ holds the sshd host keys and config
  2. /home/ holds the ubuntu/ default user home directory

When bind-mounting /home/, make sure it contains a folder ubuntu/ with proper permission, otherwise no login will be possible.

mkdir -p ubuntu
chown 999:999 ubuntu

Installing additional packages during build

The Dockerfile has support for the build argument ADDITIONAL_PACKAGES to install additional packages during build. Either pass it with --build-arg during docker build or add it as args in your docker-compose.override.yml and run docker-compose build.

To run with docker-compose

git clone https://github.com/danielguerra69/ubuntu-xrdp.git
cd ubuntu-xrdp/
vi docker-compose.override.yml # if you want to override any default value
docker-compose up -d

ubuntu-xrdp's People

Contributors

comio avatar danielguerra69 avatar fbartels avatar sbaumgartner75 avatar sharunkumar avatar toastie89 avatar

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.