I have Dropbox shared with Windows PC's which contain some .url internet shortcuts. These do not open in Lubuntu. How can I open these from Lubuntu? Using the Opera browser on all platforms.
What worked for me was this trick by Saidul Hassan, with some minor modifications.
EDIT: I had to change this slightly to handle URL's with an '=' symbol in them.
- Right-click one of the .url files in Lubuntu file manager and go to
Open Withand choose
Custom Command Line.
Enter this as the terminal command, substituting
operafor the browser of your choice:
bash -c "cat %f | grep URL= | cut -b5- | xargs opera &"
Do NOT check "Execute in terminal emulator."
- You must give it an Application Name at bottom.
- Check the box for
Set selected application as default.
For example, this should look like the following:
Now double-clicking .url files should open them as a new tab in the chosen browser.
Note: If you end up with more than three "Open With" associations to a file type, things may start behaving strangely. To "remove" these extra associations, look in
/home/you/.local/share/applications for some duplicated .desktop files and remove them.