On 04/24/18 17:10, IL Ka wrote:
Hello,

There are 2 separate places with fvwm hardcoded in Xenocara:
1) xinitrc (used by xinit/startx)
2) Xsession (used by xenodm)

xinit's configure.ac has separate setting for it, so I
added same setting for xenodm configure.ac, recreated configure script
and extracted setting to config.site.

One can now change fvwm to cwm in config.site, and rebuild X11.

I also have an idea (not implemented yet) to have soft link
(i.e. /etc/X11/wm) and use it in both scripts.

We can then add step to sys/distrib/miniroot/install.sub
that asks user if she wants to have {fvwm,cwm,twm} and create
approprite link.
So, one may choose window manager as part of installation process
and have it for xenodm and startx.

diff --git app/xenodm/config/Xsession.in app/xenodm/config/Xsession.in
index 1a1b6ab2..f840c888 100644
--- app/xenodm/config/Xsession.in
+++ app/xenodm/config/Xsession.in
@@ -71,6 +71,6 @@ else
                 @XRDB_PROGRAM@ -load "$resources"
         fi
         @bindir@/xterm &
-       @bindir@/fvwm
+       @bindir@/@WM@
  fi
  do_exit
diff --git app/xenodm/configure app/xenodm/configure
index 1686d7e2..04c0873a 100755
--- app/xenodm/configure
+++ app/xenodm/configure
@@ -672,6 +672,7 @@ XENODM_CFLAGS
  SHELL_CMD
  WTMP_FILE
  UTMP_FILE
+WM
  DEFAULTVT
  XENODMLOGDIR
  XENODMSCRIPTDIR
@@ -843,6 +844,7 @@ with_xenodmconfigdir
  with_xenodmscriptdir
  with_logdir
  with_default_vt
+with_wm
  with_utmp_file
  with_wtmp_file
  with_color_pixmap
@@ -1553,6 +1555,7 @@ Optional Packages:
                            (default=/var/log)
    --with-default-vt=<vtname>
                            specify default vt to start xenodm on
(default=none)
+  --with-wm=WM            Path to default window manager
    --with-utmp-file=<pathname>
                            specify file to pass to sessreg -u for current
                            logins
@@ -18809,6 +18812,16 @@ fi



+
+# Check whether --with-wm was given.
+if test "${with_wm+set}" = set; then :
+  withval=$with_wm; WM="$withval"
+else
+  WM="fvwm"
+fi
+
+
+
  # Ideally we'd just pull out UTMP_FILE & WTMP_FILE from <utmp.h>
  # but that's not easy to do in autoconf

diff --git app/xenodm/configure.ac app/xenodm/configure.ac
index 76702564..45a0ff40 100644
--- app/xenodm/configure.ac
+++ app/xenodm/configure.ac
@@ -93,6 +93,12 @@ AC_ARG_WITH(default-vt,
         [DEFAULTVT="$withval"], [[DEFAULTVT=""]])
  AC_SUBST(DEFAULTVT)

+AC_ARG_WITH(wm,
+        AS_HELP_STRING([--with-wm=WM], [Path to default window manager]),
+        [WM="$withval"],
+        [WM="fvwm"])
+AC_SUBST(WM)
+
  # Ideally we'd just pull out UTMP_FILE & WTMP_FILE from <utmp.h>
  # but that's not easy to do in autoconf
  AC_ARG_WITH(utmp_file,
diff --git etc/config.site etc/config.site
index 2681f486..b3223582 100644
--- etc/config.site
+++ etc/config.site
@@ -27,3 +27,4 @@
ac_cv_prog_lex_yytext_pointer=${ac_cv_prog_lex_yytext_pointer=yes}
  ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
  lt_cv_sys_max_cmd_len=${lt_cv_sys_max_cmd_len=131072}
  lt_cv_path_SED=${lt_cv_path_SED=/usr/bin/sed}
+with_wm=fvwm

Or one could read the FAQ and copy xinitrc to .xinitrc (or Xsession to .xsession) in their home directory and use vi to add their preferred window manager?

Reply via email to