diff options
Diffstat (limited to 'meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver')
-rw-r--r-- | meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver new file mode 100644 index 0000000000..0edbfbfc20 --- /dev/null +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This script is only needed to make sure /etc/X11/xserver-common | ||
4 | # can affect XSERVER, ARGS & DPI: otherwise systemd could just use | ||
5 | # /etc/default/xserver-nodm as EnvironmentFile and sysvinit could just | ||
6 | # source the same file | ||
7 | |||
8 | . /etc/profile | ||
9 | |||
10 | # load default values for XSERVER, ARGS, DISPLAY... | ||
11 | . /etc/default/xserver-nodm | ||
12 | |||
13 | # Allow xserver-common to override ARGS, XSERVER, DPI | ||
14 | if [ -e /etc/X11/xserver-common ] ; then | ||
15 | . /etc/X11/xserver-common | ||
16 | if [ ! -e $XSERVER ] ; then | ||
17 | XSERVER=$(which $XSERVER) | ||
18 | fi | ||
19 | fi | ||
20 | |||
21 | if [ -n "$DPI" ] ; then | ||
22 | ARGS="$ARGS -dpi $DPI" | ||
23 | fi | ||
24 | |||
25 | exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* | ||