Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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 $* |