blob: 0edbfbfc20f0f7b6bdd967121e27c025133ad5af [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001#!/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
14if [ -e /etc/X11/xserver-common ] ; then
15 . /etc/X11/xserver-common
16 if [ ! -e $XSERVER ] ; then
17 XSERVER=$(which $XSERVER)
18 fi
19fi
20
21if [ -n "$DPI" ] ; then
22 ARGS="$ARGS -dpi $DPI"
23fi
24
25exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*