Chromium and Chrome usage together

I have used the Chrome browser on other platforms and over time I have purchased or added a couple applications (Journey, Keep, Writer). If I stick with the built in Chromium Browser as default and I sign in these applications become available for use. I can find them via search on the desktop, however I can not add them to the desktop. I do pin them to the task bar and everything works fine.

If I change over to the Chrome browser as default however it prevents these applications from starting up. I can still find them via search, and select them from the taskbar, but they no longer launch. I can still get to them and use them from within the Chrome browser, but not use them independently on the desktop.

I set up a couple other accounts on the computer. On one I started right of installing Chrome and setting as a default. That produces applications that show up in search, but do not launch. On the other account, I set up Chromium as the default got the applications with Chromium, which worked fine. I then installed and setup the Chrome browser, which resulted in blocking the applications from working.

In my case anyway the only way one can use Chrome applications on the desktop, is to set them up via the Chromium browser and never use/uninstall the Chrome browser. I speculate this is some issue with determining defaults. The Chrome applications will work with either Chrome or Chromium, but do not work when both browsers are installed.

bill

@wove
https://community.endlessm.com/t/webapps-as-windows/1420

That is different. The Chrome web store has applications. Installing the
applications generally creates applications launchers and the applications
launch and act like applications. The point of my post is that these Chrome
applications mostly work just fine if you only use the built in browser,
but if you install Chrome, hereby having both Chrome and Chromium installed
these application fail to work.

bill

Hi, Bill.

That is an interesting problem. I’ve never used the Chrome desktop apps, but I tested on my dev laptop, using Google Keep, with both Chromium and Chrome installed, logged into my account on both browsers, and with Chrome as the default browser, and at first I was not able to reproduce the problem:

I even added the icon to the desktop via the following:

eos-add-to-desktop chrome-hmjkmjkepdijhoojdojkdfohbdgmmhki-Default

Looking at the ~/.local/share/applications/chrome-hmjkmjkepdijhoojdojkdfohbdgmmhki-Default.desktop file, I see that it is explicitly trying to run chromium-browser, so it makes sense that it should be working regardless of whether Chrome is installed or not.

But then I removed my ~/.config/google-chrome directory, relaunched Chrome, and set it as the default browser. Shortly thereafter, the .desktop file was automatically modified to have an Exec string that tries to launch google-chrome instead of chromium-browser:

Exec=/var/lib/flatpak/app/com.google.Chrome/x86_64/eos3/6a60d57a393e778f6b56b74b
d20f19b8e0a9e3fdb4ae2831c8f5b66e2fd7b4a6/files/extra/opt/google/chrome/google-ch
rome --profile-directory=Default --app-id=hmjkmjkepdijhoojdojkdfohbdgmmhki

Trying to launch with this .desktop file fails with the following message in the journal log:

Feb 17 22:41:46 endless eos-shell.desktop[1316]: /var/lib/flatpak/app/com.google.Chrome/x86_64/eos3/6a60d57a393e778f6b56b74bd20f19b8e0a9e3fdb4ae2831c8f5b66e2fd7b4a6/files/extra/opt/google/chrome/google-chrome: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

And, this actually makes sense, because the syntax in the .desktop file that Chrome generated is not the right one for launching a flatpak so that the application has access to the shared objects that are embedded with the flatpak. And, unfortunately, we don’t have control over how the closed-source Chrome creates the .desktop file, so it might be tricky to fix. Ideally, if Google provided a flatpak that they directly support, we would be all set, but in the meantime perhaps there is a way that we could intercept any attempt to launch google-chrome and instead launch it properly via flatpak – no promises, but we can look into that.

If I go back to chrome://apps/ on Chromium, and right-click on the app and Create Shortcuts again, the app is working again. The only question is whether Chrome’s automatic overwriting of existing .desktop files was a one-time thing, or something that it tries to resync periodically. If just a one-time thing, the work around would be to configure both Chromium and Chrome, then go to Chromium and add the apps to the desktop (in which case they would run in Chromium rather than Chrome).

