Using the latest Chrome in Lucid 5.28

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
torgo
Posts: 71
Joined: Fri 09 Sep 2011, 15:42

Using the latest Chrome in Lucid 5.28

#1 Post by torgo »

If you download the 32-bit .deb file for the latest Google Chrome, petget will install it - but it won't show up on the menu or the list for selecting the default browser, and running the executable file simply gives an error message saying it won't run as root.

For near-beginners like me, that's a lot of obstacles to overcome.

But it turns out that it's not so bad.

Suggestion: try this with a clean save file so that you know you're not doing any real damage no matter what.

Here's the walkthrough:


1) Download the latest Chrome 32-bit .deb file
(Suggestion: save the .deb file so that you can use it again later without having to download it again.)
Open it with petget to install it.

2) At least with the current versions, the whole thing ends up in the folder /opt/google/chrome.
Go to that folder and open the google-chrome.desktop file as text.

3) The "Exec" line is around line # 108.
Add "--user-data-dir" to this line BEFORE the %U.
The line will now read:

Exec=/opt/google/chrome/google-chrome --user-data-dir %U



If all you want is a working Chrome, you could save the file and stop there.
Clicking on google-chrome.desktop will launch Chrome, and you can drag it to your desktop to make a quick launch shortcut.

But we can also make it a lot more neat and tidy...



4) There are plenty of icon files in the folder, but for whatever reason, the google-chrome.desktop file isn't using any of them.

Change the "Icon" line (around line # 110) to select one. Example:

Icon=/opt/google/chrome/product_logo_64.png


5) One of the reasons Chrome doesn't automatically show up in the Menu and the default browser selection list is the Categories line, which should be around line # 112.

Change it to read:

Categories=X-Internet;


6) Scroll down to the end of the google-chrome.desktop file.
Add a blank line and then the following lines:

[Junk To Fool Script]
Exec=google-chrome

Then save and close the google-chrome.desktop file.


The really long explanation (skip down to step 7 if you don't care)...

01micko's script program that builds the default browser selection list is absolutely brilliant. (Micko - I'm in awe.)

But the current version of Chrome doesn't play nicely. It adds two extra huge sections to the .desktop file ([NewWindow Shortcut Group] and [NewIcognitoWindow Shortcut Group) intended for the Unity interface.

These extra sections don't do anything for Puppy, though at this point there's no harm in leaving them.

The main thing is that the script for the default browser list takes the browser name from the Exec line in the very last section that it sees in the .desktop file. If that line has a space, it reads the stuff after the space and uses that as the browser's name.

When it sees "Exec=/opt/google/chrome/google-chrome --incognito", it adds "--incognito" to the list of browsers, not "google-chrome".

Deleting these two huge extra sections won't help, because the script would then take the name as --user-data-dir from the first Exec line, and we need to keep that one.

So we're adding an extra section of our own, just to make sure the name is exactly right. It will never be used for anything else, but the script will see the last Exec line and add "google-chrome" to the list of browsers.



7) The other reason why Chrome doesn't show up in the menu or the default browser list is because the .desktop file isn't in the right place. Make a link (relative link or sym link) to it in /usr/share/applications so that Puppy can find it.




8.) Right click on the Browse icon on the desktop.
Choose "Edit Item".
In the "Arguments to pass (for executables)" box, type in

--user-data-dir



9) Reboot, and you should be all set.



After you reboot, Chrome should be in the Internet section of the start menu (with the icon you chose), and it should be on the list of available browsers when you select the default browser.

When you select it as the default, you'll still get the error message saying it can't run as root. Don't panic - the default broswer selection script is simply trying to open the browser directly, without the --user-data-dir. Just close the error message.

When you click the Browse icon to open the default browser, it should open just fine. Same thing when you open it from the Menu.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#2 Post by mavrothal »

Nice walk through :)

Yo might also want to try this pet. Should be OK in lucid
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Post Reply