Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1551  / 2 Years ago, tue, april 12, 2022, 10:14:44

I save links as files, rather the using bookmarks. I just drag the URL field from Firefox onto my desktop/folder.



Recently these stopped opening in Firefox, and started "opening" in Gedit. Even in Gedit, the file errors. The only way I can open these to even see the link is by using vim, having navigated to the file from the terminal.



There are a number of threads with similar problems, to solutions to which I have tried to no avail. <THIS THREAD> describes exactly my problem, but no solution is posted.



Example URL File Contents:



[Desktop Entry]
Encoding=UTF-8
Name=Link to Google
Type=Link
URL=http://www.google.com
Icon=text-html


Contents of my ~/.local/share/applications/mimeapps.list:



[Added Associations]
application/x-rpm=ubuntu-software-center.desktop;
x-scheme-handler/mailto=thunderbird.desktop;
message/rfc822=thunderbird.desktop;
application/x-extension-eml=thunderbird.desktop;
inode/directory=vlc.desktop;
application/pdf=inkscape.desktop;kde4-okularApplication_pdf.desktop;
text/x-python=vim.desktop;gedit.desktop;
application/pgp-keys=libreoffice-calc.desktop;
image/x-hdr=gedit.desktop;
text/plain=libreoffice-calc.desktop;
audio/x-vorbis+ogg=totem.desktop;
application/octet-stream=gedit.desktop;
x-scheme-handler/ftp=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
text/html=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;

[Default Applications]
x-scheme-handler/mailto=thunderbird.desktop
message/rfc822=thunderbird.desktop
application/x-extension-eml=thunderbird.desktop
application/pdf=kde4-okularApplication_pdf.desktop
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=chromium-browser.desktop
x-scheme-handler/unknown=chromium-browser.desktop
audio/x-vorbis+ogg=totem.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop


And here is a screen-shot of Gedit trying to open these: Gedit trying to open these:



Any help super appreciated, as this is driving me crazy.


More From » firefox

 Answers
3

It appears I borked things when following <a tutorial> to set things up so I could just right-click files to open them in vim.



The two resources I found most helpful to figure this out were:





There was clearly nothing wrong with the url files, as navigating to their parent directory and running the following opened them in just fine:



# firefox url-name.desktop


This indicated that there was an issue with the Exec line for getting run properly. I then discovered that I had a symbolic link to my firefox.desktop file by running the following in my user specific directory:



# ls -l ~/.local/share/applications/


As described in the second link, mimeapps.list is a user-specific list of default applications to be used to open various mime-types (i.e. file types).



I renamed this file to archive it, and then I created a sym-link to the defaults.list:



# ln -s /local/share/applications/defaults.list/ ~/.local/share/applications/defaults.list


Restarting , and everything worked! Phew. Hopefully, this helps somebody. Now to see what I did wrong with that vim tutorial...


[#34161] Thursday, April 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wherejuic

Total Points: 53
Total Questions: 123
Total Answers: 117

Location: Zambia
Member since Mon, Jan 23, 2023
1 Year ago
wherejuic questions
Thu, Aug 19, 21, 18:07, 3 Years ago
Wed, May 12, 21, 03:23, 3 Years ago
Sat, Nov 13, 21, 05:27, 3 Years ago
Mon, Sep 5, 22, 17:36, 2 Years ago
;