Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General discussion, feedback, questions #7

Closed
mviereck opened this issue Mar 5, 2017 · 23 comments
Closed

General discussion, feedback, questions #7

mviereck opened this issue Mar 5, 2017 · 23 comments

Comments

@mviereck
Copy link
Owner

mviereck commented Mar 5, 2017

Here is a place where you can leave any feedback or ask questions if you fear to open our own issue.
As I spend a lot of time with x11docker development, I'm happy to see and read more than some download statistics ...
Feel free to comment. :)

Edit: This thread is very long already. Please just open a new issue, I am pleased of every feedback!

@euri10
Copy link

euri10 commented Mar 6, 2017

greetings,

I ended up on you project page and while I haven't tested it yet, it certainly helps a lot in the global comprehension, seems like you're solving a lot of issues I had trying to accomplish that little thing of me.

My endeavour started with the following: my son's computer, built from leftover parts over the years, sucks at running Minecraft, which he likes to play a lot, maybe too much, but hey he can learn python so I won't complain.

My main desktop is more beefy, so I wondered if that would be possible to run it remotely in an unprivileged container.

Being on Debian stretch, LXD isn't available, I haven't tried docker yet, maybe I should, so I decided to try it with LXC.

So far I can't accomplish what I want, I can run Minecraft in an unprivileged container, using lxc-attach -n u1 --clear-env -- sudo -u ubuntu -i env DISPLAY=$DISPLAY PULSE_SERVER=/home/ubuntu/.pulse_socket java -jar /home/ubuntu/Minecraft.jar, the challenging part in this was in fact to install the very same nvidia drivers than on my host.

The thing also is that it's not fully unprivileged in the sense that, if I got it correctly, from https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/
those entries in my container:

lxc.id_map = u 0 100000 1000
lxc.id_map = g 0 100000 1000
lxc.id_map = u 1000 1000 1
lxc.id_map = g 1000 1000 1
lxc.id_map = u 1001 101001 64535
lxc.id_map = g 1001 101001 64535

So those mappings basically mean that your container has 65536 uids and gids mapped to it, starting at 0 up to 65535 in the container. Those are mapped to host ids 100000 to 165535 with one exception, uid and gid 1000 isn’t translated. That trick is needed so that your user in the container can access the X socket, pulseaudio socket and DRI/snd devices just as your own user can (this saves us a whole lot of configuration on the host).

this part

this saves us a whole lot of configuration on the host

is what led me to your project, I told myself let's run a second X server and attach the container to it, if it's designed to be only used for that very purpose should be safer, not sure about that part though,

Well, as you explain very well in the Readme, the /etc/X11/Xwrapper.config thing was my main issue and I couldn't find why...,

on that topic I read that, I hope it's relevant:

https://wiki.archlinux.org/index.php/Systemd/User#Xorg_and_systemd is interesting, seems like it could solve the issue of having to go to a tty to launch the 2nd X server

and maybe here http://forum.kodi.tv/showthread.php?tid=231955 the part where he symlink the kodi.service to the display-manager.service, kodi.service being the launch of a wm session (openbox in that case) with xinit to a given display:
'ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/openbox-session -- :0 -nolisten tcp vt7'
maybe that could be changed to 'ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session WMSESSION -- :2ND_DISPLAY -nolisten tcp vt8'

Great, now while looking at the remote part of the goal, I started to install x2goserver on the container, and while I could connect from the host to the container it seemed that all GLX applications failed to launch because on purpose x2go uses an old implementation of X server,

So after a while I read about virtualGL which associated with turboVNC should do exactly what I want.

Question now, what brings docker to the table that LXC/LXD don't have for that very purpose ?

In any case thanks for all this, this looks promising, I'm gonna try a little more on the lxc side of things but will definitely try your solution that seems definitely a more hands on approach

@mviereck
Copy link
Owner Author

mviereck commented Mar 6, 2017

Hello!

Question now, what brings docker to the table that LXC/LXD don't have for that very purpose ?

The best point for docker is that it is easy to set up :). As i started x11docker two years ago I had a look at LXC and got knurls in my head as I tried to understand it. A drawback of docker, it seems that the developers does not work as hard on security fixes as they should (afaik from what i hear). On the other hand, docker claims to catch more cases to isolate from host than LXC. (I admit, I did not research a lot on this, I just used docker and it works ...). A similar interesting project is runc.

Well, as you explain very well in the Readme, the /etc/X11/Xwrapper.config thing was my main issue and I couldn't find why...,
on that topic I read that, I hope it's relevant:
https://wiki.archlinux.org/index.php/Systemd/User#Xorg_and_systemd is interesting, seems like it could solve the issue of having to go to a tty to launch the 2nd X server

If you set up Xwrapper.config, you don't need to switch to another tty. Setup of systemd in arch wiki and in kodi forum unfortunately depends on this, too, and don't provide a solution only based on systemd.

So after a while I read about virtualGL which associated with turboVNC should do exactly what I want.

VirtualGL is great, but not for isolation, as it needs access to display :0. (There may be an exception: VirtualGL/virtualgl#10)

In an early stage of x11docker I had x11vnc included as X server option, but I dismissed it due to a chewy display.
Right now I'm working on an X server option "Xdummy" with invisible display for custom setups of VNC, xpra and/or network access. Maybe this is of interest for you to run minecraft invisible on your system while your son gets access to it over LAN. (But hardware acceleration would need --virtualgl).

As you need hardware acceleration, I don't know if x11docker fits your needs. I did not test it with Nvidia cards nor with closed source drivers. There is a project nvidia-docker, but I did not check it out as it sees to be to complex to be easily included.
You could just give it a try, at first with an image containing the open source driver, then with closed source drivers, along with option --gpu.
I'm interested to hear how x11docker works with nvidia cards and open or closed source drivers!

@euri10
Copy link

euri10 commented Mar 7, 2017

on the topic of your question:

How can I setup systemd to allow unprivileged users to start a second X server from within an already running X?

I managed to do it that way, if this seems ok I'll answer that on your stackexchange to make points :)

➜  ~ aptitude show xserver-xorg-legacy
Package: xserver-xorg-legacy
Version: 2:1.19.1-4
New: yes
State: not installed

you gave me an idea with the dummy X, so here's it's xorg conf, honestly I don't know if it's correct :)

➜  ~ cat /etc/X11/xorg.conf.d/mydummy.conf
Section "Device"
    Identifier  "Dummy"
    Driver      "dummy"
    VideoRam    256000
    Option      "IgnoreEDID"    "true"
    Option      "NoDDC" "true"
EndSection

Section "Monitor"
    Identifier  "Monitor"
    HorizSync   15.0-100.0
    VertRefresh 15.0-200.0
EndSection

Section "Screen"
    Identifier  "Screen"
    Monitor     "Monitor"
    Device      "Dummy"
    DefaultDepth    24
    SubSection  "Display"
        Depth   24
        Modes   "1920x1080" "1280x1024"
    EndSubSection
EndSection

I then used 2 systemd services, maybe that would make more sense them to be user services, I didn't tested if that makes a difference.
Edit: on the topic on using user service instead of system one, that would require at least to change the socker service to create alll the dirs / files in /run/user/1000 instead of /run, so for instance:
ExecStartPre=-/bin/mkdir -p -m 711 /run/xorg-server would become
ExecStartPre=-/bin/mkdir -p -m 711 /run/user/%i/xorg-server

➜  ~ cat /etc/systemd/system/xorg@.socket
[Unit]
Description=Xorg Socket for User UID %i

[Socket]
ExecStartPre=-/bin/mkdir -p -m 711 /run/xorg-server
ExecStartPre=-/bin/mkdir -p -m 750 /run/xorg-server/auth-%i
ExecStartPre=/bin/touch /run/xorg-server/auth-%i/database
ExecStartPre=/bin/bash -c "xauth -f /run/xorg-server/auth-%i/database add :%i . `mcookie`"
ExecStartPre=/bin/chown -R %i /run/xorg-server/auth-%i
ExecStopPost=-/bin/rm -rf /run/xorg-server/auth-%i
ExecStopPost=-/bin/rm /tmp/.X11-unix/X%i
UMask=0027

ListenStream=/tmp/.X11-unix/X%i
SocketMode=0777
DirectoryMode=1777

[Install]
WantedBy=sockets.target
➜  ~ cat /etc/systemd/system/xorg@.service
[Unit]
Description=Xorg server for UID %I.
Requires=xorg@%i.socket
After=systemd-user-sessions.service
After=rc-local.service

# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0

[Service]
Type=idle
User=%i
ExecStart=/usr/bin/X :%i -nolisten tcp -seat seat0 -auth /run/xorg-server/auth-%i/database vt10 -keeptty -config /etc/X11/xorg.conf.d/mydummy.conf

PAMName=systemd-xsession

StandardInput=tty
StandardOutput=tty
StandardError=syslog
TTYPath=/dev/tty10

Sockets=xorg@%i.socket

Slice=user-%i.slice

then start it with sudo systemctl start xorg@1000.service (1000 is the uid of the user I'm currently logged in a X session)

➜  ~ ps aux | grep Xorg
root      6337  1.2  0.7 339548 119468 tty7    Ssl+ Mar06  12:05 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
myuser    11623  0.0  0.2 489676 32792 tty10    Ssl+ 09:59   0:00 /usr/lib/xorg/Xorg :1000 -nolisten tcp -seat seat0 -auth /run/xorg-server/auth-1000/database vt10 -keeptty -config /etc/X11/xorg.conf.d/mydummy.conf

@mviereck
Copy link
Owner Author

mviereck commented Mar 7, 2017

That looks quite interesting, this evening I will dive deeper into it!
One catch at first: Xdummy already does not need a setup of Xwrapper.conf or root privileges. Every user can run it, therefore it was developed.
The great victory is if you manage to run a full working X using your monitor, keyboard and mouse. Your setup needs a test without -config /etc/X11/xorg.conf.d/mydummy.conf.

@euri10
Copy link

euri10 commented Mar 7, 2017

I made some stupid mistakes.
I edited -config /etc/X11/xorg.conf.d/mydummy.conf to be -config /home/myuser/mydummy.conf as it would be taken by my display manager after a reboot, silly to put it in one of the folders X is looking at !

I also simplified the mydummy.conf to the bare minimum I think

➜  ~ cat /home/myuser/mydummy.conf
Section "Device"
    Identifier  "Dummy"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Monitor"
EndSection

Section "Screen"
    Identifier  "Screen"
    Monitor     "Monitor"
    Device      "Dummy"
EndSection

what do you mean by

Your setup needs a test without -config /etc/X11/xorg.conf.d/mydummy.conf

it seems to me that the X I just launch that way has monitor, keyboard and mouse, but I can be wrong, the log looks like it's the case.

➜  ~ sudo systemctl start xorg@1000.service
➜  ~ sudo systemctl status xorg@1000.service
● xorg@1000.service - Xorg server for UID 1000.
   Loaded: loaded (/etc/systemd/system/xorg@.service; static; vendor preset: enabled)
   Active: active (running) since Tue 2017-03-07 14:05:00 CET; 15s ago
 Main PID: 11051 (Xorg)
    Tasks: 0 (limit: 4915)
   CGroup: /user.slice/user-1000.slice/xorg@1000.service
           ‣ 11051 /usr/lib/xorg/Xorg :1000 -nolisten tcp -seat seat0 -auth /run/xorg-server/auth-1000/database vt10 -keeptty -config /h

Mar 07 14:05:00 bigbenn systemd[1]: Started Xorg server for UID 1000..
Mar 07 14:05:05 bigbenn systemd[11051]: pam_unix(systemd-xsession:session): session opened for user myuser by (uid=0)

this is the log created by X

➜  ~ cat /home/myuser/.local/share/xorg/Xorg.1000.log
[  7203.747]
X.Org X Server 1.19.1
Release Date: 2017-01-11
[  7203.747] X Protocol Version 11, Revision 0
[  7203.747] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
[  7203.747] Current Operating System: Linux bigbenn 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64
[  7203.747] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-1-amd64 root=UUID=eb1bf56f-7f1a-4397-b66b-7d5a5f07bd49 ro quiet
[  7203.747] Build Date: 20 January 2017  02:50:48AM
[  7203.747] xorg-server 2:1.19.1-4 (https://www.debian.org/support)
[  7203.747] Current version of pixman: 0.34.0
[  7203.747]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[  7203.747] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  7203.747] (==) Log file: "/home/myuser/.local/share/xorg/Xorg.1000.log", Time: Tue Mar  7 14:05:05 2017
[  7203.747] (++) Using config file: "/home/myuser/mydummy.conf"
[  7203.747] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  7203.748] (==) No Layout section.  Using the first Screen section.
[  7203.748] (**) |-->Screen "Screen" (0)
[  7203.748] (**) |   |-->Monitor "Monitor"
[  7203.748] (**) |   |-->Device "Dummy"
[  7203.748] (==) Automatically adding devices
[  7203.748] (==) Automatically enabling devices
[  7203.748] (==) Automatically adding GPU devices
[  7203.748] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  7203.748] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  7203.748]    Entry deleted from font path.
[  7203.748] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
[  7203.748] (==) ModulePath set to "/usr/lib/xorg/modules"
[  7203.748] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[  7203.748] (II) Loader magic: 0x563667586e00
[  7203.748] (II) Module ABI versions:
[  7203.748]    X.Org ANSI C Emulation: 0.4
[  7203.748]    X.Org Video Driver: 23.0
[  7203.748]    X.Org XInput driver : 24.1
[  7203.748]    X.Org Server Extension : 10.0
[  7203.748] (++) using VT number 10

[  7203.750] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c6
[  7203.750] (II) xfree86: Adding drm device (/dev/dri/card0)
[  7203.750] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 1
[  7203.750] (EE) Error systemd-logind returned paused fd for drm node
[  7203.750] (II) systemd-logind: releasing fd for 226:0
[  7203.858] (--) PCI:*(0:2:0:0) 10de:1b80:3842:6180 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O
@ 0x0000e000/128, BIOS @ 0x????????/131072
[  7203.858] (II) LoadModule: "glx"
[  7203.858] (II) Loading /usr/lib/xorg/modules/linux/libglx.so
[  7203.862] (II) Module glx: vendor="NVIDIA Corporation"
[  7203.862]    compiled for 4.0.2, module version = 1.0.0
[  7203.862]    Module class: X.Org Server Extension
[  7203.862] (II) NVIDIA GLX Module  375.39  Tue Jan 31 19:37:12 PST 2017
[  7203.862] (II) LoadModule: "dummy"
[  7203.862] (II) Loading /usr/lib/xorg/modules/drivers/dummy_drv.so
[  7203.862] (II) Module dummy: vendor="X.Org Foundation"
[  7203.862]    compiled for 1.19.0, module version = 0.3.8
[  7203.862]    Module class: X.Org Video Driver
[  7203.862]    ABI class: X.Org Video Driver, version 23.0
[  7203.862] (II) DUMMY: Driver for Dummy chipsets: dummy
[  7203.862] (WW) Falling back to old probe method for dummy
[  7203.862] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  7203.862] (II) DUMMY(0): Chipset is a DUMMY
[  7203.862] (II) DUMMY(0): Creating default Display subsection in Screen section
        "Screen" for depth/fbbpp 24/32
[  7203.862] (==) DUMMY(0): Depth 24, (--) framebuffer bpp 32
[  7203.862] (==) DUMMY(0): RGB weight 888
[  7203.862] (==) DUMMY(0): Default visual is TrueColor
[  7203.862] (==) DUMMY(0): Using gamma correction (1.0, 1.0, 1.0)
[  7203.862] (--) DUMMY(0): VideoRAM: 4096 kByte
[  7203.862] (--) DUMMY(0): Max Clock: 300000 kHz
[  7203.862] (II) DUMMY(0): Monitor: Using default hsync range of 31.50-48.00 kHz
[  7203.862] (II) DUMMY(0): Monitor: Using default vrefresh range of 50.00-70.00 Hz
[  7203.862] (II) DUMMY(0): Monitor: Using default maximum pixel clock of 65.00 MHz
[  7203.862] (WW) DUMMY(0): Unable to estimate virtual size
[  7203.862] (II) DUMMY(0): Clock range:  11.00 to 300.00 MHz
[  7203.862] (II) DUMMY(0): Not using default mode "640x350" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "320x175" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "640x400" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "320x200" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "720x400" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "360x200" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "640x480" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "320x240" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "640x480" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "320x240" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "640x480" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "320x240" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "400x300" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "400x300" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "400x300" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1024x768i" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "512x384i" (vrefresh out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "512x384" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "512x384" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "512x384" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1280x960" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "640x480" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1280x960" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "640x480" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1280x1024" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "640x512" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1280x1024" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "640x512" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1280x1024" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "640x512" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1792x1344" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "896x672" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1792x1344" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "896x672" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1856x1392" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "928x696" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1856x1392" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "928x696" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1920x1440" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "960x720" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1920x1440" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "960x720" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "832x624" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "416x312" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1360x768" (monitor doesn't support reduced blanking)
[  7203.862] (II) DUMMY(0): Not using default mode "1360x768" (mode clock too high)
[  7203.862] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1440x900" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "720x450" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1600x1024" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "800x512" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1920x1080" (insufficient memory for mode)
[  7203.862] (II) DUMMY(0): Not using default mode "960x540" (hsync out of range)
[  7203.862] (II) DUMMY(0): Not using default mode "1920x1200" (insufficient memory for mode)
[  7203.863] (II) DUMMY(0): Not using default mode "960x600" (hsync out of range)
[  7203.863] (II) DUMMY(0): Not using default mode "1920x1440" (insufficient memory for mode)
[  7203.863] (II) DUMMY(0): Not using default mode "960x720" (hsync out of range)
[  7203.863] (II) DUMMY(0): Not using default mode "2048x1536" (insufficient memory for mode)
[  7203.863] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[  7203.863] (II) DUMMY(0): Not using default mode "2048x1536" (insufficient memory for mode)
[  7203.863] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[  7203.863] (II) DUMMY(0): Not using default mode "2048x1536" (insufficient memory for mode)
[  7203.863] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[  7203.863] (--) DUMMY(0): Virtual size is 1024x768 (pitch 1024)
[  7203.863] (**) DUMMY(0): *Default mode "1024x768": 65.0 MHz, 48.4 kHz, 60.0 Hz
[  7203.863] (II) DUMMY(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "800x600": 40.0 MHz, 37.9 kHz, 60.3 Hz
[  7203.863] (II) DUMMY(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "800x600": 36.0 MHz, 35.2 kHz, 56.2 Hz
[  7203.863] (II) DUMMY(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "640x480": 25.2 MHz, 31.5 kHz, 59.9 Hz
[  7203.863] (II) DUMMY(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "680x384": 36.0 MHz, 47.4 kHz, 60.0 Hz (D)
[  7203.863] (II) DUMMY(0): Modeline "680x384"x60.0   36.00  680 704 720 760  384 385 390 395 doublescan +hsync -vsync (47.4 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "680x384": 42.4 MHz, 47.7 kHz, 59.8 Hz (D)
[  7203.863] (II) DUMMY(0): Modeline "680x384"x59.8   42.38  680 716 784 888  384 385 390 399 doublescan -hsync +vsync (47.7 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "512x384": 32.5 MHz, 48.4 kHz, 60.0 Hz (D)
[  7203.863] (II) DUMMY(0): Modeline "512x384"x60.0   32.50  512 524 592 672  384 385 388 403 doublescan -hsync -vsync (48.4 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "400x300": 20.0 MHz, 37.9 kHz, 60.3 Hz (D)
[  7203.863] (II) DUMMY(0): Modeline "400x300"x60.3   20.00  400 420 484 528  300 300 302 314 doublescan +hsync +vsync (37.9 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "400x300": 18.0 MHz, 35.2 kHz, 56.3 Hz (D)
[  7203.863] (II) DUMMY(0): Modeline "400x300"x56.3   18.00  400 412 448 512  300 300 301 312 doublescan +hsync +vsync (35.2 kHz zd)
[  7203.863] (**) DUMMY(0): *Default mode "320x240": 12.6 MHz, 31.5 kHz, 60.1 Hz (D)
[  7203.863] (II) DUMMY(0): Modeline "320x240"x60.1   12.59  320 328 376 400  240 245 246 262 doublescan -hsync -vsync (31.5 kHz zd)
[  7203.863] (==) DUMMY(0): DPI set to (96, 96)
[  7203.863] (II) Loading sub module "fb"
[  7203.863] (II) LoadModule: "fb"
[  7203.863] (II) Loading /usr/lib/xorg/modules/libfb.so
[  7203.863] (II) Module fb: vendor="X.Org Foundation"
[  7203.863]    compiled for 1.19.1, module version = 1.0.0
[  7203.863]    ABI class: X.Org ANSI C Emulation, version 0.4
[  7203.863] (II) Loading sub module "ramdac"
[  7203.863] (II) LoadModule: "ramdac"
[  7203.863] (II) Module "ramdac" already built-in
[  7203.863] (--) Depth 24 pixmap format is 32 bpp
[  7203.863] (II) DUMMY(0): Using 256 scanlines of offscreen memory
[  7203.863] (==) DUMMY(0): Backing store enabled
[  7203.863] (==) DUMMY(0): Silken mouse enabled
[  7203.863] (==) RandR enabled
[  7203.864] (II) SELinux: Disabled on system
[  7203.864] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
[  7203.882] (II) config/udev: Adding input device Power Button (/dev/input/event5)
[  7203.882] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[  7203.882] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[  7203.882] (II) LoadModule: "libinput"
[  7203.882] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[  7203.883] (II) Module libinput: vendor="X.Org Foundation"
[  7203.883]    compiled for 1.19.0, module version = 0.23.0
[  7203.883]    Module class: X.Org XInput Driver
[  7203.883]    ABI class: X.Org XInput driver, version 24.1
[  7203.883] (II) Using input driver 'libinput' for 'Power Button'
[  7203.883] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 17 paused 1
[  7203.883] (II) systemd-logind: releasing fd for 13:69
[  7203.900] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[  7203.900] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[  7203.900] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[  7203.900] (II) Using input driver 'libinput' for 'Power Button'
[  7203.900] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 17 paused 1
[  7203.900] (II) systemd-logind: releasing fd for 13:68
[  7203.920] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[  7203.920] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[  7203.920] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[  7203.920] (II) Using input driver 'libinput' for 'Sleep Button'
[  7203.920] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 17 paused 1
[  7203.920] (II) systemd-logind: releasing fd for 13:67
[  7203.936] (II) config/udev: Adding drm device (/dev/dri/card0)
[  7203.936] (II) xfree86: Adding drm device (/dev/dri/card0)
[  7203.936] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 17 paused 1
[  7203.936] (EE) Error systemd-logind returned paused fd for drm node
[  7203.936] (II) systemd-logind: releasing fd for 226:0
[  7203.937] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event17)
[  7203.937] (II) No input driver specified, ignoring this device.
[  7203.937] (II) This device may have been added with another device file.
[  7203.938] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event18)
[  7203.938] (II) No input driver specified, ignoring this device.
[  7203.938] (II) This device may have been added with another device file.
[  7203.938] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event19)
[  7203.938] (II) No input driver specified, ignoring this device.
[  7203.938] (II) This device may have been added with another device file.
[  7203.939] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event20)
[  7203.939] (II) No input driver specified, ignoring this device.
[  7203.939] (II) This device may have been added with another device file.
[  7203.939] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/event0)
[  7203.939] (**) A4Tech PS/2+USB Mouse: Applying InputClass "evdev pointer catchall"
[  7203.939] (**) A4Tech PS/2+USB Mouse: Applying InputClass "libinput pointer catchall"
[  7203.939] (II) Using input driver 'libinput' for 'A4Tech PS/2+USB Mouse'
[  7203.940] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 18 paused 1
[  7203.940] (II) systemd-logind: releasing fd for 13:64
[  7203.964] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/mouse0)
[  7203.965] (II) No input driver specified, ignoring this device.
[  7203.965] (II) This device may have been added with another device file.
[  7203.966] (II) config/udev: Adding input device Topre Corporation Realforce 105U (/dev/input/event2)
[  7203.966] (**) Topre Corporation Realforce 105U: Applying InputClass "evdev keyboard catchall"
[  7203.966] (**) Topre Corporation Realforce 105U: Applying InputClass "libinput keyboard catchall"
[  7203.966] (II) Using input driver 'libinput' for 'Topre Corporation Realforce 105U'
[  7203.966] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 18 paused 1
[  7203.967] (II) systemd-logind: releasing fd for 13:66
[  7203.988] (II) config/udev: Adding input device Burr-Brown from TI               USB Audio DAC    (/dev/input/event1)
[  7203.988] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "evdev keyboard catchall"
[  7203.988] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "libinput keyboard catchall"
[  7203.988] (II) Using input driver 'libinput' for 'Burr-Brown from TI               USB Audio DAC   '
[  7203.988] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 18 paused 1
[  7203.988] (II) systemd-logind: releasing fd for 13:65
[  7204.012] (II) config/udev: Adding input device HD Pro Webcam C920 (/dev/input/event7)
[  7204.012] (**) HD Pro Webcam C920: Applying InputClass "evdev keyboard catchall"
[  7204.012] (**) HD Pro Webcam C920: Applying InputClass "libinput keyboard catchall"
[  7204.012] (II) Using input driver 'libinput' for 'HD Pro Webcam C920'
[  7204.012] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 18 paused 1
[  7204.012] (II) systemd-logind: releasing fd for 13:71
[  7204.032] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event8)
[  7204.032] (II) No input driver specified, ignoring this device.
[  7204.032] (II) This device may have been added with another device file.
[  7204.032] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event9)
[  7204.032] (II) No input driver specified, ignoring this device.
[  7204.032] (II) This device may have been added with another device file.
[  7204.032] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event10)
[  7204.032] (II) No input driver specified, ignoring this device.
[  7204.032] (II) This device may have been added with another device file.
[  7204.032] (II) config/udev: Adding input device HDA Intel PCH Line (/dev/input/event11)
[  7204.032] (II) No input driver specified, ignoring this device.
[  7204.032] (II) This device may have been added with another device file.
[  7204.032] (II) config/udev: Adding input device HDA Intel PCH Line Out Front (/dev/input/event12)
[  7204.032] (II) No input driver specified, ignoring this device.
[  7204.032] (II) This device may have been added with another device file.
[  7204.032] (II) config/udev: Adding input device HDA Intel PCH Line Out Surround (/dev/input/event13)
[  7204.032] (II) No input driver specified, ignoring this device.
[  7204.032] (II) This device may have been added with another device file.
[  7204.033] (II) config/udev: Adding input device HDA Intel PCH Line Out CLFE (/dev/input/event14)
[  7204.033] (II) No input driver specified, ignoring this device.
[  7204.033] (II) This device may have been added with another device file.
[  7204.033] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event15)
[  7204.033] (II) No input driver specified, ignoring this device.
[  7204.033] (II) This device may have been added with another device file.
[  7204.033] (II) config/udev: Adding input device Eee PC WMI hotkeys (/dev/input/event16)
[  7204.033] (**) Eee PC WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[  7204.033] (**) Eee PC WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[  7204.033] (II) Using input driver 'libinput' for 'Eee PC WMI hotkeys'
[  7204.033] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 18 paused 1
[  7204.033] (II) systemd-logind: releasing fd for 13:80
[  7204.052] (II) config/udev: Adding input device PC Speaker (/dev/input/event6)
[  7204.052] (II) No input driver specified, ignoring this device.
[  7204.052] (II) This device may have been added with another device file.

Is there a way to "test" simply this 2nd X ?

the issue I currently have is that once I created that 2nd X server I cant access the tty1 to 6....My systemd settings are messing up somehow with getty.service.
edit: answering myself about the tty, commenting PAMName=systemd-xsession did the trick and is indeed cleaner, there's no interest in spawning a session for that job (see https://www.freedesktop.org/software/systemd/man/systemd.exec.html#PAMName=)
edit2: remvoving that means X cant get the /dev/input automatically now, the xorg.log has stuff like that now:
[ 8881.535] (EE) xf86OpenSerial: Cannot open device /dev/input/event4 Permission denied. [ 8881.535] (II) opening input device '/dev/input/event4' failed (Permission denied).

@mviereck
Copy link
Owner Author

mviereck commented Mar 7, 2017

Is there a way to "test" simply this 2nd X ?

As it is running on vt10, you can switch to it with CTRl+ALT+F10. As the video driver is a dummy, most probably you won't see anthing.
You can use xpra:

xpra start :1000 --use-display   # start xpra server 
xpra attach :1000                # attach client viewer
DISPLAY=:1000 xterm              # run application on display :1000, xpra should show it on :0

For testing purpuoses it is better to run second X without -auth option.

what do you mean by

Your setup needs a test without -config /etc/X11/xorg.conf.d/mydummy.conf

it seems to me that the X I just launch that way has monitor, keyboard and mouse, but I can be wrong, the log looks like it's the case.

It gets interesting as soon as you can switch between displays using CTRL+ALT+F(1...12) and having usable displays ;-). As I said, Xdummy on its own already works fine without additional setup of systemd or Xwrapper.conf, but it does not provide a visible display on its own as "real" X does.

Your log file indicates that X on :1000 indeed gets access to your input devices, that looks very promising!

@euri10
Copy link

euri10 commented Mar 7, 2017

For testing purpuoses it is better to run second X without -auth option.

I confirm I can't start xpra server if I got that -auth switch in the 2nd X server.
There might be a xpra way to use it I guess, but I couldn't find it.

In any case without the auth I can bring xterm on :0 after I start the server !

I also put the systemd service/socket in my ~/.config/systemd/user folder since I don't think there's a justification for them to be launched with sudo, but maybe it's important, see below (to run systemctl --user start xorg@1000.service instead of sudo systemctl start xorg@1000.service the TTYPath=/dev/tty10 needs to be commented)

As I mentioned above, the issue I'm facing now is the following:
If I use PAMName=systemd-xsession in the service, the X server finds automatically the inputs as you saw in the log above.
Should I remove that, I got [ 8881.535] (EE) xf86OpenSerial: Cannot open device /dev/input/event4 Permission denied. [ 8881.535] (II) opening input device '/dev/input/event4' failed (Permission denied).
Reading that, it seems normal:

Be aware that the systemd --user instance is a per-user process, and not per-session. The rationale is that most resources handled by user services, like sockets or state files will be per-user (live on the user's home dir) and not per session. This means that all user services run outside of a session. As a consequence, programs that need to be run inside a session will probably break in user services. The way systemd handles user sessions is pretty much in flux. See [1] and [2] for some hints on where things are going.

So probably if accessing those inputs is important then move the service to the /etc/systemd/system level. But in that case, the PAMName=systemd-xsession has that annoying consequence that tty1 to 6 are screwed by the new session and I couldn't find a way to avoid that.

@mviereck
Copy link
Owner Author

mviereck commented Mar 7, 2017

I confirm I can't start xpra server if I got that -auth switch in the 2nd X server. There might be a xpra way to use it I guess, but I couldn't find it.

There is no special xpra way, it's just easier to test a new X setup without authentication. x11docker uses cookies, and starting xpra with XAUTHORITY=mycookie xpra start ... allows xpra to access the new X server.

In any case without the auth I can bring xterm on :0 after I start the server !

Congratulation!

I see you have -seat seat0 and -keeptty in your X command. Why? Maybe they have to do with screwing up tty1...6, but that's only a blind guess.

My systemd settings are messing up somehow with getty.service.

Maybe tty8...tty12 need a getty call before running X on them? Also, you could try to use one of vt1...vt6 instead of vt10, maybe it will make a difference and avoid srewing up all tty's.

I assume an Xorg systemd service has to be on system level as X needs access to devices owned by root. Not sure if this can be configured in a way that an unprivileged user can run X afterwards.

systemd is still a mystery for me, I have to learn more about it. I don't know anything about systemd configuration and everything related to it. arch wiki seems to be a good introduction. Can you recommend some links to read about systemd?

@euri10
Copy link

euri10 commented Mar 9, 2017

-seat0 was useless, -keeptty is necessary to get logind take control of everything:
systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration

I think the below setup is working well, at least I didn't see any side effects so far, can switch tty, etc..
for systemd, which is still cryptic also for me :)

I liked https://www.digitalocean.com/community/tutorials/systemd-essentials-working-with-services-units-and-the-journal that gives you a good overview as a end user of the possible commands and describes well targets etc, appart from that honestly the man is perhaps the best source of info, but it's written like if you already knew everything so kind of difficult to understand for just-a-end-user-like-me !

➜  ~ cat /etc/systemd/system/xorg@.socket
[Unit]
Description=Xorg Socket for User UID %i

[Socket]
ExecStartPre=-/bin/mkdir -p -m 711 /run/xorg-server
ExecStartPre=-/bin/mkdir -p -m 750 /run/xorg-server/auth-%i
ExecStartPre=/bin/touch /run/xorg-server/auth-%i/database
ExecStartPre=/bin/bash -c "xauth -f /run/xorg-server/auth-%i/database add :%i . `mcookie`"
ExecStartPre=/bin/chown -R %i /run/xorg-server/auth-%i
ExecStopPost=-/bin/rm -rf /run/xorg-server/auth-%i
ExecStopPost=-/bin/rm /tmp/.X11-unix/X%i
UMask=0027

ListenStream=/tmp/.X11-unix/X%i
SocketMode=0777
DirectoryMode=1777

[Install]
WantedBy=sockets.target
➜  ~ cat /etc/systemd/system/xorg@.service
[Unit]
Description=Xorg server for UID %I.
Requires=xorg@%i.socket
After=systemd-user-sessions.service
After=rc-local.service

# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0

[Service]
Type=idle
User=%i
#ExecStart=/usr/bin/X :%i -nolisten tcp -seat seat0 -auth /run/xorg-server/auth-%i/database vt10 -keeptty -config /home/myuser/mydummy.conf
ExecStart=/usr/bin/X :%i -nolisten tcp -seat seat0 vt10 -keeptty -config /home/myuser/mydummy.conf

PAMName=systemd-xsession

StandardInput=tty
StandardOutput=tty
StandardError=syslog
TTYPath=/dev/tty10

Sockets=xorg@%i.socket

Slice=user-%i.slice
➜  ~ cat /home/myuser/mydummy.conf
Section "Device"
    Identifier  "Dummy"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Monitor"
EndSection

Section "Screen"
    Identifier  "Screen"
    Monitor     "Monitor"
    Device      "Dummy"
EndSection

as you can see logind took care of session / inputs:

➜  ~ loginctl session-status c28
c28 - myuser (1000)
           Since: Thu 2017-03-09 09:35:44 CET; 31min ago
          Leader: 17104 (Xorg)
            Seat: seat0; vc10
             TTY: /dev/tty10
         Service: systemd-xsession; type tty; class user
           State: online
            Unit: session-c28.scope
                  ├─17104 /usr/lib/xorg/Xorg :1000 -nolisten tcp -keeptty vt10 -config /home/myuser/mydummy.conf
                  └─17141 (sd

and the server has discovered everything by itself, kind of magic

➜  ~ cat .local/share/xorg/Xorg.1000.log
[163842.534]
X.Org X Server 1.19.1
Release Date: 2017-01-11
[163842.534] X Protocol Version 11, Revision 0
[163842.534] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
[163842.534] Current Operating System: Linux bigbenn 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64
[163842.534] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-1-amd64 root=UUID=eb1bf56f-7f1a-4397-b66b-7d5a5f07bd49 ro quiet
[163842.534] Build Date: 20 January 2017  02:50:48AM
[163842.534] xorg-server 2:1.19.1-4 (https://www.debian.org/support)
[163842.534] Current version of pixman: 0.34.0
[163842.534]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[163842.534] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[163842.535] (==) Log file: "/home/myuser/.local/share/xorg/Xorg.1000.log", Time: Thu Mar  9 09:35:44 2017
[163842.535] (++) Using config file: "/home/myuser/mydummy.conf"
[163842.535] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[163842.539] (==) No Layout section.  Using the first Screen section.
[163842.539] (**) |-->Screen "Screen" (0)
[163842.539] (**) |   |-->Monitor "Monitor"
[163842.539] (**) |   |-->Device "Dummy"
[163842.539] (==) Automatically adding devices
[163842.539] (==) Automatically enabling devices
[163842.539] (==) Automatically adding GPU devices
[163842.539] (==) Max clients allowed: 256, resource mask: 0x1fffff
[163842.539] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[163842.539]    Entry deleted from font path.
[163842.539] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
[163842.539] (==) ModulePath set to "/usr/lib/xorg/modules"
[163842.539] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[163842.539] (II) Loader magic: 0x55ed22a24e00
[163842.539] (II) Module ABI versions:
[163842.539]    X.Org ANSI C Emulation: 0.4
[163842.539]    X.Org Video Driver: 23.0
[163842.539]    X.Org XInput driver : 24.1
[163842.539]    X.Org Server Extension : 10.0
[163842.540] (++) using VT number 10

[163842.543] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c28
[163842.543] (II) xfree86: Adding drm device (/dev/dri/card0)
[163842.543] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 1
[163842.543] (EE) Error systemd-logind returned paused fd for drm node
[163842.543] (II) systemd-logind: releasing fd for 226:0
[163842.653] (--) PCI:*(0:2:0:0) 10de:1b80:3842:6180 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x???????
?/131072
[163842.653] (II) LoadModule: "glx"
[163842.654] (II) Loading /usr/lib/xorg/modules/linux/libglx.so
[163842.661] (II) Module glx: vendor="NVIDIA Corporation"
[163842.661]    compiled for 4.0.2, module version = 1.0.0
[163842.661]    Module class: X.Org Server Extension
[163842.661] (II) NVIDIA GLX Module  375.39  Tue Jan 31 19:37:12 PST 2017
[163842.661] (II) LoadModule: "dummy"
[163842.661] (II) Loading /usr/lib/xorg/modules/drivers/dummy_drv.so
[163842.662] (II) Module dummy: vendor="X.Org Foundation"
[163842.662]    compiled for 1.19.0, module version = 0.3.8
[163842.662]    Module class: X.Org Video Driver
[163842.662]    ABI class: X.Org Video Driver, version 23.0
[163842.662] (II) DUMMY: Driver for Dummy chipsets: dummy
[163842.662] (WW) Falling back to old probe method for dummy
[163842.662] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[163842.662] (II) DUMMY(0): Chipset is a DUMMY
[163842.662] (II) DUMMY(0): Creating default Display subsection in Screen section
        "Screen" for depth/fbbpp 24/32
[163842.662] (==) DUMMY(0): Depth 24, (--) framebuffer bpp 32
[163842.662] (==) DUMMY(0): RGB weight 888
[163842.662] (==) DUMMY(0): Default visual is TrueColor
[163842.662] (==) DUMMY(0): Using gamma correction (1.0, 1.0, 1.0)
[163842.662] (--) DUMMY(0): VideoRAM: 4096 kByte
[163842.662] (--) DUMMY(0): Max Clock: 300000 kHz
[163842.662] (II) DUMMY(0): Monitor: Using default hsync range of 31.50-48.00 kHz
[163842.662] (II) DUMMY(0): Monitor: Using default vrefresh range of 50.00-70.00 Hz
[163842.662] (II) DUMMY(0): Monitor: Using default maximum pixel clock of 65.00 MHz
[163842.662] (WW) DUMMY(0): Unable to estimate virtual size
[163842.662] (II) DUMMY(0): Clock range:  11.00 to 300.00 MHz
[163842.662] (II) DUMMY(0): Not using default mode "640x350" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "320x175" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "640x400" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "320x200" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "720x400" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "360x200" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "640x480" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "320x240" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "640x480" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "320x240" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "640x480" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "320x240" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "800x600" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "400x300" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "800x600" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "400x300" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "400x300" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1024x768i" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "512x384i" (vrefresh out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "512x384" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "512x384" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "512x384" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1280x960" (insufficient memory for mode)
[163842.662] (II) DUMMY(0): Not using default mode "640x480" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1280x960" (insufficient memory for mode)
[163842.662] (II) DUMMY(0): Not using default mode "640x480" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1280x1024" (insufficient memory for mode)
[163842.662] (II) DUMMY(0): Not using default mode "640x512" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1280x1024" (insufficient memory for mode)
[163842.662] (II) DUMMY(0): Not using default mode "640x512" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1280x1024" (insufficient memory for mode)
[163842.662] (II) DUMMY(0): Not using default mode "640x512" (hsync out of range)
[163842.662] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1600x1200" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "800x600" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1792x1344" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "896x672" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1792x1344" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "896x672" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1856x1392" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "928x696" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1856x1392" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "928x696" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1920x1440" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "960x720" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1920x1440" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "960x720" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "832x624" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "416x312" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1152x864" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "576x432" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1360x768" (monitor doesn't support reduced blanking)
[163842.663] (II) DUMMY(0): Not using default mode "1360x768" (mode clock too high)
[163842.663] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1400x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "700x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1440x900" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "720x450" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1600x1024" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "800x512" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1680x1050" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "840x525" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1920x1080" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "960x540" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1920x1200" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "960x600" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "1920x1440" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "960x720" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "2048x1536" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "2048x1536" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[163842.663] (II) DUMMY(0): Not using default mode "2048x1536" (insufficient memory for mode)
[163842.663] (II) DUMMY(0): Not using default mode "1024x768" (hsync out of range)
[163842.663] (--) DUMMY(0): Virtual size is 1024x768 (pitch 1024)
[163842.663] (**) DUMMY(0): *Default mode "1024x768": 65.0 MHz, 48.4 kHz, 60.0 Hz
[163842.663] (II) DUMMY(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "800x600": 40.0 MHz, 37.9 kHz, 60.3 Hz
[163842.663] (II) DUMMY(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "800x600": 36.0 MHz, 35.2 kHz, 56.2 Hz
[163842.663] (II) DUMMY(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "640x480": 25.2 MHz, 31.5 kHz, 59.9 Hz
[163842.663] (II) DUMMY(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "680x384": 36.0 MHz, 47.4 kHz, 60.0 Hz (D)
[163842.663] (II) DUMMY(0): Modeline "680x384"x60.0   36.00  680 704 720 760  384 385 390 395 doublescan +hsync -vsync (47.4 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "680x384": 42.4 MHz, 47.7 kHz, 59.8 Hz (D)
[163842.663] (II) DUMMY(0): Modeline "680x384"x59.8   42.38  680 716 784 888  384 385 390 399 doublescan -hsync +vsync (47.7 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "512x384": 32.5 MHz, 48.4 kHz, 60.0 Hz (D)
[163842.663] (II) DUMMY(0): Modeline "512x384"x60.0   32.50  512 524 592 672  384 385 388 403 doublescan -hsync -vsync (48.4 kHz zd)
[163842.663] (**) DUMMY(0): *Default mode "400x300": 20.0 MHz, 37.9 kHz, 60.3 Hz (D)
[163842.663] (II) DUMMY(0): Modeline "400x300"x60.3   20.00  400 420 484 528  300 300 302 314 doublescan +hsync +vsync (37.9 kHz zd)
[163842.664] (**) DUMMY(0): *Default mode "400x300": 18.0 MHz, 35.2 kHz, 56.3 Hz (D)
[163842.664] (II) DUMMY(0): Modeline "400x300"x56.3   18.00  400 412 448 512  300 300 301 312 doublescan +hsync +vsync (35.2 kHz zd)
[163842.664] (**) DUMMY(0): *Default mode "320x240": 12.6 MHz, 31.5 kHz, 60.1 Hz (D)
[163842.664] (II) DUMMY(0): Modeline "320x240"x60.1   12.59  320 328 376 400  240 245 246 262 doublescan -hsync -vsync (31.5 kHz zd)
[163842.664] (==) DUMMY(0): DPI set to (96, 96)
[163842.664] (II) Loading sub module "fb"
[163842.664] (II) LoadModule: "fb"
[163842.664] (II) Loading /usr/lib/xorg/modules/libfb.so
[163842.664] (II) Module fb: vendor="X.Org Foundation"
[163842.664]    compiled for 1.19.1, module version = 1.0.0
[163842.664]    ABI class: X.Org ANSI C Emulation, version 0.4
[163842.664] (II) Loading sub module "ramdac"
[163842.664] (II) LoadModule: "ramdac"
[163842.664] (II) Module "ramdac" already built-in
[163842.664] (--) Depth 24 pixmap format is 32 bpp
[163842.664] (II) DUMMY(0): Using 256 scanlines of offscreen memory
[163842.664] (==) DUMMY(0): Backing store enabled
[163842.664] (==) DUMMY(0): Silken mouse enabled
[163842.664] (==) RandR enabled
[163842.672] (II) SELinux: Disabled on system
[163842.673] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
[163842.717] (II) config/udev: Adding input device Power Button (/dev/input/event5)
[163842.717] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[163842.717] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[163842.717] (II) LoadModule: "libinput"
[163842.717] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[163842.718] (II) Module libinput: vendor="X.Org Foundation"
[163842.718]    compiled for 1.19.0, module version = 0.23.0
[163842.718]    Module class: X.Org XInput Driver
[163842.718]    ABI class: X.Org XInput driver, version 24.1
[163842.718] (II) Using input driver 'libinput' for 'Power Button'
[163842.719] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 17 paused 1
[163842.719] (II) systemd-logind: releasing fd for 13:69
[163842.736] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[163842.736] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[163842.736] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[163842.736] (II) Using input driver 'libinput' for 'Power Button'
[163842.736] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 17 paused 1
[163842.736] (II) systemd-logind: releasing fd for 13:68
[163842.776] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[163842.776] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[163842.776] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[163842.776] (II) Using input driver 'libinput' for 'Sleep Button'
[163842.777] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 17 paused 1
[163842.777] (II) systemd-logind: releasing fd for 13:67
[163842.792] (II) config/udev: Adding drm device (/dev/dri/card0)
[163842.792] (II) xfree86: Adding drm device (/dev/dri/card0)
[163842.793] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 17 paused 1
[163842.793] (EE) Error systemd-logind returned paused fd for drm node
[163842.793] (II) systemd-logind: releasing fd for 226:0
[163842.794] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event17)
[163842.794] (II) No input driver specified, ignoring this device.
[163842.794] (II) This device may have been added with another device file.
[163842.795] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event18)
[163842.795] (II) No input driver specified, ignoring this device.
[163842.795] (II) This device may have been added with another device file.
[163842.796] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event19)
[163842.796] (II) No input driver specified, ignoring this device.
[163842.796] (II) This device may have been added with another device file.
[163842.796] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event20)
[163842.796] (II) No input driver specified, ignoring this device.
[163842.796] (II) This device may have been added with another device file.
[163842.797] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/event0)
[163842.797] (**) A4Tech PS/2+USB Mouse: Applying InputClass "evdev pointer catchall"
[163842.797] (**) A4Tech PS/2+USB Mouse: Applying InputClass "libinput pointer catchall"
[163842.797] (II) Using input driver 'libinput' for 'A4Tech PS/2+USB Mouse'
[163842.798] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 18 paused 1
[163842.798] (II) systemd-logind: releasing fd for 13:64
[163842.825] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/mouse0)
[163842.825] (II) No input driver specified, ignoring this device.
[163842.825] (II) This device may have been added with another device file.
[163842.826] (II) config/udev: Adding input device Topre Corporation Realforce 105U (/dev/input/event2)
[163842.826] (**) Topre Corporation Realforce 105U: Applying InputClass "evdev keyboard catchall"
[163842.826] (**) Topre Corporation Realforce 105U: Applying InputClass "libinput keyboard catchall"
[163842.826] (II) Using input driver 'libinput' for 'Topre Corporation Realforce 105U'
[163842.827] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 18 paused 1
[163842.827] (II) systemd-logind: releasing fd for 13:66
[163842.849] (II) config/udev: Adding input device Burr-Brown from TI               USB Audio DAC    (/dev/input/event1)
[163842.849] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "evdev keyboard catchall"
[163842.849] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "libinput keyboard catchall"
[163842.849] (II) Using input driver 'libinput' for 'Burr-Brown from TI               USB Audio DAC   '
[163842.850] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 18 paused 1
[163842.850] (II) systemd-logind: releasing fd for 13:65
[163842.869] (II) config/udev: Adding input device HD Pro Webcam C920 (/dev/input/event7)
[163842.869] (**) HD Pro Webcam C920: Applying InputClass "evdev keyboard catchall"
[163842.869] (**) HD Pro Webcam C920: Applying InputClass "libinput keyboard catchall"
[163842.869] (II) Using input driver 'libinput' for 'HD Pro Webcam C920'
[163842.870] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 18 paused 1
[163842.870] (II) systemd-logind: releasing fd for 13:71
[163842.884] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event8)
[163842.884] (II) No input driver specified, ignoring this device.
[163842.884] (II) This device may have been added with another device file.
[163842.885] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event9)
[163842.885] (II) No input driver specified, ignoring this device.
[163842.885] (II) This device may have been added with another device file.
[163842.885] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event10)
[163842.885] (II) No input driver specified, ignoring this device.
[163842.885] (II) This device may have been added with another device file.
[163842.886] (II) config/udev: Adding input device HDA Intel PCH Line (/dev/input/event11)
[163842.886] (II) No input driver specified, ignoring this device.
[163842.886] (II) This device may have been added with another device file.
[163842.886] (II) config/udev: Adding input device HDA Intel PCH Line Out Front (/dev/input/event12)
[163842.886] (II) No input driver specified, ignoring this device.
[163842.886] (II) This device may have been added with another device file.
[163842.887] (II) config/udev: Adding input device HDA Intel PCH Line Out Surround (/dev/input/event13)
[163842.887] (II) No input driver specified, ignoring this device.
[163842.887] (II) This device may have been added with another device file.
[163842.887] (II) config/udev: Adding input device HDA Intel PCH Line Out CLFE (/dev/input/event14)
[163842.887] (II) No input driver specified, ignoring this device.
[163842.887] (II) This device may have been added with another device file.
[163842.888] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event15)
[163842.888] (II) No input driver specified, ignoring this device.
[163842.888] (II) This device may have been added with another device file.
[163842.889] (II) config/udev: Adding input device Eee PC WMI hotkeys (/dev/input/event16)
[163842.889] (**) Eee PC WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[163842.889] (**) Eee PC WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[163842.889] (II) Using input driver 'libinput' for 'Eee PC WMI hotkeys'
[163842.890] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 18 paused 1
[163842.890] (II) systemd-logind: releasing fd for 13:80
[163842.916] (II) config/udev: Adding input device PC Speaker (/dev/input/event6)
[163842.916] (II) No input driver specified, ignoring this device.
[163842.916] (II) This device may have been added with another device file.
[163854.520] (II) DUMMY(0): Using 256 scanlines of offscreen memory
[163854.520] (==) RandR enabled
[163854.522] (II) SELinux: Disabled on system
[163854.522] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
[163854.543] (II) config/udev: Adding input device Power Button (/dev/input/event5)
[163854.543] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[163854.543] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[163854.543] (II) Using input driver 'libinput' for 'Power Button'
[163854.543] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 16 paused 1
[163854.543] (II) systemd-logind: releasing fd for 13:69
[163854.564] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[163854.564] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[163854.564] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[163854.564] (II) Using input driver 'libinput' for 'Power Button'
[163854.564] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 16 paused 1
[163854.564] (II) systemd-logind: releasing fd for 13:68
[163854.580] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[163854.580] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[163854.580] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[163854.580] (II) Using input driver 'libinput' for 'Sleep Button'
[163854.580] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 16 paused 1
[163854.580] (II) systemd-logind: releasing fd for 13:67
[163854.596] (II) config/udev: Adding drm device (/dev/dri/card0)
[163854.596] (II) xfree86: Adding drm device (/dev/dri/card0)
[163854.596] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 16 paused 1
[163854.596] (EE) Error systemd-logind returned paused fd for drm node
[163854.596] (II) systemd-logind: releasing fd for 226:0
[163854.597] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event17)
[163854.597] (II) No input driver specified, ignoring this device.
[163854.597] (II) This device may have been added with another device file.
[163854.597] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event18)
[163854.597] (II) No input driver specified, ignoring this device.
[163854.597] (II) This device may have been added with another device file.
[163854.597] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event19)
[163854.597] (II) No input driver specified, ignoring this device.
[163854.597] (II) This device may have been added with another device file.
[163854.597] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event20)
[163854.597] (II) No input driver specified, ignoring this device.
[163854.597] (II) This device may have been added with another device file.
[163854.598] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/event0)
[163854.598] (**) A4Tech PS/2+USB Mouse: Applying InputClass "evdev pointer catchall"
[163854.598] (**) A4Tech PS/2+USB Mouse: Applying InputClass "libinput pointer catchall"
[163854.598] (II) Using input driver 'libinput' for 'A4Tech PS/2+USB Mouse'
[163854.598] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 18 paused 1
[163854.598] (II) systemd-logind: releasing fd for 13:64
[163854.616] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/mouse0)
[163854.616] (II) No input driver specified, ignoring this device.
[163854.616] (II) This device may have been added with another device file.
[163854.617] (II) config/udev: Adding input device Topre Corporation Realforce 105U (/dev/input/event2)
[163854.617] (**) Topre Corporation Realforce 105U: Applying InputClass "evdev keyboard catchall"
[163854.617] (**) Topre Corporation Realforce 105U: Applying InputClass "libinput keyboard catchall"
[163854.617] (II) Using input driver 'libinput' for 'Topre Corporation Realforce 105U'
[163854.618] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 18 paused 1
[163854.619] (II) systemd-logind: releasing fd for 13:66
[163854.641] (II) config/udev: Adding input device Burr-Brown from TI               USB Audio DAC    (/dev/input/event1)
[163854.641] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "evdev keyboard catchall"
[163854.641] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "libinput keyboard catchall"
[163854.641] (II) Using input driver 'libinput' for 'Burr-Brown from TI               USB Audio DAC   '
[163854.642] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 18 paused 1
[163854.642] (II) systemd-logind: releasing fd for 13:65
[163854.657] (II) config/udev: Adding input device HD Pro Webcam C920 (/dev/input/event7)
[163854.657] (**) HD Pro Webcam C920: Applying InputClass "evdev keyboard catchall"
[163854.657] (**) HD Pro Webcam C920: Applying InputClass "libinput keyboard catchall"
[163854.657] (II) Using input driver 'libinput' for 'HD Pro Webcam C920'
[163854.658] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 18 paused 1
[163854.658] (II) systemd-logind: releasing fd for 13:71
[163854.680] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event8)
[163854.680] (II) No input driver specified, ignoring this device.
[163854.680] (II) This device may have been added with another device file.
[163854.681] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event9)
[163854.681] (II) No input driver specified, ignoring this device.
[163854.681] (II) This device may have been added with another device file.
[163854.681] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event10)
[163854.681] (II) No input driver specified, ignoring this device.
[163854.681] (II) This device may have been added with another device file.
[163854.682] (II) config/udev: Adding input device HDA Intel PCH Line (/dev/input/event11)
[163854.682] (II) No input driver specified, ignoring this device.
[163854.682] (II) This device may have been added with another device file.
[163854.682] (II) config/udev: Adding input device HDA Intel PCH Line Out Front (/dev/input/event12)
[163854.682] (II) No input driver specified, ignoring this device.
[163854.682] (II) This device may have been added with another device file.
[163854.683] (II) config/udev: Adding input device HDA Intel PCH Line Out Surround (/dev/input/event13)
[163854.683] (II) No input driver specified, ignoring this device.
[163854.683] (II) This device may have been added with another device file.
[163854.683] (II) config/udev: Adding input device HDA Intel PCH Line Out CLFE (/dev/input/event14)
[163854.683] (II) No input driver specified, ignoring this device.
[163854.683] (II) This device may have been added with another device file.
[163854.684] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event15)
[163854.684] (II) No input driver specified, ignoring this device.
[163854.684] (II) This device may have been added with another device file.
[163854.684] (II) config/udev: Adding input device Eee PC WMI hotkeys (/dev/input/event16)
[163854.684] (**) Eee PC WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[163854.685] (**) Eee PC WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[163854.685] (II) Using input driver 'libinput' for 'Eee PC WMI hotkeys'
[163854.686] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 18 paused 1
[163854.686] (II) systemd-logind: releasing fd for 13:80
[163854.711] (II) config/udev: Adding input device PC Speaker (/dev/input/event6)
[163854.711] (II) No input driver specified, ignoring this device.
[163854.711] (II) This device may have been added with another device file.
[163888.813] (II) DUMMY(0): Using 256 scanlines of offscreen memory
[163888.813] (==) RandR enabled
[163888.815] (II) SELinux: Disabled on system
[163888.816] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
[163888.837] (II) config/udev: Adding input device Power Button (/dev/input/event5)
[163888.837] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[163888.837] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[163888.837] (II) Using input driver 'libinput' for 'Power Button'
[163888.838] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 18 paused 1
[163888.838] (II) systemd-logind: releasing fd for 13:69
[163888.856] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[163888.856] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[163888.856] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[163888.856] (II) Using input driver 'libinput' for 'Power Button'
[163888.856] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 18 paused 1
[163888.856] (II) systemd-logind: releasing fd for 13:68
[163888.880] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[163888.880] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[163888.880] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[163888.880] (II) Using input driver 'libinput' for 'Sleep Button'
[163888.880] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 18 paused 1
[163888.880] (II) systemd-logind: releasing fd for 13:67
[163888.916] (II) config/udev: Adding drm device (/dev/dri/card0)
[163888.916] (II) xfree86: Adding drm device (/dev/dri/card0)
[163888.917] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 18 paused 1
[163888.917] (EE) Error systemd-logind returned paused fd for drm node
[163888.917] (II) systemd-logind: releasing fd for 226:0
[163888.918] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event17)
[163888.918] (II) No input driver specified, ignoring this device.
[163888.918] (II) This device may have been added with another device file.
[163888.919] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event18)
[163888.919] (II) No input driver specified, ignoring this device.
[163888.919] (II) This device may have been added with another device file.
[163888.919] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event19)
[163888.919] (II) No input driver specified, ignoring this device.
[163888.919] (II) This device may have been added with another device file.
[163888.920] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event20)
[163888.920] (II) No input driver specified, ignoring this device.
[163888.920] (II) This device may have been added with another device file.
[163888.921] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/event0)
[163888.921] (**) A4Tech PS/2+USB Mouse: Applying InputClass "evdev pointer catchall"
[163888.921] (**) A4Tech PS/2+USB Mouse: Applying InputClass "libinput pointer catchall"
[163888.921] (II) Using input driver 'libinput' for 'A4Tech PS/2+USB Mouse'
[163888.922] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 19 paused 1
[163888.922] (II) systemd-logind: releasing fd for 13:64
[163888.940] (II) config/udev: Adding input device A4Tech PS/2+USB Mouse (/dev/input/mouse0)
[163888.941] (II) No input driver specified, ignoring this device.
[163888.941] (II) This device may have been added with another device file.
[163888.942] (II) config/udev: Adding input device Topre Corporation Realforce 105U (/dev/input/event2)
[163888.942] (**) Topre Corporation Realforce 105U: Applying InputClass "evdev keyboard catchall"
[163888.942] (**) Topre Corporation Realforce 105U: Applying InputClass "libinput keyboard catchall"
[163888.942] (II) Using input driver 'libinput' for 'Topre Corporation Realforce 105U'
[163888.943] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 19 paused 1
[163888.943] (II) systemd-logind: releasing fd for 13:66
[163888.969] (II) config/udev: Adding input device Burr-Brown from TI               USB Audio DAC    (/dev/input/event1)
[163888.969] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "evdev keyboard catchall"
[163888.969] (**) Burr-Brown from TI               USB Audio DAC   : Applying InputClass "libinput keyboard catchall"
[163888.969] (II) Using input driver 'libinput' for 'Burr-Brown from TI               USB Audio DAC   '
[163888.970] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 19 paused 1
[163888.970] (II) systemd-logind: releasing fd for 13:65
[163888.988] (II) config/udev: Adding input device HD Pro Webcam C920 (/dev/input/event7)
[163888.989] (**) HD Pro Webcam C920: Applying InputClass "evdev keyboard catchall"
[163888.989] (**) HD Pro Webcam C920: Applying InputClass "libinput keyboard catchall"
[163888.989] (II) Using input driver 'libinput' for 'HD Pro Webcam C920'
[163888.990] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 19 paused 1
[163888.990] (II) systemd-logind: releasing fd for 13:71
[163889.004] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event8)
[163889.004] (II) No input driver specified, ignoring this device.
[163889.004] (II) This device may have been added with another device file.
[163889.005] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event9)
[163889.005] (II) No input driver specified, ignoring this device.
[163889.005] (II) This device may have been added with another device file.
[163889.005] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event10)
[163889.005] (II) No input driver specified, ignoring this device.
[163889.005] (II) This device may have been added with another device file.
[163889.006] (II) config/udev: Adding input device HDA Intel PCH Line (/dev/input/event11)
[163889.006] (II) No input driver specified, ignoring this device.
[163889.006] (II) This device may have been added with another device file.
[163889.006] (II) config/udev: Adding input device HDA Intel PCH Line Out Front (/dev/input/event12)
[163889.006] (II) No input driver specified, ignoring this device.
[163889.006] (II) This device may have been added with another device file.
[163889.007] (II) config/udev: Adding input device HDA Intel PCH Line Out Surround (/dev/input/event13)
[163889.007] (II) No input driver specified, ignoring this device.
[163889.007] (II) This device may have been added with another device file.
[163889.007] (II) config/udev: Adding input device HDA Intel PCH Line Out CLFE (/dev/input/event14)
[163889.007] (II) No input driver specified, ignoring this device.
[163889.007] (II) This device may have been added with another device file.
[163889.008] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event15)
[163889.008] (II) No input driver specified, ignoring this device.
[163889.008] (II) This device may have been added with another device file.
[163889.008] (II) config/udev: Adding input device Eee PC WMI hotkeys (/dev/input/event16)
[163889.009] (**) Eee PC WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[163889.009] (**) Eee PC WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[163889.009] (II) Using input driver 'libinput' for 'Eee PC WMI hotkeys'
[163889.010] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 19 paused 1
[163889.010] (II) systemd-logind: releasing fd for 13:80
[163889.028] (II) config/udev: Adding input device PC Speaker (/dev/input/event6)
[163889.028] (II) No input driver specified, ignoring this device.
[163889.028] (II) This device may have been added with another device file

@antimoroma
Copy link

Is there the possibility to run a full linum Mint with x11 Docker? soory i don't have a big experience with display ando so on, know something on Docker, and would like to try a full distibution inside docker (if it's possible)
Thank you :)

@mviereck
Copy link
Owner Author

Hello anitmorona,
I did a test with cinnamon and mate desktop in docker, they seem to have several problems inside of docker. Essesntially it is possible to convert live cd isos or virtual machine disk images into docker images. But to test a distribution. it is better to run them directly, at best in a virtual environment like VirtualBox.

Hello euri10,
sorry for answering late, i still could not test your research results myself, but they look very interesting!
You could make a try without specifying mydummy.conf, maybe you get a full working X including monitor display. Do I see right the 2. X server is already created on startup? Or can you start it later? Can you start it as unprivileged user?

@kmuehlbauer
Copy link

kmuehlbauer commented Apr 28, 2017

@mviereck

Sorry, if this is the wrong place to ask.

I'm using docker on my host machine with my user being in the "docker"-group. So I can initiate docker run-commands without using passwords. At the moment I'm stuck with x11docker complaining about:

x11docker ERROR
x11docker ERROR: docker did not start successfully.

and a missing docker.pid-file.

Unfortunately I did not find anything related. Hope you can shed some light.

Update: I'm now using -P switch, but now I get some permission problems.
x11docker.log:
x11docker.txt

@mviereck
Copy link
Owner Author

@kmuehlbauer
I have opened a new issue for this as I'm not sure what is going wrong. Please look at #10

@dashesy
Copy link

dashesy commented May 5, 2017

You can run X in docker without --privileged=true by giving it the capabilities needed: --cap-add SYS_TTY_CONFIG --cap-add SYS_RAWIO -e XDG_VTNR=7 --device=/dev/tty7.
Also depending on your graphics card driver you may also need to pass other devices, like --device=/dev/nvidia-modeset --device=/dev/nvidiactl --device=/dev/nvidia-uvm --device=/dev/nvidia-uvm-tools --device=/dev/nvidia0 --device=/dev/vga_arbiter as well as symlinking required X drivers (like nvidia_drv.so and libglx.so) using a docker volume. Also, if you are running multiple X (like in the host) make sure to assign them separate seats: seat1, ...

The way to figure out what is needed is to --cap-add SYS_PTRACE then exec into the docker and call strace and see where it stalls.

@mviereck
Copy link
Owner Author

mviereck commented May 5, 2017

@dashesy Thank you! I tried this, but I ran into some vt switch errors, even with setting X option vt to the current tty and -seat to a different seat. Maybe I'll find a way to solve this.
For now, I can successfully start X in docker adding --privileged to your example, but I cannot move the mouse or type the keyboard. Even switching back to my host X does not work anymore, and I have to switch power off to restart the computer.
Somehow X does not get access to mouse and keyboard. Maybe same issue, I had this experience with running host X as a systemd service as @euri10 described above, too.
Do you have a clue how to solve this? It sounds like --cap-add SYS_RAWIO should do the job, but obviously it is not enough. I'm running debian 9, maybe other systems will behave different.

