[SOLVED] How to drag and drop URL link onto launcher
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have tried every argument parameter from %f through %k, but every time I drop a URL directly from the browser onto the launcher, the executeable is never launched. If I first drop the URL onto the Desktop to create a Link, then drop the Link, it receives a Link .desktop file name, instead of the URL inside the desktop link.
Is there anyway to make gnome pass the URL, instead of the desktop file name?
What if you try to run it in shell? Then it might be along the lines of what I was dealing with, trying to run 'su'. For instance, the Exec might read
Exec=gnome-terminal|xterm -e 'getvid $1'
or whatever. Then, it may open up. Also, if done that way, it might be a $1 you have to use, since getvid may be $0, the arg...the URL...may be $1; again, this is just advice. Read the man and info pages; they may help a GREAT deal with figuring this out
I have confirmed that link the drop from firefox works sometimes. It is really flakey. Sometimes it works if it is the first drop made. Sometimes it will work multiple times then stop and then start again. I cannot find a consistent pattern. %u is expanded to contain the URL of the link that is dropped.
If I drop the link on the Desktop, it creates a Type=Link desktop file. If I drag and drop this link entry onto the launcher, %u is expanded to the path to the link desktop file. The URL key in the link desktop is not used for the substitution.
Where are you putting the launcher? What you're trying to do works for me if the launcher is in the GNOME Panel, but not if the launcher is on the Desktop. Don't know why that is.
The use of 'Terminal=true' isn't required.
I created this on the Desktop, then dragged it on the Panel.
So your clue has solved my problem, but created a newer smaller one.
Yes, if I create a launcher directly on a panel, the drop from the browser works every time. The problem I had previously was that dragging the launcher from the Desktop to the panel seems to affect the setting of the %u parameter. If I do the following it works every time:
right-click on a panel -> Add to Panel...
select Custom Application Launcher
click on ADD
set Type, Name, Command = "command %u", Comment, click OK
So it is now working solidly.
However, I was using the Path= key in the desktop file to preset the working directory for the Exec= script. This key does not seem to work in the panel launcher. I added the key by editing the launcher file in the $HOME/.gnome2/panel2.d/default/launchers directory. No matter what I set the Path= to, the command is launched with the working directory set to my home directory.