Closed hongyi-zhao closed 3 years ago
--desktop
or specify a command to execute after the image name.--xephyr
instead of --nxagent
to run the deepin desktop.Still failed, see following:
werner@X10DAi:~$ x11docker --sudouser --desktop --xephyr --clipboard x11docker-deepin-wechat
x11docker WARNING: User werner is member of group docker.
That allows unprivileged processes on host to gain root privileges.
x11docker note: Sharing picture clips with option --clipboard
is only possible with options --xpra, --xpra-xwayland and --hostdisplay.
x11docker note: Xephyr is a quite stable nested X server.
Less stable, but resizeable is nxagent with option --nxagent.
x11docker note: Option --clipboard: Need either xclip or xsel
for clipboard sharing with X server --xephyr.
Fallback: Disabling option --clipboard.
x11docker WARNING: Option --sudouser severly reduces container security.
Container gains additional capabilities to allow sudo and su.
If an application breaks out of container, it can harm your system
in many ways without you noticing. Password: x11docker
x11docker note: Option --sudouser: Enabling option --newprivileges=yes.
You can avoid this with --newprivileges=no
x11docker WARNING: Option --newprivileges=yes: x11docker does not set
docker run option --security-opt=no-new-privileges.
That degrades container security.
However, this is still within a default docker setup.
backend_syslog.go:45: <info> syslog is not available: Unix syslog delivery error
backend_syslog.go:45: <info> syslog is not available: Unix syslog delivery error
backend_syslog.go:45: <info> syslog is not available: Unix syslog delivery error
backend_syslog.go:45: <info> syslog is not available: Unix syslog delivery error
backend_syslog.go:45: <info> syslog is not available: Unix syslog delivery error
<warning> sound_effect.go:58: open /etc/lightdm/lightdm.conf: no such file or directory
<warning> brightness.go:154: failed to set brightness to 1 for default: The output(916) has invalid gamma size
<warning> manager.go:619: The output(916) has invalid gamma size
<info> manager.go:630: [updateMonitors] add monitor: default 0 0 1824 984
<warning> config_version.go:47: Failed to delete config: remove /home/werner/.config/deepin/startdde/display.json: no such file or directory
<warning> brightness.go:154: failed to set brightness to 1 for default: The output(916) has invalid gamma size
<warning> brightness.go:138: The output(916) has invalid gamma size
<error> xsettings.go:243: Start xsettings failed: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory
-> main.go:98
-> proc.go:198
-> asm_amd64.s:2361
<warning> main.go:101: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory
<warning> session.go:293: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory
<warning> session.go:509: exec gnome-keyring-daemon err: fork/exec /usr/bin/gnome-keyring-daemon: operation not permitted
<info> session_process.go:104: kwin_no_scale [] startup duration: 330.553783ms
<warning> startmanager.go:92: open /usr/lib/UIAppSched.hooks/launched: no such file or directory
<warning> startmanager.go:148: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory
<warning> session_process.go:91: Wait command /usr/lib/deepin-daemon/dde-session-daemon [] failed: exit status 1
<info> session_process.go:104: /usr/lib/deepin-daemon/dde-session-daemon [] startup duration: 209.26412ms
<info> session_process.go:104: /usr/bin/dde-dock [] startup duration: 70.257995ms
<info> session_process.go:104: /usr/bin/dde-desktop [] startup duration: 635.904719ms
<info> session_process.go:59: start dde-session-daemon part2 cost: 597.41µs
<warning> session_process.go:63: org.freedesktop.DBus.Error.NameHasNoOwner:Name "com.deepin.daemon.Daemon" does not exist
<info> main.go:125: iowait disabled
Gkr-Message: secret service operation failed: Failed to execute program org.freedesktop.secrets: Operation not permitted
** (process:128): WARNING **: Failed to get default keyring: 6
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x613a32]
goroutine 166 [running]:
pkg.deepin.io/lib/dbus1.(*Conn).getSerial(0x0, 0xc42014af60)
/usr/share/gocode/src/pkg.deepin.io/lib/dbus1/conn.go:273 +0x22
pkg.deepin.io/lib/dbus1.(*Object).createCall(0xc4201de5d0, 0x7f7a74114020, 0xc4200160a0, 0xc4201e6080, 0x34, 0x0, 0xc42057e1e0, 0xc420011640, 0x1, 0x1, ...)
/usr/share/gocode/src/pkg.deepin.io/lib/dbus1/object.go:135 +0xf6
pkg.deepin.io/lib/dbus1.(*Object).Go(0xc4201de5d0, 0xc4201e6080, 0x34, 0x0, 0xc42057e1e0, 0xc420011640, 0x1, 0x1, 0x34)
/usr/share/gocode/src/pkg.deepin.io/lib/dbus1/object.go:115 +0xbf
pkg.deepin.io/lib/dbusutil/proxy.(*Object).Go_(0xc4201de5a0, 0xc4201e6080, 0x34, 0x86e100, 0xc42057e1e0, 0xc420011640, 0x1, 0x1, 0xc42014e301)
/usr/share/gocode/src/pkg.deepin.io/lib/dbusutil/proxy/object.go:57 +0x85
github.com/linuxdeepin/go-dbus-factory/com%2edeepin%2edaemon%2eapps.(*launchedRecorder).GoMarkLaunched(0xc4201de5a0, 0x0, 0xc42057e1e0, 0xc42024e980, 0x39, 0x0)
/usr/share/gocode/src/github.com/linuxdeepin/go-dbus-factory/com.deepin.daemon.apps/auto.go:102 +0x122
github.com/linuxdeepin/go-dbus-factory/com%2edeepin%2edaemon%2eapps.(*launchedRecorder).MarkLaunched(0xc4201de5a0, 0xc42024e900, 0xc42024e980, 0x39, 0x0, 0x0)
/usr/share/gocode/src/github.com/linuxdeepin/go-dbus-factory/com.deepin.daemon.apps/auto.go:106 +0x65
main.(*StartManager).launchAppWithOptions(0xc4201dc270, 0xc42024e980, 0x39, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/build/startdde-3.14.7/startmanager.go:238 +0x2df
main.startAutostartProgram.func1(0xc42024e980, 0x39)
/build/startdde-3.14.7/startmanager.go:912 +0xf9
created by main.startAutostartProgram
/build/startdde-3.14.7/startmanager.go:903 +0x77
werner@X10DAi:~$
OTOH, even I can start the deepin-terminal with the following command:
$ x11docker --sudouser --clipboard x11docker-deepin-wechat deepin-terminal
But when I try to install package(s) in the opened dockerized terminal, I meet the error as shown below:
werner@bcd5b388f5b1:~$ sudo apt-get install easyconnect
Reading package lists... Done
Building dependency tree
Reading state information... Done
easyconnect is already the newest version (7.6.3.0.86415).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
werner@bcd5b388f5b1:~$ sudo apt-get install --reinstall easyconnect
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/59.1 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 128239 files and directories currently installed.)
Preparing to unpack .../easyconnect_7.6.3.0.86415_amd64.deb ...
Unknown operation staop.
Removed /etc/systemd/system/multi-user.target.wants/EasyMonitor.service.
rm pkg before...
preinst
Linux bcd5b388f5b1 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 GNU/Linux
Unpacking easyconnect (7.6.3.0.86415) over (7.6.3.0.86415) ...
upgrade...
after rm pkt ...
Processing triggers for lastore-daemon (0.14.6-1+comsta) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for bamfdaemon (0.5.3-2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Setting up easyconnect (7.6.3.0.86415) ...
Created symlink /etc/systemd/system/multi-user.target.wants/EasyMonitor.service → /lib/systemd/system/EasyMonitor.service.
Failed to connect to bus: No such file or directory
after install pkg ...
N.B. At this moment, I've revised the Dockerfile into the following and re-created the image:
FROM x11docker/deepin
RUN echo "deb http://packages.deepin.com/deepin/ lion main non-free contrib" > /etc/apt/sources.list
RUN env DEBIAN_FRONTEND=noninteractive dpkg --add-architecture i386 && apt-get update
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y \
lsb-release apt-utils deepin-wine deepin-wine32 deepin-wine32-preloader deepin-wine-helper deepin-wine-uninstaller
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y deepin.com.wechat
Start the deepin desktop with needed options as described in README.md.
But when I try to install package(s) in the opened dockerized terminal, I meet the error as shown below:
Which error?
Start the deepin desktop with needed options as described in README.md.
Tried with the following:
$ x11docker --desktop --init=systemd -- --cap-add=IPC_LOCK --security-opt seccomp=unconfined -- x11docker-deepin-wechat
But only get a near whole white login UI without QR code as shown below.
But when I try to install package(s) in the opened dockerized terminal, I meet the error as shown below:
Which error?
werner@bcd5b388f5b1:~$ sudo apt-get install --reinstall easyconnect
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/59.1 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 128239 files and directories currently installed.)
Preparing to unpack .../easyconnect_7.6.3.0.86415_amd64.deb ...
Unknown operation staop.
Removed /etc/systemd/system/multi-user.target.wants/EasyMonitor.service.
rm pkg before...
preinst
Linux bcd5b388f5b1 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 GNU/Linux
Unpacking easyconnect (7.6.3.0.86415) over (7.6.3.0.86415) ...
upgrade...
after rm pkt ...
Processing triggers for lastore-daemon (0.14.6-1+comsta) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for bamfdaemon (0.5.3-2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Setting up easyconnect (7.6.3.0.86415) ...
Created symlink /etc/systemd/system/multi-user.target.wants/EasyMonitor.service → /lib/systemd/system/EasyMonitor.service.
Failed to connect to bus: No such file or directory
[...]
I mean this one.
Failed to connect to bus: No such file or directory
The installer failed to connect to dbus. It is normal case that no dbus daemon runs during installation. That is harmless.
But only get a near whole white login UI without QR code as shown below.
Here it takes a long time until window and QR code appear. Maybe you have just to wait. Also check if you have a working internet connection in the container.
Here it takes a long time until window and QR code appear. Maybe you have just to wait. Also check if you have a working internet connection in the container.
Got it. The following command will flush the IP address on docker0 interface as we have discussed before:
$ x11docker --desktop --init=systemd -- --cap-add=IPC_LOCK --security-opt seccomp=unconfined -- x11docker-deepin-wechat
And the following command will do the trick:
$ x11docker --desktop --init=systemd --hostnet -- --cap-add=IPC_LOCK --security-opt seccomp=unconfined -- x11docker-deepin-wechat
See the following screenshot for the result I've achieved till now:
Thank you very much again for your warm help and detailed explanations.
Another question: Why you use two '--'s in the above command like that?
Regards, HY
Compare the syntax explained in x11docker --help
:
Usage:
To run a Docker container on a new X server:
x11docker IMAGE
x11docker [OPTIONS] IMAGE [COMMAND]
x11docker [OPTIONS] -- IMAGE [COMMAND [ARG1 ARG2 ...]]
x11docker [OPTIONS] -- DOCKER_RUN_OPTIONS -- IMAGE [COMMAND [ARG1 ARG2 ...]]
Custom docker run
options are encapsulated in two --
.
Wonderful. Anyway, docker/x11docker are complicated and powerful tools. Thanks again for your hard work and contributions to open source community again.
HY
Hi,
I Use the following Dockerfile to create the docker image named as x11docker-deepin-wechat:
The command used to create the image in the directory where the Dockerfile resides:
$ docker build -t x11docker-deepin-wechat .
I noticed some warnings/abnormal info as below:
Any hints for eliminating/fixing them?
OTOH, even I've created the image successfully, I still can't run it with any of the following commands:
How to solve these problems?
Regards, HY