121

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
  • I had the same issue and adding %U as the accepted answer below fix it for me. – Nam G VU Nov 14 '17 at 3:49
229

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.

  • 3
    I made this change and also changed the name to Google Chrome. Thanks. – revnoah Feb 12 '16 at 4:53
  • Is there an open bug for chrome? – AlikElzin-kilaka Mar 31 '16 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 '16 at 13:49
  • 1
    Chrome version 51.0.2704.103 (64 bits) && Ubuntu 16.04 => this answer worked. – Jules Lamur Jun 24 '16 at 8:21
  • 1
    use gedit to open a file to make the edit its working fine – santhosh Apr 11 '17 at 5:55
10

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

  • Weird that you would fix your issue and then post an answer without the fix – LostNomad311 Nov 24 '15 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 '16 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 '16 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 '16 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.