FROM debian:jessie
RUN apt-get update
RUN apt-get install -y xorg
RUN apt-get install -y xinit
RUN apt-get install -y openbox
docker run -ti --privileged --cap-add SYS_TTY_CONFIG --cap-add SYS_RAWIO \
           -e XDG_VTNR=6 --device=/dev/tty6  xorg xinit openbox -- :6 vt6 -seat seat6

@dashesy
Copy link

dashesy commented May 5, 2017

Do not use current tty, use some unallocated one (tty9? in Debian) if you use current tty, it will kill host's X.
--privileged=true already adds all the capabilities, so --cap-add becomes redundant. You should find which device you should pass to docker. I never tried adding mouse/keyboard but you should also add those devices with perhaps --device=/dev/input/mice.

I use Xpra and shadow ICEWM then I can control things with Xpra from another machine.

@bergtwvd
Copy link

bergtwvd commented Sep 9, 2017

Maybe not the right track to ask, but what happened to dockerfile-x11docker-google-earth repository?

It is still referenced from https://devhub.io/zh/repos/mviereck-dockerfile-x11docker-google-earth

@mviereck
Copy link
Owner Author

mviereck commented Sep 9, 2017

@bergtwvd I've deleted the google-earth repo a few month ago. Some reasons:

  • google earth for linux has many bugs. I did some workarounds in dockerfile, but it was still a hack.
  • I disabled download and installation in dockerfile due to google's copyright restrictions. Users had to enable themself and to build docker image themself. Regardless of the big warning in Readme, the automated build on docker hub was downloaded very often and must have disappointed a lot of users.
  • I accidently deleted an important patch file stored in another repo. I was too lazy to search the web again for it. (At that point, I decided to delete the repo).

I've uploaded the dockerfile to pastebin, if you are interested: Dockerfile for google earth

My solution:
The Windows version of google earth is less buggy and works well with wine. I use it with x11docker/lxde-wine

@bergtwvd
Copy link

bergtwvd commented Sep 10, 2017

Thanks. I used your dockerfile, along with other input from the internet to create a GE image.
To get things running I have to use an older GE version (7.1.8). The latest version has issues with Qt libraries (as the older one), but for the latest I could not find replacement Qt libraries.

Here the Dockerfile. The start.sh at the end basically starts GE, and could also be replaced by /usr/bin/google-earth-pro. I use a start.sh script to handle a few command line options and make the container more flexible to use.

FROM ubuntu:16.04

# Get packages
RUN apt-get update && apt-get install -y \
	wget \
	xdg-utils \
	lsb-core \
	libglu1-mesa \
	libfreeimage3 \
	libgstreamer-plugins-base0.10-0
	
COPY google-earth-pro-stable_7.1.8.3036-r0_amd64.deb /tmp
RUN dpkg -i /tmp/google-earth-pro-stable_7.1.8.3036-r0_amd64.deb && \
	rm /tmp/google-earth-pro-stable_7.1.8.3036-r0_amd64.deb
ADD ge7.1.1.1580-0.x86_64-new-qt-libs-debian7-ubuntu12.tar.xz /opt/google/earth/pro/

# create config file for google earth
# * no tips on startup
# * no tourguide filmstrip
# * don't send usage stats to google
# * disable texture compression to avoid ugly shapes
RUN mkdir -p /root/.config/Google
RUN echo '[General]            \n\
enableTips=false               \n\
UsageStats=false               \n\
[TourGuide]                    \n\
Filmstrip\Enabled=false        \n\
[Render]                       \n\
TextureCompression=false       \n\
' > /root/.config/Google/GoogleEarthPro.conf

ADD start.sh /tmp/
WORKDIR /tmp

# Set entrypoint
ENTRYPOINT ["/bin/sh", "./start.sh"]

@mviereck
Copy link
Owner Author

mviereck commented Sep 10, 2017

@bergtwvd It seems you are adding the patch without applying it. Check and adjust this part:

RUN mkdir -p /opt/google/earth/free
RUN cp -a /opt/google/earth/free /opt/google/earth/free.newlibs
RUN tar xvf /opt/google/earth/free.newlibs/ge7.1.1.1580-0.x86_64-new-qt-libs-debian7-ubuntu12.tar.xz
RUN mv /usr/bin/google-earth /usr/bin/google-earth.old
RUN ln -s /opt/google/earth/free.newlibs/googleearth /usr/bin/google-earth

Looking closer at my dockerfile, it seems to be a quite old version, not the latest one I had on github. But it seems to include the most important fixes I can remember.

To make your image smaller, you can renounce at least wget, and you can delete google....deb and ge7...tar.xz afterwards.

@bergtwvd
Copy link

The ADD command extracts the tar file in the given location. I think it is more efficient than copy, extract and remove. Anyway, either approach works :-).

@ugallu
Copy link

ugallu commented Nov 17, 2017

Is there any way to restart stopped containers with x11docker, instead of images? (I tried committing containers as images and running them, but it failed)

@mviereck
Copy link
Owner Author

@ugallu I've opened a new issue for your question, please look there: #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants