Comments (3)
Thanks for feeding back @qbqaf - that's great information.
from xrdp.
I don't use Docker, but I think this is likely to be down to a bunch of stuff missing from the PAM stack in the Docker image. GNOME needs a lot of stuff starting in the PAM session, including the systemd --user
daemon.
I'd recommend trying to get the normal user working first with ssh. When you can log in with ssh and systemctl --user status
gives you a sane response you should have enough in place to start GNOME and xrdp.
from xrdp.
FROM ubuntu:24.04
RUN apt update && apt upgrade -y
RUN apt install -y software-properties-common
RUN apt install -y curl git fuse openssh-server nano
RUN apt install -y net-tools
RUN apt install -y neovim
RUN apt install -y unzip build-essential
RUN apt install -y ripgrep
RUN apt install -y xclip
ENV DEBIAN_FRONTEND=noninteractive \
DISPLAY=:0.0
# Install GUI
RUN apt upgrade -y
RUN apt install -y ubuntu-gnome-desktop
# Install dotnet
RUN apt update
RUN apt install -y dotnet-sdk-8.0
RUN dotnet tool install --global csharp-ls
# Configure SSH
RUN mkdir /var/run/sshd
RUN echo 'root:123' | chpasswd && passwd -d root
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
# Copy font from /FiraMono
RUN mkdir /usr/share/fonts/opentype/FiraMono -p
COPY /FiraMono/*.otf /usr/share/fonts/opentype/FiraMono/
# Install kickstart
COPY kickstart.nvim/ /home/user/.config/nvim/
# Edit .bashrc to display contents of startup.sh
RUN echo "export EDITOR=/usr/bin/nvim" >> /home/user/.bashrc
COPY startup.sh /home/user/startup.sh
RUN echo "sh /home/user/startup.sh" >> /home/user/.bashrc
# Install kickstart.nvim.override
RUN nvim --headless . +PlugInstall +qall
COPY kickstart.nvim.override/ /home/user/.config/nvim/
RUN nvim --headless . +PlugInstall +qall
# Install VNC deps
RUN apt install -y \
supervisor
ENV USER=user
# Create .Xauthority file
RUN touch /home/user/.Xauthority
# Setup supervisor
RUN mkdir -p /etc/supervisor/conf.d
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Theming (Breeze as default)
RUN apt install -y gnome-themes-extra
RUN gsettings set org.gnome.desktop.interface gtk-theme Adwaita
RUN gsettings set org.gnome.desktop.wm.preferences theme Adwaita
# Install firefox and get rid of snapd
RUN add-apt-repository -y ppa:mozillateam/ppa && \
apt-get -y update && \
apt-get -y upgrade && \
apt-get -y purge snapd ;\
apt-get -y install firefox-esr && \
apt-get clean
RUN \
apt-get install -y \
xrdp check tigervnc-standalone-server xorgxrdp libpam0g-dev && \
apt-get autoremove -y && \
systemctl enable xrdp.service
# Install the workaround for:
# - https://github.com/neutrinolabs/xrdp/issues/1684
# - GNOME Keyring asks for password at login.
RUN cd /tmp && \
wget 'https://github.com/matt335672/pam_close_systemd_system_dbus/archive/f8e6a9ac7bdbae7a78f09845da4e634b26082a73.zip' && \
unzip f8e6a9ac7bdbae7a78f09845da4e634b26082a73.zip && \
cd /tmp/pam_close_systemd_system_dbus-f8e6a9ac7bdbae7a78f09845da4e634b26082a73 && \
make install && \
rm -fr /tmp/pam_close_systemd_system_dbus-f8e6a9ac7bdbae7a78f09845da4e634b26082a73
RUN useradd -m user
RUN usermod -a -G xrdp user
RUN usermod -a -G root user
RUN adduser xrdp ssl-cert
RUN chmod 777 /etc/xrdp/key.pem
RUN chown :xrdp /etc/xrdp/key.pem
RUN chmod 777 /etc/xrdp/cert.pem
RUN sed -i 's/port=3389/port=tcp:\/\/:3389/g' /etc/xrdp/xrdp.ini
RUN apt install -y dbus-x11
# Expose SSH and RDP ports
EXPOSE 22 3389
RUN echo 'user:useruser' | chpasswd
COPY ./build/ubuntu-run.sh /usr/bin/
RUN mv /usr/bin/ubuntu-run.sh /usr/bin/run.sh
RUN chmod +x /usr/bin/run.sh
# Start systemd
RUN systemctl enable ssh
RUN systemctl enable xrdp.service
RUN systemctl enable supervisor
ENTRYPOINT ["/lib/systemd/systemd"]
This is my final dockerfile that ended up working. Using systemd
as the entrypoint and just relying on the services to work did the trick ;)
from xrdp.
Related Issues (20)
- File transfer from Windows encountered: "Error when getting information for file '/test.txt' " HOT 8
- Specific filenames cause File transfer / drive redirection error HOT 19
- Build failed with rfxencode_dwt_shift_rem_sse2.c:41:26: error: '__m128i_u' undeclared HOT 3
- Session Allocation Policy 'I' not working (client IP address is always NULL) HOT 3
- SSL: error:14094123:SSL routines:ssl3_read_bytes:application data after close notify HOT 5
- xrdp green screen after RDP login HOT 8
- Support OpenH264 HOT 1
- Blank dark screen after update to 0.10 HOT 23
- KDE Display Issue on Arch Linux HOT 7
- Release tarball contains wrong sesman.ini and xrdp.ini instead of sesman.ini.in and xrdp.ini.in HOT 1
- waitforx issue HOT 2
- X server could not be started HOT 2
- UBUNTU VM - Could not open connection to the host, on port 3389: Connect failed HOT 3
- xrdp not working on Ubuntu 22.04 LTS HOT 1
- A blue screen with remote access from Win10 HOT 9
- Scaling does not apply with xrdp on Debian 8 using high DPI Surface Pro machine HOT 22
- Works with PI 4 and 5, but not with PI 3b+ HOT 6
- Glamor gpu HOT 8
- make distcheck fails on Github runner ubuntu-24.04 with clang compiler
- Authentication error has occurred. The function requested is not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrdp.