Index: scripts/Makefile.am =================================================================== --- scripts/Makefile.am (revision 13880) +++ scripts/Makefile.am (working copy) @@ -1,41 +1,54 @@ -scripts= \ - xfterm4 \ - xflock4 \ - xfmountdev4 +scripts = \ + xflock4 \ + xfmountdev4 -bin_SCRIPTS= \ - $(scripts) \ - xfbrowser4 \ - startxfce4 \ - xfhelp4 +bin_SCRIPTS = \ + $(scripts) \ + xfbrowser4 \ + xfterm4 \ + startxfce4 \ + xfhelp4 # cannot be set from configure, because ${prefix} is not expanded edit = sed \ -e 's,@datadir\@,$(datadir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' \ - -e 's,@BROWSER_DEFAULT\@,@BROWSER_DEFAULT@,g' + -e 's,@BROWSER_DEFAULT\@,@BROWSER_DEFAULT@,g' \ + -e 's,@TERMINAL_DEFAULT\@,@TERMINAL_DEFAULT@,g' xfbrowser4: Makefile $(srcdir)/xfbrowser4.in rm -f xfbrowser4 xfbrowser4.tmp - $(edit) $(srcdir)/xfbrowser4.in >xfbrowser4.tmp + $(edit) $(srcdir)/xfbrowser4.in > xfbrowser4.tmp mv xfbrowser4.tmp xfbrowser4 +xfterm4: Makefile $(srcdir)/xfterm4.in + rm -f xfterm4 xfterm4.tmp + $(edit) $(srcdir)/xfterm4.in > xfterm4.tmp + mv xfterm4.tmp xfterm4 + startxfce4: Makefile $(srcdir)/startxfce4.in rm -f startxfce4 startxfce4.tmp - $(edit) $(srcdir)/startxfce4.in >startxfce4.tmp + $(edit) $(srcdir)/startxfce4.in > startxfce4.tmp mv startxfce4.tmp startxfce4 xfhelp4: Makefile $(srcdir)/xfhelp4.in rm -f xfhelp4 xfhelp4.tmp - $(edit) $(srcdir)/xfhelp4.in >xfhelp4.tmp + $(edit) $(srcdir)/xfhelp4.in > xfhelp4.tmp mv xfhelp4.tmp xfhelp4 -conffilesdir=@sysconfdir@/xdg/xfce4 -conffiles_DATA=\ +conffilesdir = @sysconfdir@/xdg/xfce4 + +conffiles_DATA = \ xinitrc -EXTRA_DIST = $(scripts) $(conffiles_DATA) startxfce4.in xfhelp4.in +EXTRA_DIST = \ + $(scripts) \ + $(conffiles_DATA) \ + xfbrowser4.in \ + xfterm4.in \ + startxfce4.in \ + xfhelp4.in distclean-local: - rm -f xfhelp4 startxfce4 xfbrowser4 + rm -f xfhelp4 startxfce4 xfterm4 xfbrowser4 Index: scripts/xfterm4.in =================================================================== --- scripts/xfterm4.in (revision 0) +++ scripts/xfterm4.in (revision 0) @@ -0,0 +1,110 @@ +#!/bin/sh + +# Copyright (C) 2003-2005 The Xfce development team +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# Xfterm script revised in order to make it easier to expand and to be +# more compatible with applications such as gnome-terminal + +if [ "x$TERMCMD" = "x" ]; then + for term in @TERMINAL_DEFAULT@ Terminal gnome-terminal xterm kterm + do + if which "$term" > /dev/null 2>&1 ; then + TERMCMD=$term + break; + fi + done +fi + +if [ "x$TERMCMD" = "x" ]; then + echo " *** Error ***: xfterm4: Could not find terminal to use." + echo " Please set the TERMCMD variable." + exit 1 +fi + +if [ "$1" = "-e" ]; then + if [ -n "$2" ]; then + ESTRING="$2" + shift; shift + else + shift + fi +fi + +# Add an entry for your own strange non-standard xterm replacement here +case "$TERMCMD" in + "powershell") + EXEC="--execute=" + # The following doesn't seem to work, but it's the best + # equivalent to a title switch powershell has + TITLE="--name=" + ;; + "gnome-terminal"|"gnome2-terminal"|"Terminal"|"terminal"|"xterminal") + EXEC="-x " + TITLE="--title " + ;; + "Eterm") + EXEC="-e " + TITLE="-T " + ;; + *) + EXEC="-e " + TITLE="-title " + ;; +esac + +if [ ! "x$ESTRING" = "x" ]; then + TSTRING="$ESTRING" +elif [ "x$1" = "x" ]; then + TSTRING="Terminal" + ESTRING="" + unset EXEC +elif [ -d "$*" ]; then + cd "$*" + TSTRING="Terminal" + ESTRING="" + unset EXEC +elif [ -x "$*" ]; then + cd `dirname "$*"` + TSTRING=`basename "$*"` + ESTRING="`which pauseme`" + MSTRING="$*" +elif [ -f "$*" ]; then + TSTRING="Viewing $*" + ESTRING="`which less`" + MSTRING="$*" +elif [ "`echo $* | grep "http:/"`" -o "`echo $* | grep "ftp:"`" ]; then + # This requires lynx. If you don't have it, don't drop URLs. + TSTRING="Lynx: $*" + ESTRING="`which lynx`" + MSTRING="$*" +else + exec $TERMCMD $@ +fi + +# Ugly, why can't they just make all terms work the same way? +# Note that you cannot feed this script with a text file which +# contains spaces in its name and/or path if your $TERMCMD = powershell +if [ "$TERMCMD" = "powershell" ]; then + exec $TERMCMD $TITLE"$TSTRING" $EXEC"$ESTRING $MSTRING" +elif [ "x$MSTRING" = "x" ]; then + exec $TERMCMD $TITLE"$TSTRING" $EXEC$ESTRING +else + exec $TERMCMD $TITLE"$TSTRING" $EXEC$ESTRING "$MSTRING" +fi + +exit 0 Index: configure.ac =================================================================== --- configure.ac (revision 13880) +++ configure.ac (working copy) @@ -48,6 +48,15 @@ AC_SUBST([BROWSER_DEFAULT]) AC_MSG_RESULT([$with_browser]) +dnl Check for default terminal to use +AC_MSG_CHECKING([what terminal to use by default]) +AC_ARG_WITH([terminal], +AC_HELP_STRING([--with-terminal=TERMINAL], [What should be the default terminal?]), + [], [with_terminal=""]) +TERMINAL_DEFAULT=$with_terminal +AC_SUBST([TERMINAL_DEFAULT]) +AC_MSG_RESULT([$with_terminal]) + dnl enable GDM-specific startup files? AC_MSG_CHECKING([whether to install GDM specific files]) AC_ARG_ENABLE([gdm],