Bug 107995 - Weird back-quoting in xdg-utils-common.in
Summary: Weird back-quoting in xdg-utils-common.in
Status: NEW
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Portland Bugs
QA Contact:
Depends on:
Reported: 2018-09-20 07:41 UTC by Alexander Larsson
Modified: 2018-09-20 07:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Larsson 2018-09-20 07:41:01 UTC
This code in xdg-utils-common.in seems weird:

copied here:

 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;

Why are we running dbus-send and then executing its output, after having sent it to /dev/null.

It seems to get the right result:

$ if `false > /dev/null`; then echo YES; fi
$ if `true > /dev/null`; then echo YES; fi

But, why?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.