Roddy

After a little bit more testing, it appears that the first time I add an app to the desktop via Chromium, it works for just a minute or two and then Chrome somehow detects it and rewrites it. But then if I re-add to the desktop via Chromium, it continues to work, at least for the next hour or so.

@roddy Thank you so much for looking at the issue. I very much appreciate you detailed break down of what is going on in the system. I am trying to sort out the internals of how Endless OS works, and the details of where folders and and what the files are for are very helpful.

I am going to trying going into the ~/.local/share/applications/ and set the chrome app files as read only and see if that would keep installing Chrome from messing things up for me.

The Gnome desktop generally includes an easy to use log viewer (gnome-system-log). That is not included in Endless OS. Could you direct me the folder containing the system logs? My hunting and pecking has not uncovered them yet.

Thanks again and enjoy your weekend.
bill

@wove Great idea on making the files read-only! I think that should work.

By default, system logs are in memory. You can use systemctl to view them. If you’d like them to persist to file, you can sudo mkdir -p /var/log/journal and reboot, and the files will be in that directory.

Roddy

@roddy Unfortunately that did not work. I used chmod 0444 /sysroot/home/william/.local/share/applications/chrome* which showed all the files in the directory as being locked. Then when I launched Chrome and signed into my account, Chrome seems to have thrown all the locked files away and created a whole new set which do not work. I did make a backup of the original directory, so I can uninstall Chrome and return back.

I can see why a person would choose to use Chrome or Chromium, but it is hard to see why an individual user would want both installed. Chrome as I understand is a flatpak. However Chrome does not show up doing flatpak list. Which means the user cannot remove it from the system. My use case scenerio would be solved if I could simply do “flatpak uninstall chome”.

For browsing I prefer Epiphany/Gnome web. It is small light weight and fast. I install Chrome as an application framework. All the Chrome apps work fine offline and sync when a connection becomes available. Which means whatever work I do is then available on practically any computer that is nearby.

The challenge of trying any new OS is figuring out the natural workflow the OS lends itself to and then figuring out if your personal work flow can changed to easily fit. That of course if often more user bias than a failing of the OS.

bill

@wove You can uninstall Chrome, either via the app center, or from the command line:

flatpak uninstall com.google.Chrome

(If installed, it should show up in flatpak list | grep -i chrome)

Chromium is shipped as part of the core operating system so that every user is guaranteed to have a browser available. For most users of Endless hardware for which we have purchased codecs licenses, that is the only browser that would be needed. But for users of non-Endless hardware, we recently set it up to automatically download Chrome when you first get on the network, because many users were having problems and getting confused by the missing codecs, which Google licenses for use with Chrome.

Since we cannot distribute Chrome directly but rather have to download it from Google, we ship a google-chrome.desktop file that is what actually shows on the desktop, and is a wrapper to either launch Chrome if the download has completed or open the Chrome page in the app center otherwise. If you get into a situation where you have the Chrome icon on the desktop (even though the flatpak is uninstalled), you can drag it to the trash to remove it. Likewise, you can right-click the Chrome icon on the taskbar to unpin it.

Downloading Chrome and installing it as a flatpak is a feature that we only recently added, so it may still have a few glitches like the one you found. We do hope that Google will officially support a flatpak soon, and if and when they do we would switch to using their repo rather than our “external” flatpak downloader. (FWIW, this “external” flatpak downloader is also used for Dropbox, Skype, and Spotify – other closed source packages that we cannot redistribute directly.)

Epiphany is now available as a flatpak and can be installed on Endless. In the app center, search for “Web” (this is the user-visible name that GNOME uses for Epiphany). If that does not work, please note that we only recently added support for the GNOME repos, and users who upgrade from an older version of Endless won’t see this until upgrading to 3.1.2 (schedule to become available on Monday).

Roddy

@ roddy Thanks. I was confused because Chrome remains in the store.
Flatpaks from other sources disappear from the software center when you
delete them.

The Gnome repos will make a nice addition. I look forward to Monday’s
update I am on 3.1.1.

bill