3

I want to try to run GNOME Desktop using Wayland on Docker.
How to do it?

There are some errors I have tried it with following Docker file.

How do I run GNOME DESKTOP on Docker?

Environments:

Host OS - Arch Linux with Wayland Container - Ubuntu 20.10

Error:

dbus[8]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/tmp" is owned by uid 0, not our uid 1000

** (process:6): WARNING **: 14:32:13.386: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused
libEGL warning: wayland-egl: could not open /dev/dri/card0 (No such file or directory)
gnome-session-binary[6]: WARNING: Could not make bus activated clients aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
gnome-session-binary[6]: WARNING: Could not make bus activated clients aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
gnome-session-binary[6]: WARNING: Could not make bus activated clients aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
gnome-session-binary[6]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
gnome-session-binary[6]: ERROR: Failed to connect to system bus: Could not connect: No such file or directory
aborting...
Trace/breakpoint trap (core dumped)

Dockerfile:

from ubuntu:rolling

env DEBIAN_FRONTEND noninteractive


run dpkg --add-architecture i386
run apt-get update -y && apt-get install -y apt-utils && \ 
    apt-get upgrade -y && \ 
    apt-get install -y gnome-session && \
    apt-get install -y xorg && \ # install xorg but it does not use
    apt-get install -y net-tools wget && \
    apt-get install -y sudo && \
    apt-get update -y && \ 
    apt-get install -y wine64 && \ 
    apt-get install -y wine32 && \
    apt-get install -y cabextract
run useradd -s /bin/bash -m kiyugad && gpasswd -a kiyugad sudo

run wget https://desktop.line-scdn.net/win/new/LineInst.exe
run wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \ 
    mv winetricks /usr/local/bin/winetricks && \ 
    cd /usr/local/bin && \
    chmod +x winetricks
run winetricks corefonts fakejapanese_ipamona fakejapanese_vlgothic
cmd gnome-session

Docker run command:

docker run -e XDG_RUNTIME_DIR=/tmp \
           -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
           -e QT_QPA_PLATFORM=wayland \
           -e GDK_BACKEND=wayland \
           -e CLUTTER_BACKEND=wayland \
           -e DISPLAY=:0 \
           --net=host \
           -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY  \
           --user=$(id -u):$(id -g) \
           imagename
KiYugadgeter
  • 3,796
  • 7
  • 34
  • 74
  • As a general rule, you wouldn't. A Docker container doesn't have its own display hardware, and full desktop environments like GNOME run multiple processes. A virtual machine (with a full desktop OS and simulated display hardware) would be a much better match for this; you could use a tool like Packer to automate creating a VM image with a known set of installed software. – David Maze Nov 28 '20 at 15:21
  • 1
    This which I want to do would be able to do if do it on X with xserver-xephyr. Is there any way to do wayland something like with xserver-xephyr? – KiYugadgeter Nov 28 '20 at 16:41

0 Answers0