Bug 4492 - A mistake in openbox-gnome-session script
Status: RESOLVED FIXED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: 3.4.10
Hardware: PC Linux
: P3 minor
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2010-01-12 12:18 EST by Eugene
Modified: 2010-01-24 00:08:42 EST
1 user (show)

See Also:



Description Eugene 2010-01-12 12:18:47 EST
<...>
# make sure openbox is going to be run
if test -z "$SESSION"; then
  # if its empty then just run openbox
  SESSION="[openbox]"
elif test -z $(echo "$SESSION" | grep -q openbox); then
  # if openbox isn't in the session then append it
  SESSION="${SESSION%]},openbox]"
fi
<...>

`grep -q' never prints anything, so `test -z $(...)' will always evaluate to "true"
Comment 1 Dana Jansens 2010-01-12 14:01:31 EST
thanks! fixed in git commit 8d3f5d97b6c483896beb83df966fc14575c325f2
Comment 2 Miroslav Lichvar 2010-01-21 08:36:56 EST
This still doesn't seem to work correctly. The return value from grep needs to be inverted.

-  elif echo "$SESSION" | grep -q openbox; then
+  elif ! echo "$SESSION" | grep -q openbox; then
Comment 3 Dana Jansens 2010-01-24 00:08:42 EST
oh gosh, yes.  thank you.