forked from mviereck/x11docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x11docker.man
713 lines (649 loc) · 22 KB
/
x11docker.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
.TH X11DOCKER 1
.SH "NAME"
x11docker \- Run GUI applications and desktop environments in containers
.SH "SYNOPSIS"
To run a container on a new X server:
.B x11docker
[\fIOPTIONS\fR]
\fIIMAGE\fR
[\fICOMMAND\fR]
.B x11docker
[\fIOPTIONS\fR]
\fB\-\-\fR
\fIIMAGE\fR
[\fICOMMAND \fR[\fIARGS\fR ...]]
.B x11docker
[\fIOPTIONS\fR]
\fB\-\-\fR
[\fICUSTOM_RUN_OPTIONS\fR]
\fB\-\-\fR
\fIIMAGE\fR
[\fICOMMAND \fR[\fIARGS\fR ...]]
To run a host application on a new X server:
.B x11docker
[\fIOPTIONS\fR]
\fB\-\-backend=host\fR
\fB\-\-\fR
\fICOMMAND \fR[\fIARGS\fR ...]
.SH "DESCRIPTION"
Runs GUI applications and desktop environments in containers.
Supports docker, podman, and (experimental) nerdctl.
Can run X servers from host or in containers of image x11docker/xserver.
Can also provide X servers to host applications.
x11docker always runs a fresh container from image and discards it afterwards.
.SS "Optional features:"
.IP
* GPU hardware acceleration
.br
* Sound with pulseaudio or ALSA
.br
* Clipboard sharing
.br
* Printer access
.br
* Webcam access
.br
* Persistent home folder
.br
* Wayland support
.br
* Language locale creation
.br
* Several init systems and DBus in container
.br
* Support of several container runtimes and backends
.SS "Focus on security:"
.IP
* Avoids X security leaks using additional X servers.
.br
* Container user is same as host user to avoid root in container.
.br
* Restricts container capabilities to bare minimum.
.PP
x11docker sets up an unprivileged container user with password \fBx11docker\fR
and restricts container capabilities. Some applications might behave different
than with a regular \fBdocker|podman run\fR command due to these security restrictions.
Achieve a less restricted setup with \fB\-\-cap\-default\fR or \fB\-\-sudouser\fR.
.SH "OPTIONS"
Short options do not accept arguments.
.TP
\fB\-\-help\fR
Display this message and exit.
.TP
\fB\-\-license\fR
Show license of x11docker (MIT) and exit.
.TP
\fB\-\-version\fR
Show x11docker version and exit.
.SS "Basic settings"
.TP
\fB\-\-backend\fR=\fBdocker\fR|\fBpodman\fR|\fBnerdctl\fR|\fBhost\fR
Container backend to use, or \fBhost\fR for no container.
.TP
\fB\-d\fR, \fB\-\-desktop\fR
Indicate a desktop environment in image.
.TP
\fB\-i\fR, \fB\-\-interactive\fR
Run with an interactive tty to allow shell commands.
.TP
\fB\-\-rootless\fR [=\fByes\fR|\fBno\fR]
Use (or disallow) rootless backend.
Default behaviour without option \fB\-\-rootless\fR:
.br
\fB\-\-backend\fR=\fBdocker\/\fR: rootful unless environment variable \fBDOCKER_HOST\fR is set.
.br
\fB\-\-backend\fR=\fBpodman\/\fR: rootless except started as root.
.br
\fB\-\-backend\fR=\fBnerdctl\/\fR: rootless except started as root
.br
.TP
\fB\-\-xc\fR [=\fByes\fR|\fBno\fR|\fIBACKEND\fR]
Run X server in container of image \fBx11docker/xserver\fR.
\fIBACKEND\fR can specify one of \fBdocker\fR|\fBpodman\fR|\fBnerdctl\fR.
.TP
\fB\-\-xonly\fR
Only start an empty X server.
.SS "Host integration"
.TP
\fB\-\-alsa\fR [=\fIALSA_CARD\fR]
Sound with ALSA. You can define a desired sound card
with \fIALSA_CARD\fR. List of available sound cards: \fBaplay \-l\fR
.TP
\fB\-c\fR, \fB\-\-clipboard\fR [=\fByes\fR|\fBno\fR|\fBoneway\fR|\fBsuperv\fR|\fBaltv\fR] Share clipboard with host.
Possible arguments:
.br
\fByes\fR Share clipboard in both directions.
Includes middle\-mouse\-click selection.
.br
\fBoneway\fR Copy clipboard from container to host only.
Includes middle\-mouse\-click selection.
.br
\fBsuperv\fR Keys [SUPER][v] copy clipboard from host to
container. Does not copy middle\-mouse\-click
to container. Otherwise same as \fBoneway\fR.
.br
\fBaltv\fR Same as \fBsuperv\fR but using keys [ALT][v].
.br
\fBno\fR Do not share clipboard.
.TP
\fB\-g\fR, \fB\-\-gpu\fR [=\fByes\fR|\fBno\fR|\fBiglx\fR|\fBvirgl\fR] GPU access for hardware accelerated OpenGL.
Works best with open source drivers on host and in image.
For closed source nvidia drivers regard terminal output.
Direct rendering supported by few X server options only.
.br
\fBiglx\fR enables indirect rendering (\fB\-\-xorg\fR only).
.br
\fBvirgl\fR allows GPU access for all X servers, but
with limited performance and with \fB\-\-xc\fR only.
.TP
\fB\-I\fR, \fB\-\-network\fR [=\fINET\fR]
Allow internet access. (i.e. allow Docker default.)
For optional argument \fINET\fR see Docker documentation of
docker run option \fB\-\-network\fR. Docker default is \fBbridge\fR.
.TP
\fB\-l\fR, \fB\-\-lang\fR [=\fILOCALE\fR]
Set language variable \fBLANG\fR=\fILOCALE\fR in container.
Without arg \fILOCALE\fR host variable \fB\-\-lang=\fR\fB$LANG\fR is used.
If \fILOCALE\fR is missing in image, x11docker generates it
with \fBlocaledef\fR in container (needs \fBlocales\fR package).
Examples for \fILOCALE\fR: \fBru\fR, \fBen\fR, \fBde\fR, \fBzh_CN\fR, \fBcz\fR, \fBfr\fR, \fBfr_BE\fR.
.TP
\fB\-P\fR, \fB\-\-printer\fR [=\fIMODE\fR] Share host printers through \fBcups\fR server.
Optional \fIMODE\fR can be \fBsocket\fR or \fBtcp\fR. Default: \fBsocket\fR
.TP
\fB\-p\fR, \fB\-\-pulseaudio\fR [=\fIMODE\fR]
Sound with pulseaudio. Needs \fBpulseaudio\fR on host
and in image. Optional arg \fIMODE\fR can be \fBsocket\fR, \fBtcp\fR
or \fBhost\fR. tcp mode needs network access with \fB\-\-network\fR.
.TP
\fB\-\-webcam\fR
Share host webcam device files.
.SS "Shared host folders or volumes"
.TP
\fB\-m\fR, \fB\-\-home\fR [=\fIARG\fR]
Create a persistent \fBHOME\fR folder for data storage.
Default: Uses \fI~/.local/share/x11docker/IMAGENAME\fR.
\fIARG\fR can be another host folder or a volume.
(\fI~/.local/share/x11docker\fR has a softlink to \fI~/x11docker\/\fP.)
(Use \fB\-\-homebasedir\fR to change this base storage folder.)
.TP
\fB\-\-share\fR=\fIARG\/\fR
Share host file or folder \fIARG\fR. Read\-only with \fIARG\fR\fB:ro\fR .
Device files in \fI/dev\/\fP can be shared, too.
\fIARG\fR can also be a volume instead of a host folder.
.SS "X server options"
.TP
\fB\-\-auto\fR
Automatically choose X server (default). Influenced
notably by options \fB\-\-desktop\fR, \fB\-\-gpu\fR, \fB\-\-wayland\fR, \fB\-\-wm\fR.
.TP
\fB\-h\fR, \fB\-\-hostdisplay\fR
Share host display \fB:0\fR. Quite bad container isolation!
Least overhead of all X server options.
.TP
\fB\-a\fR, \fB\-\-xpra\fR
Nested X server supporting seamless and \fB\-\-desktop\fR mode.
.TP
\fB\-\-xpra2\fR
Like \fB\-\-xpra\fR \fB\-\-xc\fR, but runs xpra client on host.
.TP
\fB\-A\fR, \fB\-\-xpra\-xwayland\fR
Like \fB\-\-xpra\fR, but supports option \fB\-\-gpu\fR.
.TP
\fB\-\-xpra2\-xwayland\fR
Like \fB\-\-xpra2\fR, but supports option \fB\-\-gpu\fR.
.TP
\fB\-n\fR, \fB\-\-nxagent\fR
Nested X server supporting seamless and \fB\-\-desktop\fR mode.
Faster than \fB\-\-xpra\fR, but can have compositing issues.
.TP
\fB\-y\fR, \fB\-\-xephyr\fR
Nested X server for \fB\-\-desktop\fR mode. Without \fB\-\-desktop\fR
a host window manager will be provided (option \fB\-\-wm\fR).
.TP
\fB\-Y\fR, \fB\-\-weston\-xwayland\fR
Desktop mode like \fB\-\-xephyr\fR, but supports option \fB\-\-gpu\fR.
Runs from console, within X and within Wayland.
.TP
\fB\-x\fR, \fB\-\-xorg\fR
Core Xorg server. Runs ootb from console.
Switch tty with <CTRL><ALT><F1>....<F12>. Always switch
to a black tty before switching to X to avoid possible crashes.
.SS "Special X server options"
.TP
\fB\-t\fR, \fB\-\-tty\fR
Terminal only mode. Does not run an X or Wayland server.
.TP
\fB\-\-xvfb\fR
Invisible X server using Xvfb.
Can be used for custom access with xpra or VNC.
.TP
\fB\-X\fR, \fB\-\-xwayland\fR
Blanc Xwayland, needs a running Wayland compositor.
.TP
\fB\-\-xwin\fR
X server to run in Cygwin/X on MS Windows.
.TP
\fB\-\-runx\fR
X server wrapper for VcXsrv and Xwin on MS Windows.
.SS "Wayland instead of X"
.TP
\fB\-W\fR, \fB\-\-wayland\fR
Automatically set up a Wayland environment.
Chooses one of following options and regards \fB\-\-desktop\fR.
.TP
\fB\-T\fR, \fB\-\-weston\fR
Weston without X for pure Wayland applications.
Runs in X, in Wayland or from console.
.TP
\fB\-K\fR, \fB\-\-kwin\fR
KWin without X for pure Wayland applications.
Runs in X, in Wayland or from console.
.TP
\fB\-H\fR, \fB\-\-hostwayland\fR
Share host Wayland without X for pure Wayland apps.
.SS "X and Wayland appearance options"
.TP
\fB\-\-border\fR [=\fICOLOR\fR] Draw a colored border in windows of \fBxpra\fR.
Argument \fICOLOR\fR can be e.g. \fBorange\fR or \fB#F00\fR. Thickness
can be specified, too, e.g. \fBred,3\fR. Default: \fBblue,1\fR
.TP
\fB\-\-dpi\fR=\fIN\/\fR
dpi value (\fIN\fR dots per inch) to submit to X clients.
Influences font size of some applications.
.TP
\fB\-f\fR, \fB\-\-fullscreen\fR
Run in fullscreen mode.
.TP
\fB\-\-output\-count\fR=\fIN\/\fR
Multiple virtual monitors for Weston or KWin.
.TP
\fB\-\-rotate\fR=\fIN\/\fR
Rotate display (\fB\-\-xorg\fR, \fB\-\-weston\fR and \fB\-\-weston\-xwayland\fR)
Allowed values: \fB0\fR, \fB90\fR, \fB180\fR, \fB270\fR, \fBflipped\fR, \fBflipped\-90\fR,
\fBflipped\-180\fR, \fBflipped\-270\fR. (flipped means mirrored)
.TP
\fB\-\-scale\fR=\fIN\/\fR
Scale/zoom factor \fIN\fR for xpra, Xorg or Weston.
Allowed for \fB\-\-xpra\fR* and \fB\-\-xorg\fR: \fB0.25\fR...\fB8.0\fR.
Allowed for \fB\-\-weston\fR and \fB\-\-weston\-xwayland\fR: \fB1\fR...\fB9\fR.
.TP
\fB\-\-size\fR=\fI\,WxH\/\fR
Screen size of new X server (e.g. \fB800x600\fR).
.TP
\fB\-w\fR, \fB\-\-wm\fR [=\fIARG\fR]
Provide a host window manager to container applications.
(In case of \fB\-\-xc\fR only \fbopenbox\fR is provided.)
Possible \fIARG\fR:
.br
\fBhost\fR autodetection of a host window manager.
.br
\fICOMMAND\fR command for a desired host window manager.
.br
\fBnone\fR Run without a window manager. Same as \fB\-\-desktop\fR.
.TP
\fB\-F\fR, \fB\-\-xfishtank\fR
Show fish tank on new X server.
.SS "X and Wayland special configuration"
.TP
\fB\-\-checkwindow\fR [=\fIARG\fR]
Run container until all X windows are closed.
If \fIARG\fR is provided, run container as long as \fBgrep\fR can
find \fIARG\fR in output of \fBxwininfo \-root \-children\fR.
This option helps to keep alive containers with
self\-forking applications like gnome\-terminal
or to stop endless running ones like chromium.
.TP
\fB\-\-clean\-xhost\fR
Disable xhost access policies on host display.
.TP
\fB\-\-composite\fR [=\fByes\fR|\fBno\fR]
Enable or disable X extension \fBComposite\fR.
Default is \fByes\fR except for \fB\-\-nxagent\fR. Can cause or
fix issues with some applications on \fBnxagent\fR.
.TP
\fB\-\-display\fR=\fI\,N\/\fR
Run new X server with display number \fIN\fR. Must not be already in use.
.TP
\fB\-\-keymap\fR=\fI\,LAYOUT\/\fR
Set keyboard layout for new X server, e.g. \fBde\fR, \fBus\fR, \fBru\fR.
For possible \fILAYOUT\fR look at \fI/usr/share/X11/xkb/symbols\/\fP.
.TP
\fB\-\-vt\fR [=\fIN\fR]
Use vt / tty \fIN\fR. Without optional \fIN\fR search an unused tty.
.TP
\fB\-\-westonini\fR=\fIFILE\/\fR
Custom \fBweston.ini\fR for \fB\-\-weston\fR and \fB\-\-weston\-xwayland\fR.
.TP
\fB\-\-xhost\fR [=\fISTR\fR]
Set \fBxhost\fR \fISTR\fR on new X server (see \fBman xhost\fR).
Without optional \fISTR\fR will set: \fB+SI:localuser:$USER\fR .
(Use with care. \fB\-\-xhost=+\fR allows access for everyone).
.TP
\fB\-\-xoverip\fR [=\fByes\fR|\fBno\fR|\fBlistentcp\fR|\fBsocat\fR] Connect to X over TCP network. Special
setups only, usually only enabled by x11docker itself.
.br
\fByes\fR Use \fBlistentcp\fR if possible, otherwise \fBsocat\fR.
.br
\fBno\fR Use shared unix socket (general default).
.br
\fBlistentcp\fR Use X option \fB\-listen tcp\fR.
.br
\fBsocat\fR Use \fBsocat\fR to create a fake TCP connection.
.TP
\fB\-\-xauth\fR [=\fByes\fR|\fBtrusted\fR|\fBuntrusted\fR|\fBno\fR] Configure X cookie authentication.
Possible arguments:
.br
\fByes\fR|\fBtrusted\fR Enable cookie authentication with trusted
cookies. (General x11docker default.)
.br
\fBuntrusted\fR Untrusted cookie for untrusted apps limiting access to X resources.
Useful to avoid \fBMIT\-SHM\fR with \fB\-\-hostdisplay\fR.
.br
\fBno\fR Disable cookie authentication. Dangerous!
.TP
\fB\-\-xtest\fR [=\fByes\fR|\fBno\fR] Enable or disable X extension \fBXTEST\fR. Default is \fByes\fR for
\fB\-\-xpra\fR and \fB\-\-xvfb\fR, \fBno\fR for other X servers.
Needed to allow keyboard and mouse control with xpra.
.SS "Container user settings"
.TP
\fB\-\-group\-add\fR=\fIGROUP\/\fR
Add container user to group \fIGROUP\fR.
.TP
\fB\-\-hostuser\fR=\fIUSER\/\fR
Run X (and container user) as user \fIUSER\fR. Default is
result of \fB$(logname)\fR. (x11docker must run as root).
.TP
\fB\-\-password\fR [=\fIWORD\fR]
Change container user password and exit.
Interactive input if argument \fIWORD\fR is not provided.
Stored encrypted in \fI~/.config/x11docker/passwd\fR.
.TP
\fB\-\-sudouser\fR [=\fBnopasswd\fR]
Allow \fBsu\fR and \fBsudo\fR for container user. Use with care,
severe reduction of default x11docker security!
Optionally passwordless sudo with argument \fBnopasswd\fR.
Default password is \fBx11docker\fR.
.TP
\fB\-\-user\fR=\fIU\/\fR
Create container user \fIU\fR (\fIU\fR=name or \fIU\fR=uid). Default:
same as host user. \fIU\fR can also be an unknown user id.
You can specify a group id with \fIU\fR being \fIuser\fR\fB:\fR\fIgid\fR.
Special case: \fB\-\-user=RETAIN\/\fR keeps image user settings.
.SS "Container capabilities"
.IP
In most setups x11docker sets \fB\-\-cap\-drop=ALL \-\-security\-opt=no\-new\-privileges\/\fR
and shows warnings if doing otherwise.
Custom capabilities can be added with \fB\-\-cap\-add\fR=\fI\,CAP\/\fR after \fB\-\-\fR
.TP
\fB\-\-cap\-default\fR
Allow default container capabilities.
Includes \fB\-\-newprivileges=yes\fR.
.TP
\fB\-\-ipc\fR [=\fIARG\fR]
Without optional \fIARG\fR sets run option \fB\-\-ipc=host\fR (discouraged).
For other possible \fIARG\fR see docker run reference.
.TP
\fB\-\-limit\fR [=\fIFACTOR\fR]
Limit CPU and RAM usage of container to
currently free RAM x \fIFACTOR\fR and available CPUs x \fIFACTOR\fR.
Allowed range is 0 < \fIFACTOR\fR <= 1.
Default for \fB\-\-limit\fR without optional argument \fIFACTOR\fR is \fB0.5\fR .
.TP
\fB\-\-newprivileges\fR [=\fByes\fR|\fBno\fR|\fBauto\fR]
Set or unset run option
\fB\-\-security\-opt=no\-new\-privileges\fR. Default with no
argument is \fByes\fR. Default for most cases is \fBno\fR.
.SS "Container init system, elogind and DBus daemon"
.TP
\fB\-\-dbus\fR [=\fBsystem\fR]
Run DBus user session daemon for container command.
With argument \fBsystem\fR also run a DBus system daemon.
(To run a DBus system daemon rather use one of
\fB\-\-init\fR=\fBsystemd\fR|\fBopenrc\fR|\fBrunit\fR|\fBsysvinit\fR )
.TP
\fB\-\-hostdbus\fR
Connect to DBus user session from host.
.TP
\fB\-\-init\fR [=\fBtini\fR|\fBsystemd\fR|\fBopenrc\fR|\fBrunit\fR|\fBsysvinit\fR|\fBs6-overlay\fR|\fBnone\fR]
Run an init system as PID 1 in container. Solves the
zombie reaping issue. By default x11docker uses \fBtini\fR or the similar \fBcatatonit\fR.
.TP
\fB\-\-sharecgroup\fR
Share \fI\,/sys/fs/cgroup\/\fP. Allows \fBelogind\fR in container if
used with one of \fB\-\-init\fR=\fBopenrc\fR|\fBrunit\fR|\fBsysvinit\fR
.SS "Container special configuration:"
.TP
\fB\-\-env\fR \fIVAR\fR=\fIvalue\fR
Set custom environment variable.
.TP
\fB\-\-name\fR=\fINAME\/\fR
Specify container name \fINAME\fR.
.TP
\fB\-\-no\-entrypoint\fR
Disable \fBENTRYPOINT\fR in image to allow other commands, too
.TP
\fB\-\-no\-setup\fR
No x11docker setup in running container. Disallows
several other options. See also \fB\-\-user\fR=\fB\,RETAIN\/\fR.
.TP
\fB\-\-runtime\fR=\fIRUNTIME\/\fR
Specify container runtime. Known by x11docker:
.br
\fBrunc\fR Default runtime of \fBdocker\fR.
.br
\fBcrun\fR Default runtime of \fBpodman\fR.
.br
\fBnvidia\fR Runtime for \fBnvidia/nvidia\-docker\fR images.
.br
\fBsysbox\-runc\fR Runtime for powerful root in container.
.TP
\fB\-\-shell\fR=\fISHELL\/\fR
Set preferred user shell. Example: \fB\-\-shell=/bin/zsh\fR
.TP
\fB\-\-snap\fR
Enable support for Docker in snap.
.TP
\fB\-\-stdin\fR
Forward stdin of x11docker to container command.
.TP
\fB\-\-workdir\fR=\fIDIR\/\fR
Set working directory \fIDIR\fR.
.SS Additional commands
You might need to move them to background with \fICMD\fR\fB &\fR.
.TP
\fB\-\-runasroot\fR=\fICMD\/\fR
Run command \fICMD\fR as root in container.
.TP
\fB\-\-runasuser\fR=\fICMD\/\fR
Run command \fICMD\fR with user privileges in container
before running image command.
.HP
\fB\-\-runfromhost\fR=\fICMD\/\fR Run host command \fICMD\fR on new X server.
.SS "Miscellaneous"
.TP
\fB\-\-build\fR \fIIMAGE\fR
Build an image from a Dockerfile from x11docker
repository. Example: \fBx11docker \-\-build x11docker/fvwm\fR .
Works for all repositories beginning with 'dockerfile'
at https://github.com/mviereck?tab=repositories .
Regards (only) option \fB\-\-backend\fR=\fI\,BACKEND\/\fR.
.TP
\fB\-\-cachebasedir\fR=\fI\,DIR\/\fR
Custom base folder for cache files.
.TP
\fB\-\-homebasedir\fR=\fI\,DIR\/\fR
Custom base folder for option \fB\-\-home\fR.
.TP
\fB\-\-fallback\fR [=\fByes\fR|\fBno\fR]
Allow or deny fallbacks if a chosen option cannot
be fulfilled. By default fallbacks are allowed.
.TP
\fB\-\-launcher\fR
Create application launcher with current options
on desktop and exit. You can get a menu entry moving
the created \fI*.desktop\fR file to \fI~/.local/share/applications\fR
.TP
\fB\-\-mobyvm\fR
Use MobyVM (for WSL2 only that defaults to Linux Docker).
.TP
\fB\-\-preset\fR=\fI\,FILE\/\fR
Read a set of predefined options stored in file \fIFILE\fR.
Useful to shortcut often used option combinations.
.br
\fIFILE\fR is searched in directory \fI\,/etc/x11docker/preset\/\fR,
or in directory \fI~/.config/x11docker/preset\fR.
.br
Multiple lines in \fIFILE\fR are allowed.
.br
Comment lines must begin with \fI#\fR .
.br
Local presets supersede global ones in \fI\,/etc\/\fR .
.br
Special case: A preset file with file name \fIdefault\fR
will be applied automatically for all x11docker sessions.
.SS "Output of parseable information on stdout"
.IP
Get output e.g. with: \fBread xenv < <(x11docker \-\-printenv x11docker/check\fR) .
Optional argument \fIFILE\fR allows to print the information into a file.
.TP
\fB\-\-printenv\fR [=\fIFILE\fR]
Print variables to access new display.
.TP
\fB\-\-printid\fR [=\fIFILE\fR]
Print container ID.
.TP
\fB\-\-printinfofile\fR [=\fIFILE\fR]
Print path to internal x11docker info storage.
.TP
\fB\-\-printpid1\fR [=\fIFILE\fR]
Print host PID of container PID 1.
.SS "Verbosity options"
.TP
\fB\-D\fR, \fB\-\-debug\fR
Enable rigorous error control and show some debug output.
.TP
\fB\-\-printcheck\fR
Show dependency check messages.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Suppress x11docker terminal messages.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Be verbose. Output of x11docker.log on stderr.
.TP
\fB\-V\fR
Be verbose with colored output.
.SS "Cleanup options (might need root permissions)"
.TP
\fB\-\-cleanup\fR
Clean up orphaned containers and cache files. Those
can remain if x11docker still runs on system shutdown.
Terminates currently running x11docker containers, too.
Regards (only) option \fB\-\-backend\fR=\fI\,BACKEND\/\fR.
.SS "Installation options (need root permissions)"
These options might not be available in packaged versions of x11docker.
.TP
\fB\-\-install\fR
Install x11docker from current folder.
Useful to install from an extracted zip file.
.TP
\fB\-\-update\fR [=\fBdiff\fR]
Download and install latest release from github.
.TP
\fB\-\-update\-master\fR [=\fBdiff\fR]
Download and install latest master version.
Optional argument \fBdiff\fR shows the difference between
installed and new version without installing it.
.TP
\fB\-\-remove\fR
Remove x11docker from your system. Includes \fB\-\-cleanup\fR.
Preserves \fI~/.local/share/x11docker\fR from option \fB\-\-home\fR.
.TP
\fB\-\-remove-oldprefix\fR
Before version 7.6.0 x11docker installed itself
into /usr/bin. Now it installs into /usr/local/bin.
Use --remove-oldprefix to remove /usr/bin installations.
.SH "DEPENDENCIES"
Package names and further optional dependencies:
.br
https://github.com/mviereck/x11docker/wiki/Dependencies
.SS "Dependencies on host:"
.IP
For core functionality x11docker only needs bash, an X server and one of
docker, podman or nerdctl.
Depending on chosen options x11docker might need some additional tools.
It checks for them on startup and shows messages if some are missing.
.IP
* Most recommended: Provide image \fBx11docker/xserver\fR to run X or Wayland
in container. The image contains all X related dependencies.
.IP
Otherwise provide on host:
.IP
* Recommended to allow security and convenience:
.br
X servers: some of: \fBnxagent xpra Xephyr Xorg\fR
.br
Tools: all of: \fBxauth xclip xrandr xhost xinit catatonit\fR
.IP
* Additionally for advanced GPU support: \fBweston Xwayland xpra xdotool\fR
.SS "Dependencies in image:"
.IP
No dependencies in image except for a few feature options. Most important:
.TP
\fB\-\-gpu\fR:
OpenGL/MESA packages, collected often in \fBmesa\-utils\fR package.
.br
For closed source NVIDIA support look at https://github.com/mviereck/x11docker/wiki/NVIDIA-driver-support-for-docker-container
.HP
\fB\-\-pulseaudio\fR: Needs \fBpulseaudio\fR on host and pulseaudio client libs in image.
.HP
\fB\-\-printer\fR: Needs \fBcups\fR on host and cups client libs in image.
.SH "EXIT CODES"
.TP
\fB0\fR
Success
.TP
\fB64\fR
x11docker error
.TP
\fB130\fR
Terminated by ctrl\-c
.TP
\fIother\fR
Exit code of command in container
.SH "EXAMPLES"
FVWM window manager:
.RS 2
\fBx11docker --desktop x11docker/fvwm\fR
.RE
Xfce desktop:
.RS 2
\fBx11docker --desktop x11docker/xfce\fR
.RE
Accelerated glxspheres:
.RS 2
\fBx11docker --gpu x11docker/check glxspheres64\fR
.RE
Kodi media center with hardware acceleration, pulseaudio sound, shared Videos folder and persistent HOME:
.RS 2
\fBx11docker --gpu --pulseaudio --home --share=~/Videos erichough/kodi\fR
.RE
Firefox with shared Downloads folder and internet access:
.RS 2
\fBx11docker -I --share $HOME/Downloads -- --tmpfs /dev/shm -- jess/firefox\fR
.SH "AUTHOR"
Written by Martin Viereck, Germany.
.SH "REPORTING BUGS"
Please report issues and get help at:
.br
https://github.com/mviereck/x11docker/issues
.SH "COPYRIGHT"
x11docker is published under the MIT licence. Check the output of \fBx11docker --licence\fR .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
Further documentation at:
.br
https://github.com/mviereck/x11docker
.br
https://github.com/mviereck/x11docker/wiki