~/.local/share/applications/mimeapps.list
[Default Applications]The problem with this is if you have a shortcut on the LXPanel, or Desktop, then the link is not updated automatically. Exo-open is designed for XFCE and is ineffective to fix this issue, xdg-open cannot be used in a shortcut unless a parameter is passed - which is no good if you just want to open the browser.
x-scheme-handler/http=iceweasel.desktop
A workaround is to create a new script that uses xdg-mime to query for the default http handler and create a .desktop file that runs this new script:
sudo nano /usr/local/bin/x-www-mime-browser
#!/bin/shsudo chmod +x /usr/local/bin/x-www-mime-browser
# This script uses xdg-mime to check the default browser
# and executes the .desktop from ~/.local/share/applications
# or /usr/share/applications.
URL="$1"
HANDLER=`xdg-mime query default x-scheme-handler/http`
# If handler is customized, extract from .local/... and execute
if [ -f ~/.local/share/applications/$HANDLER ]; then
`grep Exec ~/.local/share/applications/$HANDLER \\
| awk -F= '{ print $2 }' \\
| awk '{ print $1 }';`
else
`xdg-mime query default x-scheme-handler/http | awk -F. '{ print $1 }'`
fi
sudo nano /usr/share/applications/x-www-mime-browser.desktop
[Desktop Entry]When using the LXDE Application Launch Bar Settings the "Web Browser (default)" selection will be tucked away under the "Other" category - this will prevent an extra copy visible in the "Internet" category.
Name=Web Browser (default)
Exec=x-www-mime-browser %u
MimeType=application/x-xdg-web-browser
Terminal=false
Type=Application
Categories=WebBrowser;Other
Icon=web-browser
NoDisplay=false
No comments:
Post a Comment