fvwmorg/fvwm3

line continuation broken in fvwm3 1.1.2 ??

Closed this issue · 4 comments

Thanks for reporting your bug here! The following template will help with
giving as much information as possible so that it's easier to diagnose and
fix.

Upfront Information

Please provide the following information by running the command and providing
the output.

  • Fvwm3 version (run: fvwm3 --version)

fvwm3 1.1.2 (released)
with support for: XPM, PNG, SVG, Shape, XShm, SM, Bidi text, XRandR, XRender, XCursor, XFT, XFixes, NLS

  • Linux distribution or BSD name/version

Slackware64 15.0

  • Platform (run: uname -sp)

Linux AMD Ryzen 7 4700U with Radeon Graphics

Expected Behaviour

What were you trying to do? Please explain the problem.

In my config file I have a line in a menu like this:

  • "somehost" Exec exec my-xterm -ut -sl 2000 -bg "#125050"
    -n somehost -e ssh somehost -Y

where my-xterm is a program which does some stuff and opens my favourite terminal emulator. In fvwm3 1.1.1 and back into prehistoric times this worked.

Actual Behaviour

What should have happened, but didn't?

It should have opened a terminal, but it didn't. Because "my-term" only got the args from the first line (including the '') but not the needed args from the second line.

Enabling logging

fvwm3 has a means of logging what it's doing. Enabling this when
reproducing the issue might help. To do this, either change the means fvwm3
is started by adding -v as in:

fvwm3 -v

or, once fvwm3 has loaded, send SIGUSR2 as in:

pkill -USR2 fvwm3

The resulting logfile can be found in $HOME/.fvwm/fvwm3-output.log

Nothing relevant in there.

Steps to Reproduce

How can the problem be reproduced? For this, the following is helpful:

  • Reduce the problem to the smallest fvwm configuration example (where
    possible). Start with a blank config file (fvwm3 -f/dev/null) and go from
    there.

Put
DestroyMenu Other_Hosts
AddToMenu Other_Hosts
above the above two lines.

  • Does the problem also happen with Fvwm2?

Nope. Nor even fvwm3 1.1.1.

Include your configuration with this issue.

Does Fvwm3 crash?

Nope.

  • Anything else we should know?

I didn't see anything in the changelog about invalidating continuation lines. (Did I miss that?)

Given the lack of other complaints about this, I am wondering if it is a problem specific to my build. For what it is worth, this is the build script for fvwm3 1.1.2 that I used:

#!/bin/bash

Slackware build script for fvwm3

Copyright 2020-2024, Alexander Verbovetsky, Moscow, Russia

Copyright 2024-2025, K. Eugene Carlson, Tsukuba, Japan

All rights reserved.

Redistribution and use of this script, with or without modification, is

permitted provided that the following conditions are met:

1. Redistributions of this script must retain the above copyright

notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED

WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO

EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,

PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;

OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,

WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR

OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF

ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=fvwm3
VERSION=${VERSION:-1.1.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi

if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION

rename perl libraries to avoid collisions with the stock fvwm

borrowed from ALT Linux

https://git.altlinux.org/gears/f/fvwm3.git?a=blob_plain;f=0001-rename-perl-fvwm.patch

KEC: Replaced previous to accommodate meson (2024-12-01)

zcat $CWD/renames.patch.gz | patch -p0

fix references to renamed man pages and binaries

zcat $CWD/config-renames.patch.gz | patch -p0

mv perllib/FVWM perllib/FVWM3
mv perllib/General perllib/FVWM3General

(
cd doc
for adoc in $(find . -type f -name "Fvwm") ; do
mv $adoc $(echo $adoc | sed -e 's|Fvwm|Fvwm3|')
done
for adoc in $(find . -type f -name "fvwm-") ; do
mv $adoc $(echo $adoc | sed -e 's|fvwm|fvwm3|')
done
)

chown -R root:root .
find -L .
( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555
-o -perm 511 ) -exec chmod 755 {} ; -o
( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444
-o -perm 440 -o -perm 400 ) -exec chmod 644 {} ;

PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
export PYTHONPATH=/opt/python$PYVER/site-packages

mkdir build
(
cd build

CFLAGS="$SLKCFLAGS"
CXXFLAGS="$SLKCFLAGS"
meson setup
--prefix=/usr
--libdir=/usr/lib${LIBDIRSUFFIX}
--sysconfdir=/etc
--localstatedir=/var
--mandir=/usr/man
--buildtype=release
-Ddocdir=/usr/doc/$PRGNAM-$VERSION
-Dmandoc=true

"${NINJA:=ninja}"
DESTDIR=$PKG $NINJA install
)

rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la

zcat $CWD/startfvwm3.gz > $PKG/usr/bin/startfvwm3
chmod 755 $PKG/usr/bin/startfvwm3

mkdir -p $PKG/etc/X11/xinit
zcat $CWD/xinitrc.fvwm3.gz > $PKG/etc/X11/xinit/xinitrc.fvwm3
chmod 755 $PKG/etc/X11/xinit/xinitrc.fvwm3

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

find $PKG/usr/man -type f -exec gzip -9 {} ;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.md COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

The formatting of this issue is hard to read, and has a lot of unneeded information.

In my config file I have a line in a menu like this:

  • "somehost" Exec exec my-xterm -ut -sl 2000 -bg "#125050"
    -n somehost -e ssh somehost -Y

This really isn't a valid fvwm configuration line, and in order to do line extension you need to have a \ at the end of the line. I have tested the following file.

Exec \
  exec \
  xterm

I am able to get an xterm to launch just fine, so line continuation is working as it is suppose to. Please provide the actual configuration line that you think is broken. I think you are just missing the \ to continue the line.

Oh Wait you said a menu, that makes the configuration make more sense, you are still missing a \. In the future provide the full menu configuration and double check that it is formatted correctly using markdown. The following menu with multiple lines work just fine for me.

DestroyMenu TestMenu
AddToMenu   TestMenu
+ "Test" \
  Exec \
  exec \
  xterm
+ "Test2" \
  Exec \
  exec \
  firefox
+ "Test3" \
  Exec \
  exec \
  gvim

So it appears to be a syntax error on your end. If you want a line to continue to the next line, you must end it with a \ character just like a shell script.

Sorry about the bad formatting.

Indeed, I do have a \ at the end of the line, and the fact that it isn't working is the part that confuses me.