Bug 107995

Summary: Weird back-quoting in xdg-utils-common.in
Product: Portland Reporter: Alexander Larsson <alexl>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Alexander Larsson 2018-09-20 07:41:01 UTC
This code in xdg-utils-common.in seems weird:
https://github.com/freedesktop/xdg-utils/blob/master/scripts/xdg-utils-common.in#L317

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
YES

But, why?
Comment 1 GitLab Migration User 2019-02-16 13:40:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/134.

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.