Docker login Fails with error message "Error saving credentials: `Cannot autolaunch D-Bus without X11 $DISPLAY`"

The above mentioned issue is for centos/Rhel. Not ubuntu/debian.