aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
blob: 0edbfbfc20f0f7b6bdd967121e27c025133ad5af (plain)
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
#!/bin/sh

# This script is only needed to make sure /etc/X11/xserver-common
# can affect XSERVER, ARGS & DPI: otherwise systemd could just use
# /etc/default/xserver-nodm as EnvironmentFile and sysvinit could just
# source the same file

. /etc/profile

# load default values for XSERVER, ARGS, DISPLAY...
. /etc/default/xserver-nodm

# Allow xserver-common to override ARGS, XSERVER, DPI
if [ -e /etc/X11/xserver-common ] ; then
    . /etc/X11/xserver-common
    if [ ! -e $XSERVER ] ; then
        XSERVER=$(which $XSERVER)
    fi
fi

if [ -n "$DPI" ] ; then
    ARGS="$ARGS -dpi $DPI"
fi

exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*