I want to run the Ubuntu SDK (Qt Creator variant) from a Docker image. It's working very nice, except when I try to use the emulator or a real phone/device. This requires to install a new Kit (armhf, i386) which fails with the following error inside a Run Click window.
Error getting authority: Error initializing authority: Could not connect: No such file or directory
---Click exited with errors, please check the output---
When I try to create a new Kit from a native Ubuntu, this action asks me to insert the sudo-password. This does not happen with the Docker image (I tried to install gksu
because of that, the docker user does not need a sudo-password though).
What is the problem here?
Here is the Dockerfile I created:
FROM ubuntu:15.04
MAINTAINER Name <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "deb http://mirror.skylink-datacenter.de/ubuntu/ vivid main restricted universe multiverse " > /etc/apt/sources.list && \
echo "deb-src http://mirror.skylink-datacenter.de/ubuntu/ vivid main restricted universe multiverse " >> /etc/apt/sources.list && \
echo "deb http://mirror.skylink-datacenter.de/ubuntu/ vivid-security main restricted universe multiverse " >> /etc/apt/sources.list && \
echo "deb http://mirror.skylink-datacenter.de/ubuntu/ vivid-updates main restricted universe multiverse " >> /etc/apt/sources.list && \
echo "deb-src http://mirror.skylink-datacenter.de/ubuntu/ vivid-security main restricted universe multiverse " >> /etc/apt/sources.list && \
echo "deb-src http://mirror.skylink-datacenter.de/ubuntu/ vivid-updates main restricted universe multiverse " >> /etc/apt/sources.list
RUN dpkg --add-architecture i386
RUN apt-get update && \
apt-get update && \
apt-get install -qqy software-properties-common && \
add-apt-repository ppa:ubuntu-sdk-team/ppa && \
add-apt-repository ppa:saiarcot895/myppa
RUN apt-get update && apt-get install -y apt-fast
RUN apt-get update && apt-fast -y install \
bash-completion \
vim \
dialog \
gksu \
build-essential \
ubuntu-device-flash \
phablet-tools \
usbutils \
ubuntu-sdk \
ubuntu-emulator \
x11-apps \
cmake
RUN export uid=1000 gid=1000 && \
mkdir -p /home/dev && \
echo "dev:x:${uid}:${gid}:dev,,,:/home/dev:/bin/bash" >> /etc/passwd && \
echo "dev:x:${uid}:" >> /etc/group && \
echo "dev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/dev && \
chmod 0440 /etc/sudoers.d/dev && \
chown ${uid}:${gid} -R /home/dev
USER dev
ENV HOME /home/dev
ENV DISPLAY :0
CMD ubuntu-sdk
The container is started with
XS=/tmp/.X11-unix && \
XA=/tmp/.docker.xauth && \
U=/dev/bus/usb && xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XA nmerge - && \
docker run --privileged -ti --rm -v $XS:$XS -v $XA:$XA -v $U:$U \
-v /home/dev/workspace/ubuntu-sdk:/home/dev -e XAUTHORITY=$XA dev/ubuntu-sdk:15.04
Native SDK pstree
and lsof
when the GUI requests the user password:
ubuntu-sdk,4267
├─pkexec,4480 env CLICK_NO_LOCAL_MIRROR=1 /usr/share/qtcreator/ubuntu/scripts/click_create_target armhf ubuntu-sdk-15.04 vivid click
│ └─{gdbus},4481
├─{QProcessManager},4280
├─{QQmlThread},4292
├─{QQmlThread},4310
├─{QQmlThread},4317
├─{QQuickPixmapRea},4293
├─{QQuickPixmapRea},4316
├─{QQuickXmlQueryE},4318
├─{QThread},4289
├─{QXcbEventReader},4268
├─{Qt HTTP thread},4302
├─{Qt HTTP thread},4304
├─{Qt HTTP thread},4306
├─{Qt HTTP thread},4308
├─{Qt HTTP thread},4319
├─{Qt HTTP thread},4340
├─{Qt HTTP thread},4345
├─{Qt bearer threa},4291
├─{gdbus},4269
├─{gmain},4271
├─{ubuntu-sdk},4274
├─{ubuntu-sdk},4275
├─{ubuntu-sdk},4276
├─{ubuntu-sdk},4277
├─{ubuntu-sdk},4290
├─{ubuntu-sdk},4298
├─{ubuntu-sdk},4299
├─{ubuntu-sdk},4300
└─{ubuntu-sdk},4301
$ sudo lsof -p 4480
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pkexec 4480 root cwd DIR 253,1 4096 1584843 /home/dev
pkexec 4480 root rtd DIR 253,1 4096 2 /
pkexec 4480 root txt REG 253,1 23304 396702 /usr/bin/pkexec
pkexec 4480 root mem REG 253,1 51736 267146 /lib/x86_64-linux-gnu/libnss_files-2.21.so
pkexec 4480 root mem REG 253,1 47616 267156 /lib/x86_64-linux-gnu/libnss_nis-2.21.so
pkexec 4480 root mem REG 253,1 97224 267140 /lib/x86_64-linux-gnu/libnsl-2.21.so
pkexec 4480 root mem REG 253,1 35688 267142 /lib/x86_64-linux-gnu/libnss_compat-2.21.so
pkexec 4480 root mem REG 253,1 72232 267095 /lib/x86_64-linux-gnu/libgpg-error.so.0.13.0
pkexec 4480 root mem REG 253,1 924096 267091 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.2
pkexec 4480 root mem REG 253,1 137400 267116 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
pkexec 4480 root mem REG 253,1 31680 267201 /lib/x86_64-linux-gnu/librt-2.21.so
pkexec 4480 root mem REG 253,1 105328 267199 /lib/x86_64-linux-gnu/libresolv-2.21.so
pkexec 4480 root mem REG 253,1 138400 267203 /lib/x86_64-linux-gnu/libselinux.so.1
pkexec 4480 root mem REG 253,1 108920 267234 /lib/x86_64-linux-gnu/libz.so.1.2.8
pkexec 4480 root mem REG 253,1 14624 532751 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.4400.0
pkexec 4480 root mem REG 253,1 158072 267213 /lib/x86_64-linux-gnu/libsystemd.so.0.6.0
pkexec 4480 root mem REG 253,1 1566696 532737 /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4400.0
pkexec 4480 root mem REG 253,1 444344 267176 /lib/x86_64-linux-gnu/libpcre.so.3.13.1
pkexec 4480 root mem REG 253,1 31016 532634 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
pkexec 4480 root mem REG 253,1 14592 267077 /lib/x86_64-linux-gnu/libdl-2.21.so
pkexec 4480 root mem REG 253,1 109032 267050 /lib/x86_64-linux-gnu/libaudit.so.1.0.0
pkexec 4480 root mem REG 253,1 1869392 267060 /lib/x86_64-linux-gnu/libc-2.21.so
pkexec 4480 root mem REG 253,1 142080 267193 /lib/x86_64-linux-gnu/libpthread-2.21.so
pkexec 4480 root mem REG 253,1 44280 533148 /usr/lib/x86_64-linux-gnu/libpolkit-agent-1.so.0.0.0
pkexec 4480 root mem REG 253,1 109928 533152 /usr/lib/x86_64-linux-gnu/libpolkit-gobject-1.so.0.0.0
pkexec 4480 root mem REG 253,1 1107040 267093 /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.0
pkexec 4480 root mem REG 253,1 334968 532765 /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.0
pkexec 4480 root mem REG 253,1 64048 267163 /lib/x86_64-linux-gnu/libpam.so.0.83.1
pkexec 4480 root mem REG 253,1 154376 267032 /lib/x86_64-linux-gnu/ld-2.21.so
pkexec 4480 root 0r FIFO 0,9 0t0 183116 pipe
pkexec 4480 root 1w FIFO 0,9 0t0 183117 pipe
pkexec 4480 root 2w FIFO 0,9 0t0 183118 pipe
pkexec 4480 root 3u 0000 0,10 0 7679 anon_inode
pkexec 4480 root 4u unix 0xffff880035e15500 0t0 184485 socket
pkexec 4480 root 5u 0000 0,10 0 7679 anon_inode
pkexec 4480 root 6u 0000 0,10 0 7679 anon_inode
Native SDK pstree
and lsof
of the Click Run:
$ pstree -p -l -a -h 4267
ubuntu-sdk,4267
├─click_create_ta,4480 /usr/share/qtcreator/ubuntu/scripts/click_create_target armhf ubuntu-sdk-15.04 vivid click
│ └─click,4630 /usr/bin/click chroot -a armhf -f ubuntu-sdk-15.04 -n click create
│ └─debootstrap,4640 /usr/sbin/debootstrap --arch amd64 --variant=buildd --components=main,restricted,universe,multiverse vivid /var/lib/schroot/chroots/click-ubuntu-sdk-15.04-armhf http://archive.ubuntu.com/ubuntu
│ └─wget,4838 -q -O /var/lib/schroot/chroots/click-ubuntu-sdk-15.04-armhf/var/lib/apt/lists/partial/debootstrap.invalid_dists_vivid_universe_binary-amd64_Packages.bz2 http://archive.ubuntu.com/ubuntu/dists/vivid/universe/binary-amd64/Packages.bz2
├─{QProcessManager},4280
├─{QQmlThread},4292
├─{QQmlThread},4310
├─{QQmlThread},4317
├─{QQuickPixmapRea},4293
├─{QQuickPixmapRea},4316
├─{QQuickXmlQueryE},4318
├─{QThread},4289
├─{QXcbEventReader},4268
├─{Qt HTTP thread},4302
├─{Qt HTTP thread},4304
├─{Qt HTTP thread},4306
├─{Qt HTTP thread},4308
├─{Qt HTTP thread},4319
├─{Qt HTTP thread},4340
├─{Qt HTTP thread},4345
├─{Qt bearer threa},4291
├─{gdbus},4269
├─{gmain},4271
├─{ubuntu-sdk},4274
├─{ubuntu-sdk},4275
├─{ubuntu-sdk},4276
├─{ubuntu-sdk},4277
├─{ubuntu-sdk},4290
├─{ubuntu-sdk},4298
├─{ubuntu-sdk},4299
├─{ubuntu-sdk},4300
└─{ubuntu-sdk},4301
$ sudo lsof -p 4480
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
click_cre 4480 root cwd DIR 253,1 4096 1441794 /root
click_cre 4480 root rtd DIR 253,1 4096 2 /
click_cre 4480 root txt REG 253,1 1029720 917511 /bin/bash
click_cre 4480 root mem REG 253,1 8720576 530587 /usr/lib/locale/locale-archive
click_cre 4480 root mem REG 253,1 1869392 267060 /lib/x86_64-linux-gnu/libc-2.21.so
click_cre 4480 root mem REG 253,1 14592 267077 /lib/x86_64-linux-gnu/libdl-2.21.so
click_cre 4480 root mem REG 253,1 167128 267217 /lib/x86_64-linux-gnu/libtinfo.so.5.9
click_cre 4480 root mem REG 253,1 154376 267032 /lib/x86_64-linux-gnu/ld-2.21.so
click_cre 4480 root mem REG 253,1 26258 788593 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
click_cre 4480 root 0r FIFO 0,9 0t0 183116 pipe
click_cre 4480 root 1w FIFO 0,9 0t0 183117 pipe
click_cre 4480 root 2w FIFO 0,9 0t0 183118 pipe
click_cre 4480 root 255r REG 253,1 1381 1322872 /usr/share/qtcreator/ubuntu/scripts/click_create_target