Skip to content

Commit

Permalink
x11/xdm: Use $LOCALBASE/etc/xdm/Xservers as base for Xserver args
Browse files Browse the repository at this point in the history
Hard coding Xserver args forces people to invoke xdm through init
by placing an entry in /etc/ttys when Xserver args different from
those hardcoded in rc.d/xdm are desired. Instead glean arguments
from $LOCALBASE/etc/xdm/Xservers, defaulting to the hardcoded
entry if none are found for :0.

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D42097
  • Loading branch information
cschuber committed Oct 11, 2023
1 parent 5752faa commit 0c72567
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x11/xdm/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xdm
PORTVERSION= 1.1.14
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11

MAINTAINER= x11@FreeBSD.org
Expand Down
6 changes: 5 additions & 1 deletion x11/xdm/files/xdm.in
Expand Up @@ -38,7 +38,11 @@ xdm_set_vty()
{
# X views vt as starting at 01, not ttyv0
vtarg=`printf vt%02d $((${xdm_tty#ttyv} + 1))`
command_args="-server \":0 local %%LOCALBASE%%/bin/X :0 $vtarg\""
xserver_args=$(grep '^:0' %%LOCALBASE%%/etc/X11/xdm/Xservers)
if [ $? -ne 0 ]; then
xserver_args=":0 local %%LOCALBASE%%/bin/X :0"
fi
command_args="-server \"$xserver_args $vtarg\""
}

run_rc_command $1

0 comments on commit 0c72567

Please sign in to comment.