1

My system is Linux Lubuntu 17.10 and Firefox is installed as a browser. It can be accessed through the application panel, but clicking on the Web Browser Icon on the Task Bar leads to the following error:

Invalid desktop entry file: '/usr/share/applications/lxde-x-www-browser.desktop'

I have tried

desktop-file-validate lxde-x-www-browser.desktop

but this did not change anything.

Here are the contents of the file:

[Desktop Entry]  
Name=Web Browser  
Name[pt_BR]=Navegador web  
Name[zh_TW]=瀏覽器  
GenericName=X Web Browser  
GenericName[pt_BR]=Navegador web gráfico  
GenericName[zh_TW]=網頁瀏覽器  
Exec=/usr/bin/x-www-browser %u  
Terminal=false  
Type=Application  
Categories=GTK;WebBrowser;Network  
Icon=web-browser  
NoDisplay=true  
1
  • Can you show update-alternatives --display www-browser
    – user192526
    Commented Nov 11, 2017 at 9:43

1 Answer 1

1

Possible Solutions

  • Goto the equivalent of Settings → Preferred Applications and ensure a “default browser” has been selected
  • Examine / execute /usr/bin/x-www-browser directly and see what happens
  • Visit firefox's about:preferences and ensure it is checking whether is is the default browser, and see if there is a button active to “make default browser“ or some such thing
  • run desktop-file-validate --warn-kde lxde-x-www-browser.desktop to check kde-specific fields
  • Point Exec=…Exec=/usr/bin/firefox (directly at the firefox executable, wherever that is…)—see which firefox or whereis firefox at a terminal if you're having trouble knowing
3
  • P.S. There are a couple extra spaces on each line in your example code—perhaps check for extraneous spaces/nonprinting characters or strange line endings. dos2unix would be an easy fix for CRLF → LF but I don't know if this would be causing anything if it is even the case. Commented Nov 11, 2017 at 10:00
  • Tried all of your suggestions, no luck until the last one, which did the trick. Thanks. Commented Nov 11, 2017 at 18:20
  • I see now I neglected the %u which I suppose means that dragging a URL onto the icon won't work—that is I don't think it'll work for file association as there's no place to substitute a filename, although maybe the filename or URL will be appended anyway… haven't read any standard or source and dont't recall what the ‘%u’ exactly indicates. Commented Nov 11, 2017 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .