134

Since I installed Ubuntu (fresh install on a new machine), and set Google Chrome as default browser, whenever I open links from external apps these are open as blank tabs in new browser window (no actual redirection to site, just a blank tab).

I switched to Firefox and this behavior doesn't persist. If I switch back to Chrome as default browser (via default apps) it happens again.

I noticed that both in Unity Launcher and from the default app settings, Chrome isn't called just 'Google Chome' but 'New Tab - Google Chrome'. Not sure if this is related or how to fix it. I made some searches that suggest to look for mimeapps.list or check that the google-chrome-stable.desktop contains a %U value, but none of these helped.

This is an extract of the .desktop entry by the way:

[Desktop Entry]
Version=1.0
Name=Google Chrome
Exec=/usr/bin/google-chrome-stable %U
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito

this is mimeapps.list

[Default Applications]
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
1
  • I had the same issue and adding %U as the accepted answer below fix it for me.
    – Nam G VU
    Nov 14, 2017 at 3:49

2 Answers 2

250

As unfulvio said, the issue is with google-chrome.desktop, and it is missing the %U argument .

Open file: $HOME/.local/share/applications/google-chrome.desktop

Find the line:

Exec=/opt/google/chrome/chrome

Add a space and %U:

Exec=/opt/google/chrome/chrome %U

Then save the file.

18
  • 3
    I made this change and also changed the name to Google Chrome. Thanks.
    – revnoah
    Feb 12, 2016 at 4:53
  • 1
    Is there an open bug for chrome? Mar 31, 2016 at 10:31
  • 1
    I just had to run this on Ubuntu 16.04 google-chrome Version 51.0.2704.63 - It's clearly not been fixed.
    – Layke
    May 27, 2016 at 13:49
  • 2
    use gedit to open a file to make the edit its working fine
    – santhosh
    Apr 11, 2017 at 5:55
  • 2
    OMG you just saved my life. Lots of love!
    – Riccardo
    Dec 30, 2020 at 8:16
11

I think I solved by removing this .desktop entry:

rm $HOME/.local/share/applications/google-chrome.desktop

which had the erroneous name New Tab - Google Chrome and was responsible for the new window/tab behavior described in my original question

I had to recreate the app icon after that, though

5
  • Weird that you would fix your issue and then post an answer without the fix Nov 24, 2015 at 0:56
  • 1
    Ok, in my case the problem didn't solve with the answer you provided (which is still useful and had upvoted it). My problem solved by deleting the duplicate entry with the wrong name and I provided the command line to do exactly what I did. Probably a portion of the people who come across this will solve their issue with your fix, but some others, like me, might not and try deleting the .desktop entry. This is a bit old though and haven't seen the issue appearing anymore.
    – unfulvio
    Jan 5, 2016 at 13:16
  • 1
    I was able to solve the problem without deleting the file. nomad311 posted a good partial solution, the name just needed to be cleaned up.
    – revnoah
    Feb 12, 2016 at 4:56
  • due to popularity I switched the correct answer to @nomad311 - however anyone bumping into this unable to solve should consider my option too, it did the job for me
    – unfulvio
    Mar 14, 2016 at 19:22
  • @unfulvio Thanks this fix worked Jan 25, 2022 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .