[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#297006: startx: let Xsession handle custom clients



Package: xbase-clients
Version: 4.3.0.dfsg.1-12.0.1
Severity: wishlist
Tags: patch

Xsession provides more customisable handling of user arguments to
startx. While a non-path client argument is conventionally passed to
the terminal emulator started by default (and thus cannot be
influenced), there is no real reason to let xinit start a client
specified by a full path when Xsession does a better job (and
handles errors more gracefully).

Please consider the attached patch, which causes path client
arguments to be passed to Xsession (via xinitrc) instead of having
xinit invoke them directly.

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.10-9-amd64-k8
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

-- 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
--- startx.orig	2005-02-26 12:45:58.000000000 +0100
+++ startx	2005-02-26 13:10:02.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -x
 
 # $Xorg: startx.cpp,v 1.3 2000/08/17 19:54:29 cpqbld Exp $
 #
@@ -51,11 +51,7 @@
     # '' required to prevent cpp from treating "/*" as a C comment.
     /''*|\./''*)
 	if [ "$whoseargs" = "client" ]; then
-	    if [ x"$clientargs" = x ]; then
-		client="$1"
-	    else
-		clientargs="$clientargs $1"
-	    fi
+		client="$defaultclientargs $1"
 	else
 	    if [ x"$serverargs" = x ]; then
 		server="$1"
@@ -64,6 +60,10 @@
 	    fi
 	fi
 	;;
+    failsafe|default)
+	# let /etc/X11/Xsession handle failsafe and default mode
+	xsession_mode=$1
+	;;
     --)
 	whoseargs="server"
 	;;
@@ -89,6 +89,9 @@
     # if no client arguments either, use rc file instead
     if [ x"$clientargs" = x ]; then
 	client="$defaultclientargs"
+	if [ -n "$xsession_mode" ]; then
+		clientargs="$xsession_mode $clientargs"
+	fi
     else
 	client=$defaultclient
     fi

Attachment: signature.asc
Description: Digital signature


Reply to: