Cannot autolaunch D-Bus without X11 $DISPLAY

Read this post if you want to solve the ‘Cannot autolaunch D-Bus without X11 $DISPLAY’ error when attempting to login to AWSECR and Docker. This error occurs after you use the AWSECRget-login-password command.

Here is an example of the error:

Error saving credentials: error storing credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY

In addition, you can this error after using the following command:

aws ecr get-login-password | docker login --username AWS --password-stdin

The expected result should be the normal docker login prompt which says:

Login Succeeded.

What is AWS ECR get-login-password?

The AWS ECR get-login-password command retrieves and prints a password that can be used to authenticate to any Amazon ECR registry.

You must ensure that your IAM credential has access to do this before using it.

Also, note that the password is only valid for 12 hours after running the AWS ECR get-login-password command.

What is D-Bus and X11 ?

D-BUS is an interprocess communication system allowing applications to talk to one another.

X11 is a network protocol designed to enable remote graphical access through an SSH client.

The Solution

The error can be solved when you run the following command:

apt install gnupg2 pass

This command will install the x11-common as well as the libice6, libsm6, libxmu6, libxt6, xclip and some additional gnupg2 libraries.

You should now have solved the ‘Cannot autolaunch D-Bus without X11 $DISPLAY’ error!

About Anto

Hi, my name is Anto! I am a cloud computing hobbyist! Give me anything to do with the cloud, and I am interested. I work for a Cloud computing company by day and as a Cloud computing hobbyist by night! My projects use PHP, NodeJs, Ubuntu, MySQL and of course Amazon Web Services. Hopefully, my blog aids your cloud journey! Feel free to post a comment and share your thoughts.

View all posts by Anto →

Leave a Reply

Your email address will not be published. Required fields are marked *