You are not logged in.
Pages: 1
Topic closed
In Terminator, I right click on an URL and choose 'Open link'. The link opens in Firefox. I'd like it to open in Opera, instead.
The author says it uses "Gtk's built in URI opening facility", and falls back to xdg-open. When I run
xdg-open http://archlinux.org/
the URL opens in Opera (probably following my $BROWSER environment variable), which tells me that XDG is OK, so I must need to configure GTK's built in URI opening facility, but I have no idea how to do that.
Following the Default Applications wiki page, I installed gconf-editor to see what it would show, but there're only a few things in there, related to gstreamer.
gsettings doesn't show anything about a web browser:
> gsettings list-children org.gnome.desktop.default-applications
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
office org.gnome.desktop.default-applications.office
terminal org.gnome.desktop.default-applications.terminal
I'm not using a DE, just Openbox. I do have a few Gnome and KDE based apps installed, though.
Does anyone have any ideas?
Last edited by Smarthound (2012-04-24 21:09:06)
Offline
Even though you did not see a line there you should still be able to add that line in to the file and it should apply that setting just fine.
Offline
Even though you have your $BROWSER set to opera, did you try also putting the corresponding desktop file beside "text/html" in ~/.local/share/applications/defaults.list?
The "gtk built-in method" is gtk_show_uri(). I can't seem to find what other config file could be influencing it. Maybe something in gsettings-desktop-schemas?
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline
When I run [...] the URL opens in Opera (probably following my $BROWSER environment variable), which tells me that XDG is OK
Are you sure about that?
Run "sudo leafpad /usr/bin/xdg-open" (or whatever text editor you use) and search for the first line:
# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"" ]; then
BROWSER=firefox
if [ -n "$DISPLAY" ]; then
BROWSER=nautilus:$BROWSER
fi
fi
"BROWSER=firefox" should be "BROWSER=opera" on your end.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Even though you did not see a line there you should still be able to add that line in to the file and it should apply that setting just fine.
What line? What file?
Even though you have your $BROWSER set to opera, did you try also putting the corresponding desktop file beside "text/html" in ~/.local/share/applications/defaults.list?
I don't have that file. I do have this file, though:
> grep text/html .local/share/applications/mimeapps.list
text/html=opera-browser.desktop;firefox.desktop;
I did
echo text/html=opera-browser.desktop\; > .local/share/applications/defaults.list
but it didn't make any difference.
Are you sure about that?
Fairly sure. /usr/bin/xdg-open has this:
for browser in $BROWSER; do
if [ x"$browser" != x"" ]; then
browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
if [ $? -ne 0 ]; then
browser_with_arg=$browser;
fi
if [ x"$browser_with_arg" = x"$browser" ]; then
"$browser" "$1";
else eval '$browser_with_arg'$xdg_redirect_output;
fi
if [ $? -eq 0 ]; then
exit_success;
fi
fi
done
and later:
# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"" ]; then
BROWSER=links2:links:lynx:w3m
if [ -n "$DISPLAY" ]; then
BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
fi
fi
I changed that line to
BROWSER=opera:firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
and later
BROWSER=opera-browser:firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
but no difference was seen in either case.
I've since installed exo, and configured the default browser with exo-preferred-applications. That works, but it means I have to keep exo installed, because as soon as I remove it, the default browser goes back to being Firefox. (When I reinstall exo, and run exo-preferred-applications again, I see it remembered my settings from last time.)
Offline
try adding x-scheme-handler/http=opera-browser.desktop to the [Added Associations] in ~/.local/share/applications/mimeapps.list
Offline
try adding x-scheme-handler/http=opera-browser.desktop to the [Added Associations] in ~/.local/share/applications/mimeapps.list
Success! That was it. I also noticed that exo had put its settings there, too. Thank you.
Offline
try adding x-scheme-handler/http=opera-browser.desktop to the [Added Associations] in ~/.local/share/applications/mimeapps.list
this is exactly what I need however with chrome as default. and the above only works for HTTP and not HTTPS so just added another line for HTTPS,
It should look something like this:
[Default Applications]
...
...
...
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
Offline
Glad to hear. however please pay attention to the dates and don't necrobump 6 year old threads.
Closing.
Online
Pages: 1
Topic closed