You are not logged in.

#1 2018-02-21 14:37:40

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

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

I am on Plasma Desktop.
Whenever I start the Chromium browser it keeps asking whether I want it to be the default browser.
I answer "yes". But it keeps asking.
Then I've gone to the system settings and have defined chromium as the default browsing application.
It still keeps asking.
I also have Firefox but it says it's not the default browser.
It's just annoying as the browser actually works.
But I'd like to definitely say that Chromium is my default browser.
I think this is either Plasma-related or Archlinux-related.
Any hint?

TALIA!

UPDATE!
Read about my workaround at the message #37!

Last edited by 0BADC0DE (2018-02-26 09:41:56)


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

Offline

#2 2018-02-21 14:47:06

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

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

Did you follow this and the page it links to?


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

Online

#3 2018-02-21 15:55:53

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

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

Trilby wrote:

Did you follow this and the page it links to?

Thanks.
I did that with the desktop environment (KDE/Plasma) settings. But it still doesn't work, but it should.
Maybe I can check with the other stuff that's in the wiki you linked to.

[UPDATE]
The problem seems to b related to Chromium.
Whenever I click on a link KDE/Plasma starts Chromium.
But it keeps asking about the default browser...

Last edited by 0BADC0DE (2018-02-21 16:36:12)


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

Offline

#4 2018-02-21 16:47:29

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 386

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

In Plasma you will want to open System Settings>Applications>File Associations>Text and under 'Configure File Associations' scroll down to 'html' where you can add or promote Chromium to the top of the Application Preference Order. You'll then be able to set Chromium as default from within the browser. Really--it is just a matter of exploring and learning Plasma. Since it takes 5-6 steps to enable this, it speaks somewhat to the degree of Plasma's configurability and puts the onus on the user to learn the DE.

Last edited by c00ter (2018-02-21 16:50:55)


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#5 2018-02-21 16:52:05

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

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

c00ter, the OP at least implied that he had already done this.  And the message is coming from Chromium; as Chromium doesn't depend on plasma desktop, it must be doing something more generic to test whether it is the default.  It may be checking mime apps lists, and this may in turn be influenced by the XDG_CURRENT_DESKTOP setting, or plethora of other oddities.


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

Online

#6 2018-02-21 16:53:59

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

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

c00ter wrote:

In Plasma you will want to open System Settings>Applications>File Associations>Text and under 'Configure File Associations' scroll down to 'html' where you can add or promote Chromium to the top of the Application Preference Order. You'll then be able to set Chromium as default from within the browser. Really--it is just a matter of exploring and learning Plasma. Since it takes 5-6 steps to enable this, it speaks somewhat to the degree of Plasma's configurability and puts the onus on the user to learn the DE.

I think I've been unclear.

0BADC0DE wrote:

I am on Plasma Desktop.
...
Then I've gone to the system settings and have defined chromium as the default browsing application.
It still keeps asking.


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

Offline

#7 2018-02-21 16:56:54

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

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

Trilby wrote:

c00ter, the OP at least implied that he had already done this.  And the message is coming from Chromium; as Chromium doesn't depend on plasma desktop, it must be doing something more generic to test whether it is the default.  It may be checking mime apps lists, and this may in turn be influenced by the XDG_CURRENT_DESKTOP setting, or plethora of other oddities.

I am not a KDE/Plasma guru, but this could be the case.
KDE properly runs chromium when, for example, I click on a link from Konsole.


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

Offline

#8 2018-02-21 17:12:08

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

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

@0BADC0DE
You don't need to do two posts in a row if you forgot to add some information, you can and should edit your last post if no one has posted a reply since your last post.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2018-02-21 17:20:50

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 386

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

Trilby wrote:

c00ter, the OP at least implied that he had already done this.  And the message is coming from Chromium; as Chromium doesn't depend on plasma desktop, it must be doing something more generic to test whether it is the default.  It may be checking mime apps lists, and this may in turn be influenced by the XDG_CURRENT_DESKTOP setting, or plethora of other oddities.

Trilby, it is a chicken-egg problem with Chromium and Plasma. The two-part solution--Plasma's Applications Settings & Chromium's Settings--will usually take care of OPs problem as-stated. Again--it is a chicken & egg problem that is circular in nature. OP may have messed up mimetypes, but the most common solution is the one which I proffered.


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#10 2018-02-23 08:04:48

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

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

c00ter wrote:
Trilby wrote:

c00ter, the OP at least implied that he had already done this.  And the message is coming from Chromium; as Chromium doesn't depend on plasma desktop, it must be doing something more generic to test whether it is the default.  It may be checking mime apps lists, and this may in turn be influenced by the XDG_CURRENT_DESKTOP setting, or plethora of other oddities.

Trilby, it is a chicken-egg problem with Chromium and Plasma. The two-part solution--Plasma's Applications Settings & Chromium's Settings--will usually take care of OPs problem as-stated. Again--it is a chicken & egg problem that is circular in nature. OP may have messed up mimetypes, but the most common solution is the one which I proffered.

Hi all.
I haven't messed up anything. At least not by manually editing any system file.

I have asked Chromium to be the default browser. That hasn't worked as expected.

Then I have configured System Settings-->Applications-->Default applications-->Web Browser-->In the following application: Chromium.
This hasn't solved the problem as it isn't meant to. But If i click on a link inside a Konsole window I get it opened by Chromium.

Then nothing else but keeping asking chromium to be the default browser, whatever this means in terms of system/user configuration files.
Also Mozilla Firefox has asked me to be the default browser. I said "yes" and not it's not asking it any more.
Of course, if I click on a link inside a Konsole window I get Chromium fired as per the System Settings.
Chromium still asks, gets the answer "Yes" and keeps asking.

Please, elaborate more on the mime types you are talking about, maybe I can find my way out.


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

Offline

#11 2018-02-23 08:29:10

seth
Member
Registered: 2012-09-03
Posts: 49,981

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

ls ~/.local/share/applications
stat ~/.local/share/applications/mimeapps.list

Offline

#12 2018-02-23 08:53:03

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

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

seth wrote:
ls ~/.local/share/applications
stat ~/.local/share/applications/mimeapps.list

Thanks.
I haven't touched these files manually. Anyway ...
I have this situation with two files like these:

[support@Feynman ~] ls -l ~/.local/share/applications
total 12K
-rw------- 1 support users 292 2018-02-10 20:28:13 chrome-ooiklbnjmhbcgemelgfhaeaocllobloj-Default.desktop
-rw------- 1 support users 298 2018-02-10 20:28:10 chrome-oooiobdokpcfdlahlmcddobejikcmkfo-Default.desktop
-rw------- 1 support users 102 2018-02-16 10:12:06 vlc-wrapper.desktop

But they belong to two "chrome apps": mosh and teamviewer:
The first one is:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Mosh
Exec=/usr/bin/chromium --profile-directory=Default --app-id=ooiklbnjmhbcgemelgfhaeaocllobloj
Icon=chrome-ooiklbnjmhbcgemelgfhaeaocllobloj-Default
StartupWMClass=crx_ooiklbnjmhbcgemelgfhaeaocllobloj

While the second one is:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=TeamViewer
Exec=/usr/bin/chromium --profile-directory=Default --app-id=oooiobdokpcfdlahlmcddobejikcmkfo
Icon=chrome-oooiobdokpcfdlahlmcddobejikcmkfo-Default
StartupWMClass=crx_oooiobdokpcfdlahlmcddobejikcmkfo

On the other hand for the mimeapps.list file I have this:

[support@Feynman ~] stat ~/.local/share/applications/mimeapps.list
stat: cannot stat '/home/support/.local/share/applications/mimeapps.list': No such file or directory
[support@Feynman ~] find ~ -name mimeapps.list
/home/support/.config/mimeapps.list
[support@Feynman ~] stat /home/support/.config/mimeapps.list
  File: /home/support/.config/mimeapps.list
  Size: 1072            Blocks: 8          IO Block: 4096   regular file
Device: 10302h/66306d   Inode: 1476396082  Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/ support)   Gid: (  985/   users)
Access: 2018-02-23 09:32:12.728346204 +0100
Modify: 2018-02-23 09:20:18.448430721 +0100
Change: 2018-02-23 09:20:18.449430718 +0100
 Birth: -

[support@Feynman ~] cat /home/support/.config/mimeapps.list
[Added Associations]
video/3gpp=vlc.desktop;
video/mp4=vlc-wrapper.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/ftp=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;

[Default Applications]
text/html=firefox.desktop
video/3gpp=vlc.desktop;
video/mp4=vlc-wrapper.desktop;
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/mailto=org.kde.kmail.desktop;
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop

Once I restart Chromium and say "yes" to the default browser request, that mimeapps file doesn't change!
This should explain the stubborn behaviour: it never really registers itself as the default browser.
I am not sure about which file the KDE system config changes, though.

[Added Associations]
video/3gpp=vlc.desktop;
video/mp4=vlc-wrapper.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/ftp=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;

[Default Applications]
text/html=firefox.desktop
video/3gpp=vlc.desktop;
video/mp4=vlc-wrapper.desktop;
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/mailto=org.kde.kmail.desktop;
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop

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

Offline

#13 2018-02-23 09:08:14

seth
Member
Registered: 2012-09-03
Posts: 49,981

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

Try to

touch ~/.local/share/applications/mimeapps.list

Also do not configure chromium AND firefox as default, they'll obviously start a race.

Offline

#14 2018-02-23 09:49:01

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

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

