From 3c62e3bb95ada22df78e192b84669a7fa239cd5d Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 4 Aug 2009 10:14:29 +0000 Subject: [PATCH] Adding option to xlaunch to terminate X server after original client closes connection svn path=/nixpkgs/trunk/; revision=16575 --- pkgs/tools/X11/xlaunch/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/X11/xlaunch/default.nix b/pkgs/tools/X11/xlaunch/default.nix index 33e83e3c8494..41dfca2f2c9d 100644 --- a/pkgs/tools/X11/xlaunch/default.nix +++ b/pkgs/tools/X11/xlaunch/default.nix @@ -37,7 +37,12 @@ EOF _display=\${_display:-:0} _display=\${_display#:} echo Using :\$_display - XCMD=\"\$(egrep \"^env\" /etc/event.d/xserver | sed -e \"s/env/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ -noreset )\" + if [ -n \"\$DO_X_RESET\" ]; then + RESET_OPTION=\"-once\" + else + RESET_OPTION=\"-noreset\" + fi; + XCMD=\"\$(egrep \"^env\" /etc/event.d/xserver | sed -e \"s/env/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ \$RESET_OPTION )\" echo \"\$XCMD\" echo \"\$XCMD\" | bash & while ! test -e /tmp/.X11-unix/X\$_display &>/dev/null ; do sleep 0.5; done