Assign Builder Environment Variable?

Asked by M.Hanny Sabbagh on 2019-08-18

I have an issue in building a package on Launchpad, the error message is:

"Failed to connect to D-Bus: Cannot autolaunch D-Bus without X11 $DISPLAY"

Which seems to me that I need to define $DISPLAY variable on the build machine, but how can I do it in Launchpad? I mean, in the build log, there's a section like this:

User Environment
----------------
APT_CONFIG=/var/lib/sbuild/apt.conf
DEB_BUILD_OPTIONS=noautodbgsym parallel=4
HOME=/sbuild-nonexistent
....

And I want to add a DISPLAY variable in there, is there a way to do this?

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
2019-08-18
Last reply:
2019-08-22
Colin Watson (cjwatson) said : #1

You can export whatever variables you like in debian/rules.

However, just setting DISPLAY won't help you, because you won't have a running X server to talk to. Rather than setting DISPLAY, I think you want to run the relevant bit of the build inside dbus-run-session. See "man dbus-run-session" for more information.

Can you help with this problem?

Provide an answer of your own, or ask M.Hanny Sabbagh for more information if necessary.

To post a message you must log in.