Skip to content

Cannot "Drag and Drop" Folders or Files #159

Closed

Description

@dhasial

Expected behaviour:
Drag a file/folder icon and drop it onto Terminator to be able to enter the directory path in Terminator's buffer.

Steps to reproduce:
Open terminator in terminal (meta) in order to get the debug output. Then open any file browser and attempt to drag the icon and drop it into Terminator. Get the following error message in the terminal you opened terminator in (still meta).

TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/terminatorlib/terminal.py", line 1122, in on_drag_data_received txt = txt.split('\n')[0] TypeError: a bytes-like object is required, not 'str'

Activity

  1. dugb commented on Jul 6, 2020

    @dugb

    I can not reproduce this using the latest from master.

    Looking at the code, terminal.py lines 1142 and 1145 the decoding from str to bytes is being done.

    I can reproduce this using terminator from the debian buster repository, version 1.91

    What version of terminator are you using?

  2. mattrose commented on Jul 7, 2020

    @mattrose
    Member

    This was fixed a while back in master. see #54 for fix

  3. dhasial commented on Jul 17, 2020

    @dhasial
    Author

    Yes thank you, I build from the master instead of using Debian Stable repos and it works!

    My only issue with it now is that dragging and dropping a file appends file:// to the beginning of the directory string, which results in Terminator outputting "No such file or directory".

    I'm unsure if this is on the OS or Terminator's side, but do you know of a fix / way to remove or prevent this behaviour?

  4. mattrose commented on Jul 17, 2020

    @mattrose
    Member

    hmm, shouldn't be doing that. Lemme check

  5. mattrose commented on Jul 20, 2020

    @mattrose
    Member

    @Dhamma-valence I was unable to reproduce this. when I drag a file from the Files app in GNOME it just prints out the file name in quotes, not a file url. There is a lot of weird complicated logic around so it's possible that it's not doing the correct the thing in your case. Can you tell me what your desktop environment or window manager is, and what program you're dragging the file from?

  6. im-AMS commented on Aug 26, 2020

    @im-AMS

    Hey,
    I had the same issue of file://
    I run manjaro KDE,

    I think I have managed to fix it, ill make a pull request, please check it out

    Thank you

  7. dhasial commented on Aug 29, 2020

    @dhasial
    Author

    I use KDE, with the default Kwin WM on Debian Testing -
    Krohnkite Kwin tiling script too but that's likely irrelevant.

    I think this might be related to another error I was having with something called KIOExec on KDE but I could be wrong.

    It wasn't completing some translation between an HTML link in an app and the process that it was directed to (usually Firefox), and gave a similarly URLish output (though I've since fixed it and forgotten what exactly the output was).

  8. mattrose commented on Nov 6, 2020

    @mattrose
    Member

    Figured this out. Dolphin sets up the mime type for the selection as text/x-moz-url whereas the GNOME Files program, and others have a mime type as text/plain. Boo.

  9. added a commit that references this issue on May 11, 2026
  10. added a commit that references this issue on May 14, 2026
  11. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions