KDE --how to make perl program support drag and drop?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
KDE --how to make perl program support drag and drop?
I am using KDE 3.4.3 on Gentoo and I just started doing some Perl scripting at work, but they are using Windows. We have scripts where you drag & drop a folder onto a perl script, and it does whatever it is supposed to do and usually spits out a text file somewhere (for reports, etc.) I can get this to work, but I am thinking there must be a keyword, or special variable, or something that I can't find a reference to anywhere. The way I get it to kind of work, is by right clicking on my perl script, and clicking on Properties, and then clicking on the wrench icon for Type, and then under Application Preference order, adding Perl, clicking on Edit, then going to Application and under Command I typed this:
/usr/bin/perl /home/carl/PerlScripts/Work/ProjectProgress.pl
It then works as I want it to, but it changes ALL of my perl scripts to execute this script, so is there a keyword or something I could use as the second argument that would mean "Whatever script is being activated"? I need soemthing like the java keyword this
Thanks for anywone who knows more about KDE than me. I tried checking out KDE.org but they didn't seem to have anything on Advanced User tips that I could find.
Files dropped on an executable are passed to it as command-line parameters. There is no need to change the file associations on Perl scripts. Just change the permissions on the scripts to make them executable, make sure they start with the requisite #! line, and you should be all set.
That's what I thought, but it doesn't work (nothing happens). ahhh, just figured it out. I just had to have the /usr/bin/perl right clicking on my perl script, and clicking on Properties, and then clicking on the wrench icon for Type, and then under Application Preference order, adding Perl, clicking on Edit, then going to Application and under Command. Now it works perfectly. Thanks for the info!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.