! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Patch] Non-POSIX compliant test used in startxfce4 (uses #!/bin/sh), prevent...
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description seejay.11 2014-04-18 01:54:23 CEST
Created attachment 5438 
patch generated by git diff

The command line arguments "--help" and "--with-ck-launch" can't be used on systems which have a non-bash /bin/sh (e.g. Debian, as far as I'm aware). This is due to the use of "==" instead of "=" in test commands, which is a bash extension.

I discovered this with the "checkbashisms" perl script while switching my /bin/sh from bash to dash on Arch.

To verify (with dash installed):

DISPLAY=invalid  # Avoid actually launching xfce; this should prevent it
dash "$(which startxfce4)" --help

It should output usage information, but what it actually outputs is the following:

/usr/bin/startxfce4: 27: test: x--help: unexpected operator
/usr/bin/startxfce4: 40: test: x--help: unexpected operator
/usr/bin/startxfce4: X server already running on display invalid
xrdb: Can't open display 'invalid'
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.

Bug #10828

Reported by:
seejay.11
Reported on: 2014-04-18
Last modified on: 2014-08-29

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Version:
Unspecified

Attachments

patch generated by git diff (585 bytes, patch)
2014-04-18 01:54 CEST , seejay.11
no flags

Additional information