You are not logged in.
Pages: 1
Topic closed
After installing Opera as second browser, xfce terminal began to open links with it, instead of my default browser - Firefox.
I right click on an URL, choose 'Open Link' and it opens in Opera.
Firefox is set as default browser in Settings -> Preferred Applications -> Web Browser
xdg-open http://archlinux.org
- opens Firefox
exo-open http://archlinux.org
- opens Firefox
After quick search through xfce terminal sources i found it uses some function - gtk_show_uri.
I googled it, found that topic: https://bbs.archlinux.org/viewtopic.php?id=140028 and tried the solution:
cat ~/.local/share/applications/mimeapps.list
[Added Associations]
x-scheme-handler/mailto=exo-mail-reader.desktop
x-scheme-handler/http=firefox-browser.desktop
strangely it doesn't help.
After all righ click url in terminal and 'Open Link' still uses Opera.
Any ideas? What else can i do to find out a reason?
Last edited by spacetekk (2015-01-04 11:41:53)
Offline
Have you tried exporting BROWSER envar?
$ echo $BROWSER
/usr/bin/firefox
Offline
Had the same problem. Solved it by editing ~/.config/mimeapps.list
don't drink unwashed fruit juice.
i never make predictions, especially about the future.
Offline
Tried BROWSER envar - doesnt help, and as i understand it must work only for cli apps.
Editing of ~/.config/mimeapps.list doesnt help eather:
cat ~/.config/mimeapps.list
[Default Applications]
text/vcard=firefox.desktop
text/html=firefox.desktop
[Added Associations]
text/vcard=firefox.desktop;
text/html=firefox.desktop
but maybe it's not correct.
After that i tried to strace xfce4-terminal:
...
poll([{fd=4, events=POLLIN}], 1, 4294967295) = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\34\0.\331!\t`\2N\1\0\0\330\336\7\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 352
recvmsg(4, 0x7fff5ad349d0, 0) = -1 EAGAIN (Resource temporarily unavailable)
stat("/home/user/.local/share//mime/mime.cache", 0x7fff5ad34470) = -1 ENOENT (No such file or directory)
stat("/home/user/.local/share//mime/globs", 0x7fff5ad34470) = -1 ENOENT (No such file or directory)
stat("/home/user/.local/share//mime/magic", 0x7fff5ad34470) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/mime/mime.cache", 0x7fff5ad34470) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/mime/globs", 0x7fff5ad34470) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/mime/magic", 0x7fff5ad34470) = -1 ENOENT (No such file or directory)
stat("/usr/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=115108, ...}) = 0
open("/usr/share/applications/opera.desktop", O_RDONLY) = 13
fstat(13, {st_mode=S_IFREG|0644, st_size=550, ...}) = 0
read(13, "[Desktop Entry]\nVersion=1.0\nName"..., 4096) = 550
read(13, "", 4096) = 0
close(13) = 0
access("/usr/local/sbin/opera", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/opera", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/opera", X_OK) = 0
getuid() = 1000
stat("/usr/bin/opera", {st_mode=S_IFREG|0755, st_size=416, ...}) = 0
access("/usr/local/sbin/opera", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/opera", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/opera", X_OK) = 0
getuid() = 1000
stat("/usr/bin/opera", {st_mode=S_IFREG|0755, st_size=416, ...}) = 0
pipe2([13, 19], 0) = 0
pipe2([20, 21], 0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fd725cf1bd0) = 1469
close(19) = 0
close(21) = 0
wait4(1469, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1469
...
and it's strange but as i can understand it uses some mime cache file located at /usr/local/share/mime/mime.cache
and before that some other non existing files, but i dont see there any familiar config files.
Offline
Solved the problem, but i think it was not correct way. It worked when
i directly remove all x-scheme-handler\... from MimeType= in /usr/share/applications/opera.desktop
and rebuild cache with
update-desktop-database /usr/share/application
without it i am alway got this:
fgrep --recursive 'opera.desktop' /usr/share/applications
/usr/share/applications/mimeinfo.cache:application/xhtml_xml=opera.desktop;
/usr/share/applications/mimeinfo.cache:text/html=opera.desktop;firefox.desktop;
/usr/share/applications/mimeinfo.cache:text/xml=opera.desktop;firefox.desktop;
/usr/share/applications/mimeinfo.cache:x-scheme-handler/ftp=opera.desktop;
/usr/share/applications/mimeinfo.cache:x-scheme-handler/http=opera.desktop;firefox.desktop;
/usr/share/applications/mimeinfo.cache:x-scheme-handler/https=opera.desktop;firefox.desktop;
opera was always first
looks like file /home/user/.config/mimeapps.list is ignored by xfc4-terminal or something i dont understand.
cat .config/mimeapps.list ~/
[Default Applications]
text/vcard=firefox.desktop
text/html=firefox.desktop;opera.desktop;
x-scheme-handler/mailto=exo-mail-reader.desktop
x-scheme-handler/http=firefox.desktop;opera.desktop;
x-scheme-handler/https=firefox.desktop;opera.desktop;
[Added Associations]
text/vcard=firefox.desktop;
text/html=firefox.desktop;opera.desktop;
x-scheme-handler/mailto=exo-mail-reader.desktop
x-scheme-handler/http=firefox.desktop;opera.desktop;
x-scheme-handler/https=firefox.desktop;opera.desktop;
Offline
Worked for me when I added the following lines to `~/.config/mimeapps.list`:
[Default Applications]
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
Offline
Had the same issue. Several of the above solutions were already present in my `~/.config/mimeapps.list` file. Some of the others made the brave browser prompt me to save the `.url` files I was attempting to open.
The following solved the problem for me. Adapted from https://patrickgawron.com/t3/2018/10/08 … ntu-linux/
In the Thunar file browser:
right click on the `.url` file,
select "Open With",
"Use a custom command",
paste
bash -c "cat %f | grep URL | cut -d'=' -f2 | xargs brave &"
(replacing "brave" with whichever browser you want),
Check "Use as default for this kind of file"
Now `.url` files open correctly in the browser from any file manager.
Offline
Closing this old solved topic.
Offline
Pages: 1
Topic closed