=== modified file 'bin/apport-bug'
--- bin/apport-bug 2014-07-10 15:10:30 +0000
+++ bin/apport-bug 2015-02-06 07:18:55 +0000
@@ -41,11 +41,11 @@
export APPORT_INVOKED_AS="$0"
# check for X
-if [ -z "$DISPLAY" ]; then
+if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" ]; then
if [ -n "$CLI" ] ; then
$CLI "$@"
else
- echo "\$DISPLAY is not set. You need apport-cli to make this program work." >&2
+ echo "Neither \$DISPLAY nor \$WAYLAND_DISPLAY is set. You need apport-cli to make this program work." >&2
exit 1
fi
=== modified file 'gtk/apport-gtk'
--- gtk/apport-gtk 2014-10-29 20:35:30 +0000
+++ gtk/apport-gtk 2015-02-06 07:17:30 +0000
@@ -25,6 +25,8 @@
from apport import unicode_gettext as _
import apport.ui
+have_display = os.environ.get('DISPLAY') or os.environ.get('WAYLAND_DISPLAY')
+
def find_xid_for_pid (pid):
'''Return the X11 Window (xid) for the supplied process ID.'''
@@ -552,7 +554,7 @@
if not command:
# test mode
- return 'DISPLAY' in os.environ and program is not None
+ return have_display and program is not None
subprocess.call([program, '-e', command])
@@ -583,7 +585,7 @@
return True
if __name__ == '__main__':
- if not os.environ.get('DISPLAY'):
+ if not have_display:
apport.fatal('This program needs a running X session. Please see "man apport-cli" for a command line version of Apport.')
app = GTKUserInterface()
app.run_argv()