Tag Archives: Using GCP copy to report errors

[Solved] Using GCP copy to report errors in Linux: DBUS. Exceptions. Dbusexception: org. Freedesktop. DBUS. Error. Notsupported:

1 Error when using gcp copy in linux
Error reported when using gcp copy in Linux.dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

zhihui@zhihui-MS-7B46:~/shl_proj/1_project$ cp -r /media/zhihui/sd/shl_dataset/ ./
Traceback (most recent call last):
  File "/usr/bin/gcp", line 678, in <module>
    gcp = GCP()
  File "/usr/bin/gcp", line 190, in __init__
    sessions_bus = dbus.SessionBus()
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
zhihui@zhihui-MS-7B46:~/shl_proj/1_project$ vim ~/.bashrc 

2 solutions

1. Modify the ~ /. Bashrc file and add the following

alias cp='dbus-launch gcp'

2. Let the changes take effect

source ~/.bashrc

Then try copying it again!