apport sometimes prints "Cannot open display" when run over ssh
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xorg (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
repro:
Try to login to a machine which is standing at GDM and then run apport-collect.
Doing exactly that is a critically important use case for xorg crashes because if you login the xorg.log gets reset and whatever was in xorg.log.old is permanently lost.
Maybe this bug only affects the xorg hook for apport (not sure?)
mnemo@zueco:~$ apport-collect 368049
Logging into Launchpad...
The authorization page (https:/
Downloading bug...
Bug title: compiz crashes gnome desktop using default ati driver (radeon X600)
Collecting apport information for source package xserver-
Can't open display
xdpyinfo: unable to open display "".
Error: unable to open display
Cannot open display "default display"
No protocol specified
Error: Cannot open display ":0"
Uploading additional information to Launchpad bug...
short text data...
attachment: Dependencies.txt...
attachment: LsHal.txt...
attachment: LsMod.txt...
attachment: LsPci.txt...
attachment: XorgConf.txt...
attachment: XorgLog.txt...
attachment: XorgLogOld.txt...
attachment: system.txt...
This actually comes from xorg's package hook. I guess there's no way around having $DISPLAY set for some commands, but maybe it can be quiesced a bit. Something like this, perhaps:
if os.environ. get('DISPLAY' ):
# do commands which need $DISPLAY
# do commands which don't need $DISPLAY