I am using Tahr pup 6.0.5. I need to create a few URL shortcuts on the onboard. I can seem to get it to work. I get permission errors.
All I do is create the path to Firefox.desktop and then in the pass arguments section I put http://www.mcran.com. I tried no quotes, as well as single and double quotes. Doesn't work. What am I doing wrong?
How to create a URL shortcut in Tahrpup 605?
Randy, last time I checked, /usr/share/applications isn't on any $PATH. This is *old* know-how Mate..
Likewise, and quotes included, "$@" will work as well.
Code: Select all
#!/bin/sh
firefox http://www.mcran.com &
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Re: How to create a URL shortcut in Tahrpup 605?
Everythingrmcellig wrote:All I do is create the path to Firefox.desktop and then in the pass arguments section I put http://www.mcran.com. I tried no quotes, as well as single and double quotes. Doesn't work. What am I doing wrong?
1) Do not create a shortcut by dragging a .desktop file onto your desktop. I know that many people do and suggest that because it might spare you the trouble to assign an icon and it actually works when you click on it or when you drag files onto it as arguments. But it is another detour. In your example the desktop icon points to /usr/share/applications/mozilla-firefox.desktop which contains instructions to exec firefox. SInce your system doesn't know what "firefox" is it has to search the PATH, where it will find /usr/bin/firefox, which in my system is just another link. When the system follows the link it will - at last - know which application is should execute: /usr/lib/firefox-17.0.8/firefox. That's a long way. Why not put the path of the application directly into the desktop icon?
2) .desktop files are text file. They are not executable. The second field in the icon dialog is labelled "Arguments to pass (for executables)". Whoever wrote this didn't write this for fun. With a (non executable) .desktop file in the first field, any argument in the second field will trigger a "permission denied" error. This has nothing to do with tahrpup or with firefox. You can try this with leafpad. Create a desktop icon for /usr/share/applications/leafpad.desktop and add an argument. Good luck.
Bottomline: Always link your desktop icons to executables