seth wrote:

Try to

touch ~/.local/share/applications/mimeapps.list

Also do not configure chromium AND firefox as default, they'll obviously start a race.

I created that empty file, but the action didn't change the behaviour of Chromium.
When I select "yes" for the default browser, it should replace the one, if any, that previously was default.
There'd be no way to have two default browsers and currently it's Firefox.
There's no way to "give up" form being the default browser, until another one is selected as such.

This is how it worked on another distro (kubuntu) where I used two different browsers (Chromium and Firefox) and this is how it should work in ArchLinux, IMHO.
I could install Opera or another browser to check, but now I am pretty sure nothing would change.


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

Offline

#15 2018-02-23 13:10:21

seth
Member
Registered: 2012-09-03
Posts: 49,981

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

m'key - chromium asks back when I remove ~/.config/mimeapps.list and setting it as default writes that file.

Since your permissions on the file are ok and the timestamps suggest very recent changes, I could only imagine some watchdog monitors it and rewrites it w/ FF being the default.

sudo lsof | grep mimeapps.list

Offline

#16 2018-02-23 13:25:23

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

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

Ah, so you hadn't yet followed the page I linked to in the second post of this thread.  Please do so now.  That is the solution.


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

Online

#17 2018-02-23 13:57:58

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

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

Trilby wrote:

Ah, so you hadn't yet followed the page I linked to in the second post of this thread.  Please do so now.  That is the solution.

I did that bit it didn't work. It's in my post next to yours.


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

Offline

#18 2018-02-23 14:00:28

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

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

Eh ... no.  What I linked to directly addresses creating/configuring files which you've just now revealed (still) do not exist on your system.  It also talks about setting a couple environment variables.


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

Online

#19 2018-02-23 14:05:38

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

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

seth wrote:

m'key - chromium asks back when I remove ~/.config/mimeapps.list and setting it as default writes that file.

Since your permissions on the file are ok and the timestamps suggest very recent changes, I could only imagine some watchdog monitors it and rewrites it w/ FF being the default.

sudo lsof | grep mimeapps.list

When I remove that file and I restart Chroimium, I get asked. I say "yes", the file is recreated and look what's in there:

[support@Feynman ~/.config] cat mimeapps.list 

[Default Applications]
text/html=firefox.desktop

Firefox is not running either in the background or in foreground!!!
Do you have firefox installed?
Can you run my steps?


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

Offline

#20 2018-02-23 14:12:15

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

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

The wiki page I linked to explicitly covers why and how that file gets recreated.  Seriously, read it!  But I give up.


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

Online

#21 2018-02-23 14:19:54

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

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

Trilby wrote:

Eh ... no.  What I linked to directly addresses creating/configuring files which you've just now revealed (still) do not exist on your system.  It also talks about setting a couple environment variables.

Do you mean "Variables in .desktop files that affect application launch"?
I would lilke not to hand edit any system file unless this is a workaround for a bug.
Is "~/.local/share/applications/mimeapps.list" the file that don't exists you are mentioning to?
Firefox seems to be happy without it, though. And Chromium, like Firefix, isn't a KDE-native application as well.
If you have KDE installed from fresh ArchLinux, is that file present in your home?
I am a newbie for ArchLinux, but have been using KDE under Linux since some time now and this is the very first time I get this issue.
It smells like a Chromium issue, not my system's.


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

Offline

#22 2018-02-23 14:47:41

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

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


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

Online

#23 2018-02-23 14:51:00

seth
Member
Registered: 2012-09-03
Posts: 49,981

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

@Trilby, comment #19 is actually weird - I assume some KDE daemon (or some FF related one?) to control this file.

Chromium reads and writes ~/.config/mimeapps.list ("now", ~/.local/share/applications/mimeapps.list is deprecated and it took them long enough to drop it ;-) fine here.

Since it's created and updated for you, albeit w/ the wrong content:

Note that the symlink must be in this direction because #xdg-utils deletes and recreates ~/.config/mimeapps.list when it writes to it, which will break any symbolic/hard links

xdg-mime query default text/html
xdg-settings set default-web-browser chromium.desktop
xdg-mime query default text/html

Offline

#24 2018-02-23 14:55:38

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

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

seth wrote:

@Trilby, comment #19 is actually weird

I don't use any of this xdg-open or 'default apps' anything, but the result of post #19 is perfectly consistent with what is documented in our wiki.  If our wiki is wrong, it should be editted.  But so far it has looked like the OP hasn't read that part of the wiki and tried to follow the guidance there.

Me view is to not assume a problem or a bug at very least until one follows the documented steps in the wiki to do things 'correctly'.


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

Online

#25 2018-02-23 15:15:21

seth
Member
Registered: 2012-09-03
Posts: 49,981

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

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

Offline

Board footer

Powered by FluxBB