I made a few mods to get this working on Win32.
On my machine, the use statement required me to specify Win32, there might be some other incantation required on Linux? I also added -text so I could see something to drop onto. Then I took out the -droptypes. There appears to be something wrong with that.

So, the below does work on my Win32 box. Hopefully this will provide a few clues for your Linux problem.

#!/usr/bin/perl use strict; use Tk; use Tk::DropSite qw(Win32); my $mw = new MainWindow(-width => 500, -height => 300); my $label = $mw->Label(-text => "this is test")->pack->place(-relwidth + => 1.0, -relheight => 1.0); #$label->DropSite(-droptypes => ['XDND'], -dropcommand => [\&dropFile, + $label]); $label->DropSite( -dropcommand => [\&dropFile, $label]); MainLoop; sub dropFile { print "DROP\n"; }
Update: I am using Perl 5.22, Active State on Win XP. Tk and DropSite come in the standard dist, so I didn't have to install anything. Sorry I can't be of more help as I have no Linux to test on.
I did find this article drag n drop primer. It says: "Note: Perl/Tk supports Sun, XDND, KDE, and Win32 remote DND protocols". I suppose this is why I had to add qw(Win32) to the use statement. Could be that what you need is "XDND"? Not sure, but an idea.

In reply to Re: X Error in Tk remote drag and drop by Marshall
in thread X Error in Tk remote drag and drop by prenaud

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.