local google-chrome.desktop has Exec with missing %U, so gnome-open & xdg-open will not work
Reported by
jim.av...@gmail.com,
Aug 11 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Steps to reproduce the problem:
1. Make google-chrome the default browser using the button at the bottom of chrome's Settings page. Exit & restart chrome and verify the setting.
2. In a terminal, type
"xdg-open http://www.example.com"
or "gnome-open http://www.example.com"
What is the expected behavior?
A tab opens containing www.example.com
What went wrong?
Chrome opens a tab but it contains the default page. The specified URL is not loaded.
This problem does not exist when Firefox is the default browser.
Did this work before? N/A
Chrome version: 60.0.3112.90 Channel: stable
OS Version:
Flash Version: Shockwave Flash 26.0 r0
The root cause is that google-chrome creates the file
$HOME/.local/share/applications/google-chrome.desktop
and that file contains
Exec=/opt/google/chrome/chrome
but it should contain
Exec=/opt/google/chrome/chrome %U
The %U causes the url parameter to be interpolated into the command line.
,
Aug 15 2017
My mistake - the bad $HOME/.local/share/applications/google-chrome.desktop file is not created when google-chrome is made the default browser, but when the chrome icon in the Ubuntu Launcher is locked with rightclick->Lock to Launcher. Furthermore, this now only seems to happen when running with --user-data-dir=/somewhere/nonstandard, but I don't think that was always the case. Other users have had this problem, see https://askubuntu.com/questions/499200/xdg-open-opens-chrome-but-does-not-load-the-url In my case, I just just noticed that the modtime of the bad .desktop file is many months old, created with earlier versions of google-chrome and Ubuntu. Most likely there was a bug somewhere which has since been fixed. I apologize for the incorrect bug report! If anyone is interested, here is how to reproduce the problem today (with google-chrome 60.0.3112.90 and Ubuntu 17.04): 1. Ensure that chrome is not running. Remove any chrome icons from the Ubuntu launcher (rightclick->Unlock) 2. rm -rf /tmp/testud; mkdir /tmp/testud google-chrome --user-data-dir=/tmp/testud > Click OK to the initial pop-up 3. Right-click the chrome icon in the launcher->Lock to Launcher 4. Exit chrome 5. xdg-open http://www.example.com # does not work Note: The created $HOME/.local/share/applications/google-chrome.desktop file contains Exec=/opt/google/chrome/chrome --user-data-dir=/tmp/testud so somehow the --user-data-dir arg is getting passed to the code which creates the file. I used loggedfs to determine that the .desktop file is created by Ubuntu's bamfdaemon, which tries to match windows and processes and intuit how to create .desktop files which can restart the processes. I looked briefly at the bamf code but could not figure out where the Exec string comes from.
,
Aug 15 2017
Thank you for providing more feedback. Adding requester "mmanchala@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 15 2017
... the problem no longer happens with new users, but that's not because a valid .desktop file is now being created; rather it is because bamfdaemon doesn't create $HOME/.local/share/applications/google-chrome.desktop at all any more when google-chrome isn't started with non-standard options. Speculation: /usr/share/applications/google-chrome.desktop did not used to exist in earlier releases of the Ubuntu chromium package, which might have made bamfdaemon create a .local file (incorrectly).
,
Aug 23 2017
,
Nov 2 2017
Unable to reproduce the issue on reported version 60.0.3112.90 and latest stable 62.0.3202.62 and latest Canary 64.0.3255.3 using ubuntu 14.04 with the steps mentioned in C#2
,
Nov 4 2017
Ubuntu is ditching Unity (in favor of Gnome) starting with Ubuntu 18.04. The whole bamfdaemon thing might change. And it seems like Chrome can't work around the problem anyway. So I suggest closing this as "WontFix". Possibly re-open next year if someone reports the problem still occurs using the Gnome desktop, not Unity (i.e. on Ubuntu 18.04+ or 17.10 with the optional Gnome login).
,
Nov 7 2017
AS per the comment #7 marking this issue as 'WontFix'. |
|||
►
Sign in to add a comment |
|||
Comment 1 by mmanchala@chromium.org
, Aug 14 2017Labels: Needs-Triage-M60 Needs-Feedback
1.2 MB
1.2 MB View Download