You are not logged in.

#26 2018-02-23 15:24:21

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

Trilby wrote:

I admit: I skipped that chapter. For a reason I detail later on.

Anyway, I've set the BROWSER variable in my ~/.bashrc file, logged out of X, logged back in and started Chromium.
It keeps asking about being the default browser. Again, it doesn't work.

I skipped that step because I thought that either Chromium is not able to edit my ~/.bashrc and/or my ~/.profile, or those variables are irrelevant in this context:
there's no other way for Chromium to save that BROWSER variable for the next logins.
Firefox isn't changing my environment variables, though. But it can definitely be my default browser even after a reboot.
So I assumed (and later proved) that the $BROWSER variable is irrelevant in this context.

I am wondering why Chromium cannot do what Fireforx does, whatever it is, to be the default browser.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#27 2018-02-23 15:26:25

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

seth wrote:

If chromium should write itself into ~/.config/mimeapps.list but the entry ending up there is firefox.desktop, that's consistent w/ the wiki?

I could be wrong, but either it's Chromium to write "firefox" in that file, or it's failing to write its own executable path.
In either case, it smells like a bug.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#28 2018-02-23 15:27:18

seth
Member
Registered: 2012-09-03
Posts: 8,929

Re: [WORKAROUND] How to get Chromium to be the default browser?

It smells like something else writes firefox in there. Did you check lsof?

Offline

#29 2018-02-23 15:28:46

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

seth wrote:

It smells like something else writes firefox in there. Did you check lsof?

Sorry, I forgot to report:

[support@Feynman ~/.config] sudo lsof | grep mimeapps.list
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.

That is: nothing!
Instead I see something maybe more interesting:

[support@Feynman ~] strace chromium 2>&1 | grep '/home/support/' | grep -v O_RDONLY > strace.log
# Click on "yes" for the default browser, then quit
[support@Feynman ~] cat strace.log
access("/home/support/.config/chromium", F_OK) = 0
access("/home/support/.config/gtk-3.0/settings.ini", F_OK) = 0
stat("/home/support/.config/gtk-3.0/gtk.css", 0x7ffe093d38f0) = -1 ENOENT (No such file or directory)
access("/home/support/.local/share/themes/Default/gtk-3.22/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.local/share/themes/Default/gtk-3.20/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.local/share/themes/Default/gtk-3.18/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.local/share/themes/Default/gtk-3.16/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.local/share/themes/Default/gtk-3.14/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.local/share/themes/Default/gtk-3.0/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.themes/Default/gtk-3.22/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.themes/Default/gtk-3.20/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.themes/Default/gtk-3.18/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.themes/Default/gtk-3.16/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.themes/Default/gtk-3.14/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.themes/Default/gtk-3.0/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
stat("/home/support/.config/fontconfig/conf.d", 0x7ffe093cba50) = -1 ENOENT (No such file or directory)
stat("/home/support/.config/fontconfig/conf.d", 0x7ffe093cba50) = -1 ENOENT (No such file or directory)
access("/home/support/.config/fontconfig/conf.d", R_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/fontconfig/conf.d", R_OK) = -1 ENOENT (No such file or directory)
stat("/home/support/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0600, st_size=215, ...}) = 0
stat("/home/support/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0600, st_size=215, ...}) = 0
access("/home/support/.config/fontconfig/fonts.conf", R_OK) = 0
stat("/home/support/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0600, st_size=215, ...}) = 0
access("/home/support/.config/fontconfig/fonts.conf", R_OK) = 0
access("/home/support/.fonts.conf.d", R_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.fonts.conf.d", R_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.fonts.conf", R_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.fonts.conf", R_OK) = -1 ENOENT (No such file or directory)
stat("/home/support/.local/share/fonts", 0x7ffe093d47d0) = -1 ENOENT (No such file or directory)
stat("/home/support/.local/share/fonts", 0x7ffe093d4840) = -1 ENOENT (No such file or directory)
stat("/home/support/.fonts", 0x7ffe093d47d0) = -1 ENOENT (No such file or directory)
stat("/home/support/.fonts", 0x7ffe093d4840) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/First Run", F_OK) = 0
stat("/home/support/.config/chromium", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
access("/home/support/.config/chromium", F_OK) = 0
stat("/home/support/.config", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat("/home/support/.config/chromium", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat("/home/support/.config/chromium/BrowserMetrics", 0x7ffe093d4090) = -1 ENOENT (No such file or directory)
mkdir("/home/support/.config/chromium/BrowserMetrics", 0700) = 0
access("/home/support/.config/chromium/BrowserMetrics", F_OK) = 0
access("/home/support/.config/chromium/BrowserMetrics/BrowserMetrics-5A903547-6BB1.pma", F_OK) = -1 ENOENT (No such file or directory)
rename("/home/support/.config/chromium/BrowserMetrics-spare.pma", "/home/support/.config/chromium/BrowserMetrics/BrowserMetrics-5A903547-6BB1.pma") = 0
access("/home/support/.config/chromium/BrowserMetrics/BrowserMetrics-5A903547-6BB1.pma", F_OK) = 0
openat(AT_FDCWD, "/home/support/.config/chromium/BrowserMetrics/BrowserMetrics-5A903547-6BB1.pma", O_RDWR) = 154
access("/home/support/.config/chromium/Safe Browsing/AnyIpMalware.store", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing/ChromeFilenameClientIncident.store", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Bloom", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Bloom Prefix Set", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Csd Whitelist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Download", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Download Whitelist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Extension Blacklist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing IP Blacklist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Inclusion Whitelist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Module Whitelist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Resource Blacklist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing Side-Effect Free Whitelist", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing UwS List", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Safe Browsing UwS List Prefix Set", F_OK) = -1 ENOENT (No such file or directory)
readlink("/home/support/.config/chromium/SingletonSocket", 0x7ffe093d3380, 4096) = -1 ENOENT (No such file or directory)
readlink("/home/support/.config/chromium/SingletonLock", 0x7ffe093d3110, 4096) = -1 ENOENT (No such file or directory)
symlink("Feynman-27569", "/home/support/.config/chromium/SingletonLock") = 0
unlink("/home/support/.config/chromium/SingletonSocket") = -1 ENOENT (No such file or directory)
unlink("/home/support/.config/chromium/SingletonCookie") = -1 ENOENT (No such file or directory)
symlink("/tmp/.org.chromium.Chromium.VoQJg3/SingletonSocket", "/home/support/.config/chromium/SingletonSocket") = 0
symlink("15607897478408513267", "/home/support/.config/chromium/SingletonCookie") = 0
access("/home/support/.config/chromium/Default", F_OK) = 0
access("/home/support/.config/chromium/Default/Policy/User Policy", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Default/Managed Mode Settings", F_OK) = -1 ENOENT (No such file or directory)
access("/home/support/.config/chromium/Default", F_OK) = 0
access("/home/support/.config/chromium/Default", F_OK) = 0
access("/home/support/.config/chromium/Default", F_OK) = 0
access("/home/support/.cache/chromium/Default/README", F_OK) = -1 ENOENT (No such file or directory)
stat("/home/support/.cache", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat("/home/support/.cache/chromium", {st_mode=S_IFDIR|0700, st_size=21, ...}) = 0
stat("/home/support/.cache/chromium/Default", {st_mode=S_IFDIR|0700, st_size=38, ...}) = 0
stat("/home/support/.config/chromium/First Run", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("/home/support/.config/chromium/SingletonSocket") = 0
unlink("/home/support/.config/chromium/SingletonCookie") = 0
unlink("/home/support/.config/chromium/SingletonLock") = 0
creat("/home/support/.config/chromium/chrome_shutdown_ms.txt", 0666) = 142

I think it's chromium that is failing to write. Or writes in the wrong place.
Even if it was just like you suggest, it'd be a bug. Shouldn't it?

Last edited by 0BADC0DE (2018-02-23 15:44:28)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#30 2018-02-23 15:53:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,440
Website

Re: [WORKAROUND] How to get Chromium to be the default browser?

wiki wrote:

#xdg-utils deletes and recreates ~/.config/mimeapps.list

And note that "xdg-utils" is a link to another page with further instructions/details.

Please post the output of the following:

echo $XDG_CURRENT_DESKTOP
xdg-mime query default text/html
ls -l ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list ~/.config/${XDG_CURRENT_DESKTOP}-mimeapps.list ~/.local/share/applications/${XDG_CURRENT_DESKTOP}-mimeapps.list

Last edited by Trilby (2018-02-23 15:53:59)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#31 2018-02-23 16:11:54

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

Trilby wrote:
wiki wrote:

#xdg-utils deletes and recreates ~/.config/mimeapps.list

And note that "xdg-utils" is a link to another page with further instructions/details.

Please post the output of the following:

echo $XDG_CURRENT_DESKTOP
xdg-mime query default text/html
ls -l ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list ~/.config/${XDG_CURRENT_DESKTOP}-mimeapps.list ~/.local/share/applications/${XDG_CURRENT_DESKTOP}-mimeapps.list
[support@Feynman ~] echo $XDG_CURRENT_DESKTOP
KDE
[support@Feynman ~] xdg-mime query default text/html
firefox.desktop
[support@Feynman ~] ls -l ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list ~/.config/${XDG_CURRENT_DESKTOP}-mimeapps.list ~/.local/share/applications/${XDG_CURRENT_DESKTOP}-mimeapps.list
ls: cannot access '/home/support/.config/KDE-mimeapps.list': No such file or directory
ls: cannot access '/home/support/.local/share/applications/KDE-mimeapps.list': No such file or directory
-rw-r--r-- 1 support users 50 2018-02-23 16:41:06 /home/support/.config/mimeapps.list
-rw------- 1 support users  0 2018-02-23 10:10:00 /home/support/.local/share/applications/mimeapps.list
[support@Feynman ~] 

I am keeping to select "yes" to tell chromium to be my default browser.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#32 2018-02-23 16:22:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,440
Website

Re: [WORKAROUND] How to get Chromium to be the default browser?

[support@Feynman ~] xdg-mime query default text/html
firefox.desktop

Ok, so ... fix that.  The proper way to do so is (still) in the pages I pointed you to, but if we need to go step by step:

xdg-settings set default-web-browser ${whatever}.desktop

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#33 2018-02-23 16:35:38

seth
Member
Registered: 2012-09-03
Posts: 8,929

Re: [WORKAROUND] How to get Chromium to be the default browser?

Ftr, the strace in #29 is probably meaningless; you should not be able to strace a "real" chromium anyway, but are stracing a forking process (while chromium is already running)
You'd have to "killall chromium; sleep $LONGENOUGH; strace -f chromium" and that should yell errors because chromium leverages central processes.

Offline

#34 2018-02-23 16:50:17

progandy
Member
Registered: 2012-05-17
Posts: 3,195

Re: [WORKAROUND] How to get Chromium to be the default browser?

By the way, chromium is also using xdg-settings to check and set the default browser and does not write mimeapps.list directly.
https://github.com/chromium/chromium/bl … ux.cc#L138
It basically uses these commands. You can override the .desktop file with "$CHROME_DESKTOP".

xdg-settings set default-web-browser chromium-browser.desktop
xdg-settings check default-web-browser chromium-browser.desktop

Edit: The arch package uses chromium-launcher and changes the name to "chromium.desktop".

Personally I disable the internal default checks when possible and only use the xdg tools directly.

Last edited by progandy (2018-02-26 08:44:45)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#35 2018-02-26 07:28:14

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

progandy wrote:

By the way, chromium is also using xdg-settings to check and set the default browser and does not write mimeapps.list directly.
https://github.com/chromium/chromium/bl … ux.cc#L138
It basically uses these commands (you can override the .desktop file with "$CHROME_DESKTOP")

xdg-settings set default-web-browser chromium-browser.desktop
xdg-settings check default-web-browser chromium-browser.desktop

Personally I disable the internal default checks when possible and only use the xdg tools directly.

[support@Feynman ~] xdg-settings set default-web-browser chromium-browser.desktop
[support@Feynman ~] xdg-settings check default-web-browser chromium-browser.desktop
no

Provided that I've never seen such a behavior with Chromium, KDE and Linux so far, I don't feel comfortable to manually do something that's supposed to be done automatically by a program.
If I am forced to do so, then there needs to be some bug somewhere, IMHO.

The terminal snippet above seems to show that something really wrong is happening.
I have closed Chromium and Firefox.
I have killed any process called "chromium" or "firefox" with "sudo killall -9 chromium firefox"
I have waited 2 minutes with "sleep 2m".
I have run those two commands and have got that nice "no" answer.
This could be the bug.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#36 2018-02-26 08:30:43

seth
Member
Registered: 2012-09-03
Posts: 8,929

Re: [WORKAROUND] How to get Chromium to be the default browser?

I've only chromium.desktop (no chromium-browser.desktop) and that's what set by chromium as default (and returns "yes" when checked)
Attempting to set the non-existing "xdg-settings set default-web-browser chromium-browser.desktop" fails likewise for me.

Offline

#37 2018-02-26 09:00:16

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

I have found what i think it's a clean workaround starting from a complete re-installation of ArchLinux.
I say it's "clean" because you don't need to manually edit any system or user file but rather use just the KDE settings.

Sytstem Settings --> Applications --> Default Applications --> Web Browser --> Default component --> "in the following application" --> Chromium.
Click on the [APPLY] button in the lower right corner.

Sytstem Settings --> Applications --> File Associations -->  Search box: html
You'd get two items: "application" and "text".
Under "application" select "xhtml+xml and move Chromium at the topmost place.
Undert "text" select "html" and do the same.
Click on the APPLY button in the lower right corner.

Now Chromium is the default browser and is not asking any more.
I am not sure whether the 1st step is actually needed. The 2nd one surely is.

I could be wrong, but this looks like a genuine, arch-related bug, as chromium has never shown such a weird behaviour under KDE with another Linux distribution.
I won't mark this thread as "SOLVED" but rather as "WORKAROUND".

Thanks everyone for the support: there'd be no workaround without their hints and comments!


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#38 2018-02-26 09:02:51

seth
Member
Registered: 2012-09-03
Posts: 8,929

Re: [WORKAROUND] How to get Chromium to be the default browser?

Sounds as if KDE would have fought Chromium itr.
Did the entries default to FF before?

Offline

#39 2018-02-26 09:18:02

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

seth wrote:

Sounds as if KDE would have fought Chromium itr.
Did the entries default to FF before?

Yes, they did.
Both of them, despite I have never run Firefox a single time.
I've got the results during the re-installation, while browsing *all* of the system settings.
Again, if I ask Chromium to be the default browser, I expect it to either do it or to fail with a message.
Somehow I would expect that a silent fail isn't an option for a mature program.
This is why I think it's a bug.

And, by the way...

ArchLinux rocks!

Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#40 2018-02-26 09:32:05

seth
Member
Registered: 2012-09-03
Posts: 8,929

Re: [WORKAROUND] How to get Chromium to be the default browser?

You're aware that there's a KDE daemon running that (most likely) watches changes to those XDG configurations and "fixes" them with its local settings?
No idea why KDE was configured to prefer firefox, but you should try whether you can reliably change the default browser (from within the browsers) outside a KDE session and then file a bug upstream (which might be turned down as a "works as intended, please use KDE to configure things") in case there's no such issue outside KDE.

Offline

#41 2018-02-26 09:39:44

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

seth wrote:

You're aware that there's a KDE daemon running that (most likely) watches changes to those XDG configurations and "fixes" them with its local settings?

Name it please, so I can understand. Maybe it's kded5?
I know about stuff that checks files and directories (and also URLs).
But I don' know anything about something that "fixes" stuff done by other programs.
If this is the case, this is the very first time since long time (I'm not new to KDE and Linux, even if I am not a guru), that something interferes with my actions.

seth wrote:

No idea why KDE was configured to prefer firefox, but you should try whether you can reliably change the default browser (from within the browsers) outside a KDE session and then file a bug upstream (which might be turned down as a "works as intended, please use KDE to configure things") in case there's no such issue outside KDE.

I am not going to install GNOME or any other DE than KDE, though.
I know chromium was working fine under KDE with a different distribution. This is enough to me as I need to understand before going on.

I really appreciated the help from you all.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#42 2018-02-26 09:44:02

seth
Member
Registered: 2012-09-03
Posts: 8,929

Re: [WORKAROUND] How to get Chromium to be the default browser?

You don't have to install any kind of other desktop environment ... https://wiki.archlinux.org/index.php/Xinit
But I'm afraid we're back at where facts are annoying to your opinion, so you prefer to not look at them. :-(

Offline

#43 2018-02-26 09:46:58

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 64

Re: [WORKAROUND] How to get Chromium to be the default browser?

seth wrote:

You don't have to install any kind of other desktop environment ... https://wiki.archlinux.org/index.php/Xinit
But I'm afraid we're back at where facts are annoying to your opinion, so you prefer to not look at them. :-(

Nope, the fact is that I've spend too much time so far for configuring and probably have misunderstood some suggestions here:
I did the distribution change on my primary work machine!
Maybe later I'll come back here and re-check everything.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#44 2018-12-06 23:33:14

mihanson
Member
Registered: 2009-04-27
Posts: 10

Re: [WORKAROUND] How to get Chromium to be the default browser?

Here's how I fixed this issue. If you start chromium from the command line:

$ chromium --verbose

you'll see an error about xdg-settings not being able to set the $BROWSER variable. I'm using LXQt, so I navigated to Preferences > LXQt Settings > Session Settings > Default Applications. I changed the "Web Broswer" setting from "chromium" to nothing (blank), closed the dialog and then logout and log back in. Launch Chromium normally and the default Browser nag in Chromium gone. Hope this helps someone.

Mike

Offline

Board footer

Powered by FluxBB