0

I installed Chrome via a PPA in order to get the proper codecs/DRM stuff required to watch Netflix on Ubuntu (15.10). Now if I run $ google-chrome-stable from the command line it works great.

But I'd prefer to not have to run it from the command line every time so once it was open I pinned/locked it to the launcher. Great, now I can click the icon.

However, when it's launched this way, the Netflix codec stuff doesn't work and I get an error. What gives? How is starting Chrome from the launcher different from starting it from the command line?

3
  • 1
    Did you have another version of google-chrome installed before? If so, outdated .desktop files will be in ~/.local/share/applications let me know. Jan 29, 2016 at 6:42
  • 1
    Why do you say that outdated .desktop files will be in ~/.local/share/applications? Do you mean that if a .desktop file is in ~/.local/share/applications, it won't be written over when the one in /usr/share/applications is?
    – DK Bose
    Jan 29, 2016 at 10:16
  • @DKBose exactly. New installations never overwrite local .desktop files, while the local ones overrule the global ones. Also chrome creates local ones happily :). Jan 30, 2016 at 12:33

1 Answer 1

2

I expect your launcher is running the command google-chrome.

Mine is:

[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/usr/bin/google-chrome
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;

Open terminal and run this command:

sudo -H gedit /usr/share/applications/google-chrome.desktop

and edit the Exec line.

5
  • 1) Can you please explain the use of sudo -H. The explanation of -H in man sudo doesn't seem to cover the usage suggested in the answer. 2) I haven't used a GUI-based editor with elevated privileges recently. But I remember something about gksudo and pkexec.
    – DK Bose
    Jan 29, 2016 at 2:18
  • Also, if one edits a .desktop file in /usr/share/applications, won't that file be written over each time the application is updated. My experience is that Google Chrome, even the stable version, receives "point" updates.
    – DK Bose
    Jan 29, 2016 at 4:14
  • 1
    @DKBose The -H flag is to avoid root owned files in the user's home area. It set's the "Home" to /root. It's the alternative to -i which is depreciated now askubuntu.com/a/632831. GKSudo is now not supported, and not installed by default and pkexec requires a lot of configuration first. sudo -H gedit is the accepted solution. As for overwritten, not as far as I know, but maybe Google Chrome does.
    – Tim
    Jan 29, 2016 at 9:55
  • Thanks for clarifying. I had looked around but didn't come across the information. Re. the .desktop file being overwritten, it happened to me some time ago but now I mostly use ~/.local/share/applications for any mods I make to .desktop files.
    – DK Bose
    Jan 29, 2016 at 10:10
  • @DKBose This answer5 was written in a hurry, quite late. If you want to edit it to explain changing it to there, feel free!
    – Tim
    Jan 29, 2016 at 14:06

You must log in to answer this question.

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