External links are opened as blank tabs in new browser window in Chrome
Solution 1
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.
Solution 2
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
Related videos on Youtube
unfulvio
Updated on September 18, 2022Comments
-
unfulvio over 1 year
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
-
Nam G VU over 6 yearsI had the same issue and adding %U as the accepted answer below fix it for me.
-
-
LostNomad311 over 8 yearsWeird that you would fix your issue and then post an answer without the fix
-
unfulvio over 8 yearsOk, 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.
-
Dave about 8 yearsI made this change and also changed the name to Google Chrome. Thanks.
-
Dave about 8 yearsI was able to solve the problem without deleting the file. nomad311 posted a good partial solution, the name just needed to be cleaned up.
-
unfulvio about 8 yearsdue 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
-
AlikElzin-kilaka about 8 yearsIs there an open bug for chrome?
-
Krishna almost 8 yearsI just had to run this on Ubuntu 16.04 google-chrome Version 51.0.2704.63 - It's clearly not been fixed.
-
cfogelberg over 7 yearsThis bug also affects WebStorm 2016.2.1 and the above fix to google-chrome.desktop resolves the issue there as well.
-
Vadim about 7 yearsIt's still the case - March of 2017 here :( Nobody can fix this?
-
santhosh about 7 yearsuse gedit to open a file to make the edit its working fine
-
Gui13 over 6 yearsI took the time to log in to upboat you, this saved my sanity. I had the same issue with the nightly version of Firefox which wouldn't open any clicked link, and it was driving me crazy.
-
Fractalf over 6 yearsThanks! Had the same problem here in Firefox Dev edition. Had to add the %u to
~/.local/share/applications/cinnamon-custom-launcher-1.desktop
on Linux Mint 18.2 -
Alkarin over 6 yearsThis fixed the issue for me with firefox. Is there anywhere to find more info on these arguments?
-
LostNomad311 over 6 yearsdeveloper.mozilla.org/en-US/docs/Mozilla/Command_Line_Options should get you started with more options
-
Akshay Paliwal almost 6 yearsThis worked for me on Ubuntu v16.04 and chrome v66
-
ONeZetty over 5 yearsWorks perfect on Ubuntu 16.04 Unity Chrome Versión 70.0.3538.110 (Build oficial) unknown (64 bits)
-
Julian over 5 yearsThis is potentially still relevant on Ubuntu 18.10. I've just had to do it on 2018-12-05 after restoring my system after a catastrophic update (catastrophe my fault, I suspect).
-
maks about 5 yearsdoesn't work on Ubuntu 18.04
-
tenken almost 5 yearsWorked for me on Ubuntu 18.04
-
Riccardo over 3 yearsOMG you just saved my life. Lots of love!
-
IgorAlves about 3 yearsI didn't have this line. I had to create it.
Exec=/opt/google/chrome/chrome %U;
at the end of the file. -
karthik nair over 2 years@unfulvio Thanks this fix worked
-
SL5net about 2 yearsi don't have
~/.local/share/applications/google-chrome.desktop
inKubuntu 20.04, KDE Plasma Version: 5.18.8