VectorLinux

Cooking up the Treats => New Package Requests => Topic started by: brokndodge on July 25, 2009, 07:03:35 pm

Title: google chrome linux...
Post by: brokndodge on July 25, 2009, 07:03:35 pm
i've aquired a very old pII 300 laptop with a minimal 160mb of ram.  i know it's an antique, but at the moment it's all i have.  the netgear pc card is working flawlessly under VL 6, but firefox is slow.  i am running the linux dev version of google chrome at work on a low resource system on top of ubuntu.  not my choice but IT won't let me switch to VL.  firefox takes more than two minutes to load the company e-mail site, google chrome takes less than 2 sexonds.  the entire browser is just blazing fast, plugins and printing are not yet supported, but for the very rare times when i need either, firefox is there.

i would like to try google chrome on this antique computer.  just to see if browsing the web can be sped up.  i tried alien, but it fusses about not being a tar archive. 

Code: [Select]
Vector://home/user1/Desktop
root:# alien google-chrome-unstable_current_i386.deb -t
no entry data.tar.gz in archive

gzip: stdin: unexpected end of file
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Error executing "ar -p google-chrome-unstable_current_i386.deb data.tar.gz | gzip -dc | tar tf -":  at /usr/lib/perl5/site_perl/5.10.0/Alien/Package.pm line 474.

i was wondering if someone with a better system than mine could build a package i could install from the repo.  my old system would just be painful to try to build anything on.  just typing in the post the display is two words behind what i am typing.

Binary release only available as a Debian  package
Quote
http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb

Instructions for getting Linux source and building Chrome
Quote
http://code.google.com/p/chromium/wiki/LinuxBuildInstructions

thank you kind souls who take pitty on this poor man.  i am getting a raise at work and may actually be able to purchase a decent low end laptop in the next few months.  of course, VL will be immidiately installed.  but in the meantime, i think chrome might just help me out.
Title: Re: google chrome linux...
Post by: kc1di on July 26, 2009, 02:21:35 am


i would like to try google chrome on this antique computer.  just to see if browsing the web can be sped up.  i tried alien, but it fusses about not being a tar archive. 


[/quote]

Unfortunately Google as far as I know has not released their source code yet. The link you mentioned is for a .Debian file. which will work in Ubuntu. But not in VL without being changed around it can be done but not that easy.  In any event give Opera a try if you have VL6.0 Standard installed it's already there.  If it works for you you can upgrade 9.63 to 9.64 by enabling the Testing Repository in Gslapt.

I'll take a longer look at Chrome when time permits me. 

Good Luck,
Dave

Also if you need a minimalist Browser Dillo works well.
it there also or in the repository.
Title: Re: google chrome linux...
Post by: hata_ph on July 26, 2009, 03:47:11 am
I come across this blog saying they can install chrome in slackware....maybe you can have a try..

http://ipapers.blogspot.com/2009/06/installing-google-chrome-in-slackware.html

PS: chrome for linux is still under development, so I am not sure about bug and security issue.... :P
Title: Re: google chrome linux...
Post by: brokndodge on July 26, 2009, 08:49:36 am
I'm sorry, I thought I ad been more clear in my original post.  I am aware that Chrome is early development.  But the webkit and custom java engine are highly tweaked and state of the art.  Chrome is blazing fast even on low resource machines. 

The two links I provided are the available methods for installing chrome.  The first is the binary only available in deb at the moment.  I believe I did post my results of attempting to convert it using alien. The second link is how to get the linux source directly from google.

i am terribly sorry for the confusion.
Title: Re: google chrome linux...
Post by: brokndodge on July 26, 2009, 10:31:26 am
Ok, so I did a lil command line work and got chrome installed from the .deb pachage.  Chrome is crashing on the VL home page, but at least it starts.  I think the problem may be with the required dependencies being to old.

I am aware of the following deps and will try to track down any others:

pango - version 1.20.0 is installed, version 1.22.4 is supposed to work
caira - version 1.6.4 is installed, version 1.8.6 is supposed to work
pixman - version .10.0 is installed, version 0.15.10 is supposed to work

here's how i did it:

download chrome from http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb (http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb) and save it to your home folder.  (sorry, haven't figured out how to wget it)

then do this:
Code: [Select]
cd $home

mkdir chrome
cd chrome
ar x ../google-chrome-unstable_current_i386.deb
lzma -d data.tar.lzma
cd /
su
tar xf $home/chrome/data.tar

cd /usr/lib

ln -s /usr/lib/firefox/libnspr4.so libnspr4.so.0d
ln -s /usr/lib/firefox/libnss3.so libnss3.so.1d
ln -s /usr/lib/firefox/libnssutil3.so libnssutil3.so.1d
ln -s /usr/lib/firefox/libplc4.so libplc4.so.0d
ln -s /usr/lib/firefox/libplds4.so libplds4.so.0d
ln -s /usr/lib/firefox/libsmime3.so libsmime3.so.1d
ln -s /usr/lib/firefox/libssl3.so libssl3.so.1d

just type google-chrome on any command line to run it.
Chrome runs, but crash's on the only page i've tried it on.  I'll work on the deps later today.  Once I get it working I think I can set up a script for cron to keep it updated.  Just a quick thought, VL6standard comes with firefox 3.0.6, chrome may need 3.0.8 or later to run, i will investigate this later.

pulled some info from this page:  http://ipapers.blogspot.com/2009/06/installing-google-chrome-in-slackware.html

just hacked the rest on the command line.
Title: Re: google chrome linux...
Post by: rbistolfi on July 26, 2009, 04:56:38 pm
The crash seems to be related to ssl features. The error message suggests to relink the library, looks like a native build would solve it.
Title: Re: google chrome linux...
Post by: brokndodge on July 26, 2009, 05:20:27 pm
ok, upgraded firefox to 3.5, i can now get yahoo front page to load, but chrome crashes when i click on mail.  vectorlinux.com still crashes.  

google chrome deps from the .deb package and our equal packages:

libasound2 (no version listed) - provided by alsa-lib
libatk1.0-0 (>=1.13.2) - atk-1.22.0-i486-1
libc6 (>=2.6-1) - debians name for glibc, we have glibc-2.7-i486-10
libcairo2 (>=1.4.0) - debians name for cairo, we have cairo-1.6.4-i586-1vl60
libfontconfig1 (>=2.4.0) - fontconfig-2.4.2-i486-2
libfreetype6 (>=2.3.5) - freetype-2.3.8-i586-1vl60
libgcc1 (>=1:4.2.1) - gcc-4.2.3-i486-1?
libglib2.0-0 (>=2.14.0) - glib2-2.16.3-i586-1gsb
libgtk2.0-0 (>=2.12.0) - gtk+2-2.12.9-i486-1
nspr (>=4.7.4) - https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_3_RTM/src/
nss (>=3.12) - https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.4/src/
libpango1.0-0 (>=1.18.3) - pango-1.20.0-i486-1
libstdc++6 (>=4.2.1) - provided by gcc?
lsb-base (>=3.2) - ?
xdg-utils (>=1.0.1) - xdg-utils-1.0.2-i586-1vl60
zlib1g (>=1:1.2.3.3.dfsg-1) - zlib-1.2.3-i486-2?  is this new enough?

thats the best i can figure anyway.  there are a few deps i'm concerned about, beginning to think the only way to do this will be from source.

to rbistofi - i thought that too, but firefox has the same issue with the same library.  i dunno.
-edit- according to: http://codereview.chromium.org/118367 the ssl issue is like you said.  chrome needs to be built on system identicle to target.  they have a hack that is supposed to be committed already that should fix that.  but even still, the problem is not serious enough to cause a crash. 
Title: Re: google chrome linux...
Post by: brokndodge on July 26, 2009, 05:59:39 pm
found a missing dep on this page:  http://thinkmoult.com/2009/05/19/how-to-install-chromium-google-chome-on-gentoo-linux/
edit: this IS provided by firefox, and the version with firefox is more recent than the one in the repo. /end edit
nss (>= 3.12) - nss-3.11.9-i586-2gsb, wasn't installed on my system, installed it and chrome got further than it has yet.  but it still crashed! does nss need to be updated?

Code: [Select]
Vector:/~
user1:$ google-chrome
/opt/google/chrome/chrome: Symbol `SSL_ImplementedCiphers' has different size in shared object, consider re-linking
/opt/google/chrome/chrome: Symbol `SSL_ImplementedCiphers' has different size in shared object, consider re-linking
[23595:23595:35729665387:ERROR:/b/slave/chrome-official-linux/build/src/chrome/common/ipc_channel_posix.cc(421)] pipe error (7): Connection reset by peer
Segmentation fault
Title: Re: google chrome linux...
Post by: brokndodge on July 28, 2009, 10:20:33 am
so i ran chrome inside of gdb to get a better picture of whats causing the crash.  This is what i got:

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb60d8b90 (LWP 10432)]
0xb782aa2a in ?? () from /usr/lib/libnss3.so.1d

so the nss that i am using is provided by firefox.   the package in the repo is to old, 3.11.9. chrome fusses about the version and exits.  at least it will run with the nss provided with firefox.  i think my next step is to look for the right version of nss.  according to some of the references i've dug up it should be >=3.12. chrome's error message also ask's for 3.12.

http://www.mozilla.org/projects/security/pki/nss/nss-3.12.3/nss-3.12.3-release-notes.html

edit: i updated the above list of deps.  specifically nss and nspr, still looking into others.  they seem to be maintained by mozilla foundation and distributed in source only.  far as i can tell anyway.  is there a packager available that i could talk into building these and putting in the testing repo?  all of this is guesswork, but as far as i can tell, these two are the problem packages right now.

thank you.
Title: Re: google chrome linux...
Post by: brokndodge on July 29, 2009, 08:37:29 pm
I posted a question to Google Chrome support forum in the Crashes catagory with a link back to here.

http://www.google.com/support/forum/p/Chrome/thread?tid=0d47bf60f0e1acdb&hl=en
Title: Re: google chrome linux...
Post by: brokndodge on August 03, 2009, 10:51:22 pm
SUCCESS!!!  I'm posting this from Chrome on Vector Linux.  Man is it fast.  The keyboard is even keeping up with me. 

The key to the whole thing is having latest nss and nspr.  I got nspr 4.7.4 form mozilla and managed to use sbbuilder with a little editing to get a package built well enough to install it.  I couldn't make sbbuilder configure nss.  But I found a slackbuild slackware package for 3.12.3 and installed it.  Success.  For those that want it I am going to post an small installation script and my sbbuilder nspr.SlackBuild as well as a link to the nss package I used.  Might be a long post, but maybe one of the nice packagers can take from my efforts and build a Vector Linux Package for Google Chrome.

nspr.SlackBuild (i never could get the script to wget the src package, have to manually download it and place it in the src directory.  nspr src tarball:  https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.4/src/
Code: [Select]
#!/usr/bin/bash
# This script assumes it will be launched within "/NAME/VERSION/src" dir.
# With all sources in "src" Your Vector Linux .tlz package, slack-desc,
# and slack-required will be found in "VERSION" dir. The extraction and
# build will be in a temp dir created in "NAME" dir, and then removed on exit.
# Comment out second to last line to keep this dir intact.
#
# This Template was compiled from the contributions of many users of the Vector
# Linux forum at http://forum.vectorlinux.com and from tidbits collected
# from all over the internet.
#
# Generated by sbbuilder-0.4.12.2, written by Rodrigo Bistolfi
# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
#
# Please put your name below if you add some original scripting lines.
# AUTHORS =

NAME="nspr"            #Enter package Name!
VERSION=${VERSION:-"4.7.4"}      #Enter package Version!
VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
VL_PACKAGER=${VL_PACKAGER:-"BroknDodge"}   #Enter your Name!
LINK=${LINK:-"https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.4/src/nspr-4.7.4.tar.gz --no-check-certificate"}  #Enter URL for package here!


#SYSTEM VARIABLES
#----------------------------------------------------------------------------
BUILDNUM=${BUILDNUM:-"1vl60"}
VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
ARCH=${ARCH:-"$(uname -m)"}
CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
#----------------------------------------------------------------------------


#SETUP PACKAGING ENVIRONMENT
#--------------------------------------------
CWD=$(pwd)
cd ../
RELEASEDIR=$(pwd)
cd $CWD
mkdir -p $RELEASEDIR/tmp
TMP=$RELEASEDIR/tmp
PKG=$TMP/package-$NAME
#--------------------------------------------



if [ $UID != 0 ]; then
   echo "You are not authorized to run this script. Please login as root"
   exit 1
fi

if [ ! -x /usr/bin/requiredbuilder ]; then
   echo "Requiredbuilder not installed, or not executable."
   exit 1
fi

if [ $VL_PACKAGER = "YOURNAME" ]; then
   echo 'Who are you?
   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
   Change the word "YOURNAME" to your VectorLinux packager name.
   You may also export VL_PACKAGER, or call this script with
   VL_PACKAGER="YOUR NAME HERE"'
   exit 1
fi


#CFLAGS SETUP
#--------------------------------------------
if [[ "$ARCH" = i?86 ]]; then
  ARCH=i586
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  CONFIGURE_TRIPLET="i486-slackware-linux"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fpic"
  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
elif [ "$ARCH" = "powerpc" ]; then
  SLKCFLAGS="-O2"
  CONFIGURE_TRIPLET="powerpc-vlocity-linux"
fi

export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
export CXXFLAGS=$CFLAGS
export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
#--------------------------------------------


#GET THE SOURCE
#--------------------------------------------
for SRC in $(echo $LINK);do
if [ ! -f $CWD/$(basename $SRC) ]
then
        wget -c $SRC
fi
done
#--------------------------------------------


rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf $NAME-$VERSION


#EXTRACT SOURCES
#-----------------------------------------------------
echo "Extracting source..."
tar xvf $CWD/$NAME-$VERSION.tar.* || exit 1
#-----------------------------------------------------


cd $TMP/$NAME-$VERSION

# Put any Patches here
#-----------------------------------------------------
#patch -p1 <
#-----------------------------------------------------
cd mozilla/nsprpub


#SET PERMISSIONS
#-----------------------------------------
echo "Setting permissions..."
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 2777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 2755 -exec chmod 755 {} \;
find . -perm 774 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
#-----------------------------------------



#CONFIGURE & MAKE
#----------------------------------------------------------------------
# If you are building a KDE-related app, then change the following
# arguments in the script below:
# --prefix=$(kde-config -prefix) \
# --sysconfdir=/etc/kde \
#
# Making these changes will ensure that your package will build in the
# correct path and that it will work seamlessly within the KDE environment.
#
#-----------------------------------------------------------------------

echo "Configuring source..."
./configure --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --with-included-gettext \
  --disable-debug \
  --program-prefix="" \
  --program-suffix="" \
  --build=$CONFIGURE_TRIPLET \
  $CONFIG_OPTIONS || exit 1

make || exit 1

make install DESTDIR=$PKG || exit


#######################################################################
#Miscellenious tweaks and things outside a normal ./configure go here #
#######################################################################



mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
$PKG/usr/doc/$NAME-$VERSION
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild

#----------------------------------------------------------------------

if [ -d $PKG/usr/share/man ] ; then
mkdir -p $PKG/usr/man
mv $PKG/usr/share/man/* $PKG/usr/man
rm -rf $PKG/usr/share/man
fi
find $PKG/usr/man -type f -exec gzip -9 {} \;

if [ -d $PKG/usr/share/info ] ; then
mkdir -p $PKG/usr/info
mv $PKG/usr/share/info/* $PKG/usr/info
rm -rf $PKG/usr/share/info
fi

find $PKG/usr/info -type f -exec gzip -9 {} \;
mkdir -p $PKG/install
if [ -d $PKG/usr/info ] ; then
cat >> $PKG/install/doinst.sh << EOF
cd usr/info
if [ -f dir ]; then
    rm dir
fi
if [ -f dir.gz ]; then
    rm dir.gz
fi
for i in *.info.gz
        do
        install-info $i dir
    done
EOF
fi

mkdir -p $PKG/install


#if there is a slack-desc in src dir use it
if test -f $CWD/slack-desc; then
cp $CWD/slack-desc $RELEASEDIR/slack-desc
else
# This creates the white space in front of "handy-ruler" in slack-desc below.

LENGTH=$(expr length "$NAME")
SPACES=0
SHIM=""
until [ "$SPACES" = "$LENGTH" ]; do
SHIM="$SHIM "
let SPACES=$SPACES+1
done

# Fill in the package summary between the () below.
# Then package the description, License, Author and Website.
# There may be no more then 11 $NAME: lines in a valid slack-desc.

cat > $RELEASEDIR/slack-desc << EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

$SHIM|-----handy-ruler------------------------------------------------------|
$NAME: $NAME ()
$NAME:
$NAME:
$NAME:
$NAME:
$NAME:
$NAME:
$NAME: License: GPL
$NAME: Authors:
$NAME: Website:

EOF
fi
cat >> $RELEASEDIR/slack-desc << EOF



#----------------------------------------
BUILDDATE: $(date)
PACKAGER:  $VL_PACKAGER
HOST:      $(uname -srm)
DISTRO:    $(cat /etc/vector-version)
CFLAGS:    $CFLAGS
LDFLAGS:   $LDFLAGS
CONFIGURE: $(awk "/\.\/configure\ /" $TMP/$NAME-$VERSION/config.log)

EOF

cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc

#STRIPPING
#------------------------------------------------------------------------------------------------------------------
cd $PKG
echo " "
echo "Stripping...."
echo " "
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
#------------------------------------------------------------------------------------------------------------------


#FINISH PACKAGE
#--------------------------------------------------------------
echo "Finding dependencies..."
ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.tlz"
makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.tlz

cd $CWD
echo "Cleaning up temp files..." && rm -rf $TMP
echo "Package Complete"
#--------------------------------------------------------------

# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##

i found a SlackBuild script for nss:  http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/build/mozilla-nss.SlackBuild

or you can just get connie's SlackWare nss package:  http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2/


My install-chrome.sh script, it assumes google-chrome-unstable_current_i386.deb is in the users home directory, written to abuse sudo. Can also be used to get the latest buildbot snapshot.  Use the links in my earlier posts to get the .deb
Code: [Select]
chmod 755 install-chrome.sh
./install-chrome.sh
install-chrome.sh
Code: [Select]
#!/bin/bash
function dowhat {
###########################
#
# First run or update?
#
###########################

echo
echo
echo "Do we need to create the simlinks? (y/n)"
read YN
if [ "$YN" = "y" ]; then
simlinks
fi
}

function simlinks {
cd /usr/lib
sudo ln -s libnspr4.so libnspr4.so.0d
sudo ln -s libnss3.so libnss3.so.1d
sudo ln -s libnssutil3.so libnssutil3.so.1d
sudo ln -s libplc4.so libplc4.so.0d
sudo ln -s libplds4.so libplds4.so.0d
sudo ln -s libsmime3.so libsmime3.so.1d
sudo ln -s libssl3.so libssl3.so.1d

quit
}

function quit {
echo
echo
echo "Are you sure your done? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else
exit 0
fi

}

function clean-up {
rm -R $HOME/chrome
}

function deb {
echo
echo
echo "Are you sure you want to install"
echo "Chrome from Deb? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else

mkdir $HOME/chrome
cd $HOME/chrome
echo Unpacking the deb file...
ar -x $HOME/google-chrome-unstable_current_i386.deb
echo Extracting Google Chrome...
lzma -d data.tar.lzma
cd /
echo Installing Google Chrome...
echo Password may be required
sudo tar xf $HOME/chrome/data.tar
fi
dowhat
echo
echo
echo "Do you want me to clean up? (y/n)"
echo
read YN
if [ "$YN" = "y" ]; then
echo Cleaning up my mess...
clean-up
else
echo You will have to manually
echo remove $HOME/chrome before
echo Next Install!!!
fi

echo Installation complete!
echo Just type google-chrome
quit

}

function buildbot {
echo
echo
echo "Are you sure you want to install"
echo "Chrome from the Buildbot? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else

rm -R $HOME/chrome-linux
mkdir $HOME/chromium-buildbot
cd $HOME/chromium-buildbot
wget -r -nH -nd http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/LATEST

#Open file for reading to array
exec 10< LATEST
read BUILD <&10
echo Getting build number:  $BUILD
exec 10>&-
rm LATEST
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/$BUILD/chrome-linux.zip
unzip -d $HOME/ chrome-linux.zip
cd $HOME
rm -R $HOME/chromium-buildbot
fi
echo Installation complete!
cd $home/chrome-linux
echo just type ./chrome
quit
}

function main {
echo
echo
echo Which Version of Chrome Do you want to install?
echo
select i in deb buildbot simlinks quit
do
[ "$i" = "deb" ] && deb
[ "$i" = "buildbot" ] && buildbot
[ "$i" = "simlinks" ] && dowhat
[ "$i" = "quit" ] && quit
done
}

main
quit

Please forgive my sloppy code, I'm fairly new to shell scripting.  I appriciate all the help from the folks that offered suggestions in all three of my forum posts on this topic.  We've been thru a long journey in the last few days.  I hope one day soon to see a Google Chrome package in the repo.  Sorry, I didn't build it form source, my system is just not big enough.

I won't mark this thread solved, it's not a package... yet.

/*edit once i got done enjoying my browsing experience on this ancient machine running google chrome, i remembered to test the build bot version.  still no go, i may post a bug report to chromium about it.  seems like if the .deb installs fine, then so should the buildbot.  anyway, i hope someone benifits from all this work. endit*/
Title: Re: google chrome linux...
Post by: stretchedthin on August 03, 2009, 11:58:48 pm
Awesome job!!!  More impressive considering the specks of the machine you were working with.  I'm also impressed by the superior speed of chrome after reading your previous description of firefox.  How about the plug-ins? Is flash to much to ask?
Title: Re: google chrome linux...
Post by: Daniel on August 04, 2009, 06:57:35 am
brokndodge: Does your install script let you install directly from the .deb file so you don't have to make the package? Or do you still have to make the package and dependencies?

Also, a suggestion for the install script... Instead of using sudo a lot, you could check and make sure that the user runs the script as root. Then when it is run as root, all root only actions would work.
Title: Re: google chrome linux...
Post by: brokndodge on August 04, 2009, 07:54:54 am
stretchedthin:  plug-in support has been added to chrome, but it's still buggy.  i understand that flash should work, tho i haven't tested it.  plug-ins are disabled by default.  --enable-plugins is how you enable them, iirc. -- edit: flash does work, tried hulu.com.  everything loaded fine, but on my ancient pII it was dreadfully slow.  better than firefox tho, even simple flash apps won't run in firefox on this machine.  simple flash apps run fine in chrome, but something like streaming video is just beyond the capability of this old machine. :endit---

Daniel:  my script installs directly from the .deb, no tgz or tlz package is created.  i just crack the .deb and pull the parts i need.  as far as running from root, should be easy to do for someone thats used to working as root.  i came from the ubuntu world where sudo is king.  $HOME would have to be switched to a local variable and some other major changes.  but i'm going to look into it.  i can probably look at one of the SlackBuild scripts to see how to test for root.

i also have to figure out the update mechanism for google-chrome.  the latest update is even faster than the one i have installed.  i keep thinking that i can wget the .deb somehow and maybe wget from the google repository.

if we can get nspr >= 4.7.4 and nss >= 3.12.3 into the repo, installation of google-chrome should be a breeze.  i will clean up my install script and set it up to be run at root.  i'll also remove all the prompts, i was working with a single script to do a lot of different things during my testing.   

thx for the kind comments.
Title: Re: google chrome linux...
Post by: Daniel on August 04, 2009, 08:05:07 am
Great! I've been wanting to try Chrome so I'll probably use your script to install it. Do I still need to make the dependencies though?

When I make scripts that need to be run as root, I use something like this at the beginning of the script:

if [ $UID != 0 ];then
  echo "You must run this script as root."
  exit 0
fi
Title: Re: google chrome linux...
Post by: brokndodge on August 04, 2009, 08:17:17 am
gotta walk back thru what i did and maybe test on a clean install, but i believe the major deps are nspr 4.7.4 and nss 3.12.3.
Title: Re: google chrome linux...
Post by: brokndodge on August 04, 2009, 11:31:09 am
Updated my install script to handle the two biggest dependencies and wget google-chrome-unstable_current_i586.deb.  I posted my hacked together nspr package to my source forge site.  the script will confirm that you want to install my nspr and connie's mozilla-nss before actually doing it.  it must now be run as root (per Daniel's suggestion, thx for the code).  call this version 0.0.2.  beware, i think i did everything right, but it might damage your system.  you should always be very careful running any starnge script as root.

I will try to repackage my nspr tonight.  Hopefully, the second time around I can do it right.
UPDATE:  nspr is required to build nss, but does NOT need to be installed to run Chrome.  I'm going to try to repackage nss 3.12.3 into a nice tlz for the repo.  Maybe I can talk someone into adding it when I'm done.

Code: [Select]
#!/bin/bash
# Title:   install-chrome
# Author:  BroknDodge
# License: BSD
# Version: 0.0.2
#
# Special thanks to Vectorite Daniel for his help and suggestions.
#

if [ $UID != 0 ];then
  echo "You must run this script as root."
  exit 0
fi

function dowhat {
###########################
#
# First run or update?
#
###########################

echo
echo
echo "Do we need to create the simlinks? (y/n)"
read YN
if [ "$YN" = "y" ]; then
simlinks
fi
}

function simlinks {
cd /usr/lib
ln -s libnspr4.so libnspr4.so.0d
ln -s libnss3.so libnss3.so.1d
ln -s libnssutil3.so libnssutil3.so.1d
ln -s libplc4.so libplc4.so.0d
ln -s libplds4.so libplds4.so.0d
ln -s libsmime3.so libsmime3.so.1d
ln -s libssl3.so libssl3.so.1d

quit
}

function quit {
echo
echo
echo "Are you sure your done? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else
exit 0
fi

}

function clean-up {
rm -R /tmp/install-chrome
rm google-chrome-unstable_current_i386.deb
}

function deps {
#echo "Do you want to install BroknDodge's"
#echo "home grown nspr package? (y/n)"
#read YN
#if [ "$YN" = "y" ]; then

# cd /tmp
# wget -r -nH -nd http://downloads.sourceforge.net/project/file-butler/VectorLinux-Packages/nspr-#4.7.4-i586-1vl60vl60.tlz?use_mirror=voxel
# installpkg nspr-4.7.4-i586-1vl60vl60.tlz
# rm nspr-4.7.4-i586-1vl60vl60.tlz
#fi
echo "Do you want to install Connie's"
echo "SlackWare mozilla-nss package? (y/n)"
read YN
if [ "$YN" = "y" ]; then

cd /tmp
wget -r -nH -nd http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2/mozilla-nss-3.12.3-i486-1alien.tgz
installpkg mozilla-nss-3.12.3-i486-1alien.tgz
rm mozilla-nss-3.12.3-i486-1alien.tgz
fi
main
}

function deb {
echo
echo
echo "Are you sure you want to install"
echo "Chrome from Deb? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else
rm -R /opt/google/chrome
cd /tmp
wget -r -nH -nd http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
mkdir /tmp/install-chrome
cd /tmp/install-chrome
echo Unpacking the deb file...
ar -x /tmp/google-chrome-unstable_current_i386.deb
echo Extracting Google Chrome...
lzma -d data.tar.lzma
cd /
echo Installing Google Chrome...
echo Password may be required
tar xf /tmp/install-chrome/data.tar
fi
dowhat
#echo
#echo
#echo "Do you want me to clean up? (y/n)"
#echo
#read YN
#if [ "$YN" = "y" ]; then
# echo Cleaning up my mess...
clean-up
#else
# echo You will have to manually
# echo remove /tmp/install-chrome before
# echo Next Install!!!
#fi

echo Installation complete!
echo Just type google-chrome
quit

}

function buildbot {
echo
echo
echo "Are you sure you want to install"
echo "Chrome from the Buildbot? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else

rm -R /opt/chrome-linux
mkdir /tmp/chromium-buildbot
cd /tmp/chromium-buildbot
wget -r -nH -nd http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/LATEST

#Open file for reading to array
exec 10< LATEST
read BUILD <&10
echo Getting build number:  $BUILD
exec 10>&-
rm LATEST
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/$BUILD/chrome-linux.zip
unzip -d /opt/ chrome-linux.zip
cd /tmp
rm -R /chromium-buildbot
fi
echo Installation complete!
cd /opt/chrome-linux
echo just type ./chrome
quit
}

function main {
echo
echo WARNING WARNING WARNING WARNING WARNING
echo This script may severely damage your system!!!
echo Don't sat I didn't WARN you!
echo
echo Which Version of Chrome Do you want to install?
echo
select i in Dependencies Debian Buildbot Simlinks Quit
do
[ "$i" = "Dependencies" ] && deps
[ "$i" = "Debian" ] && deb
[ "$i" = "Buildbot" ] && buildbot
[ "$i" = "Simlinks" ] && dowhat
[ "$i" = "Quit" ] && quit
done
}

main
quit
Title: Re: google chrome linux...
Post by: brokndodge on August 04, 2009, 09:24:36 pm
as promised, here's an update script.  truth be told you could probably install from this script as well.  but, then you wouldn't have the dependency install feature that i included in my other script.  i know, it's just not the VectorLinux way.  but i had to do it myself and my box isn't powerful enough to even build the required nss package.

ok, so i figured out what debian's apt was asking for from the google repo.  managed to hack together a lil script to ask for the same thing.  it also checks to see if the version in the google repo is the same as the one installed locally.  i included a few other minor checks as well, just to reduce the number of error's that appear on the screen.

here it is (with the usual warning: this script must be run as root, always be careful when running a script as root):
Code: [Select]
#!/bin/bash
# Title:   update-chrome
# Author:  BroknDodge
# License: BSD
# Version: 0.0.1

# http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
# http://dl.google.com/linux/deb/dists/pool/main/g/google-chrome-unstable/google-chrome-unstable_3.0.196.0-r22005_i386.deb

#----------------------------------------#
# Settings

url="http://dl.google.com/linux/deb/"
tmp="/tmp"

#----------------------------------------#

#----------------------------------------#
# Testing the Environment

if [ $UID != 0 ];then # test for root
  echo "You must run this script as root."
  exit 0
fi

if [ ! -d "$tmp/update-chrome" ]; then
    # Will enter here if dir doesn't exist
    mkdir $tmp/update-chrome
fi

cd $tmp/update-chrome

if [ -f "Packages" ]; then
#checking to see if Packages exists
mv Packages Packages.installed
fi

#----------------------------------------#

function check-update {
wget http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
gunzip Packages.gz

if [ ! -f "Packages.installed" ]; then
update
fi

version=`grep 'Version:' Packages`
version=${version#*:}
read  -rd '' version <<< "$version"

VersionInstalled=`grep 'Version:' Packages.installed`
VersionInstalled=${VersionInstalled#*:}
read  -rd '' VersionInstalled <<< "$VersionInstalled"

if [ "$version" == "$VersionInstalled" ]; then
echo Google Chrome is Up to Date
rm Packages
quit
else
echo $VersionInstalled is installed, but $version is available
echo Updating
update
fi

}

function update {

filename=`grep 'Filename:' Packages` # assign grep output to a variable
filename=${filename#*:}
read  -rd '' filename <<< "$filename"  # remove white space from a variable

mkdir tmp
cd tmp
wget $url$filename

rm -R /opt/google/chrome   # get rid of the previous install
  # don't worry settings are stored in $HOME dir
cd $tmp/update-chrome/tmp

echo Unpacking the deb file...
ar -x ${filename##*/}
echo Extracting Google Chrome...
lzma -d data.tar.lzma
cd /
echo Updating Google Chrome...

tar xf $tmp/update-chrome/tmp/data.tar
cd $tmp/update-chrome
mv Packages Packages.installed
VersionInstalled=`grep 'Version:' Packages.installed`
filename=${VersionInstalled#*:}
read  -rd '' VersionInstalled <<< "$VersionInstalled"
echo Google Chrome updated to version "$VersionInstalled"
rm -R tmp

 quit
}

function quit {
exit 0
}

function main {
check-update
}

main
exit

I intend to make a version 0.0.3 of install-chrome.sh with some new checks and a lil cleaning of the code.
Title: Re: google chrome linux...
Post by: M0E-lnx on August 05, 2009, 08:30:37 am
Sorry man, I just tried your install script, and quite frankly it needs a lot of work
Here are some things you might consider changing.

First of all, don name a bash function "clean-up"
the "-" trhows the shell off there, so it wont run. Consider something like cleanup or clean_up if you must have the space.

I only tried your debian option, but failed within a split second.

here are some hits.
try the "deb2tgz" command in vectorlinux for converting a .deb to a .tgz package.
Then, explode the .tgz
Try it like this. You may still need to debug this, I haven't ran the code myself.

Code: [Select]
function deb {
echo
echo
echo "Are you sure you want to install"
echo "Chrome from Deb? (y/n)"
read YN
if [ "$YN" = "n" ]; then
main
else
rm -R /opt/google/chrome
cd /tmp
wget -r -nH -nd http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
mkdir /tmp/install-chrome
deb2tgz *.deb
cd /tmp/install-chrome
echo Unpacking the deb file...
explodepkg ../google-*.deb
echo Extracting Google Chrome...
cd /
echo Installing Google Chrome...
echo Password may be required
tar xf /tmp/install-chrome/data.tar # Not sure this is till needed.
fi
dowhat
#echo
#echo
#echo "Do you want me to clean up? (y/n)"
#echo
#read YN
#if [ "$YN" = "y" ]; then
# echo Cleaning up my mess...
clean-up
#else
# echo You will have to manually
# echo remove /tmp/install-chrome before
# echo Next Install!!!
#fi

echo Installation complete!
echo Just type google-chrome
quit

}
Title: Re: google chrome linux...
Post by: Daniel on August 05, 2009, 08:45:04 am
Just noticed something in the above code. The command "deb2tgz" doesn't exist. It should be "/sbin/deb2targz".
Title: Re: google chrome linux...
Post by: M0E-lnx on August 05, 2009, 10:14:16 am
Yeah... that one  ;D
Title: Re: google chrome linux...
Post by: brokndodge on August 05, 2009, 10:50:53 am
the google-chrome deb file is packaged with lzma compression.  when i tried alien or deb2targz, neither could handle the lzma compression.  thats why i set it up in my script for manual install.  if the deb option failed that quickly, which version of the script did you install from?  edit: just took a close look at your patch, your running version 2 with wget.  can you tell me exactly what point the script failed.  i've been working on including some error handling and a few environment checks.

if you have nss>= 3.12.3 and the simlinks are already created, could you try using my new update script as the installer.  it will pull directly from the google repository.  please let me know how it goes.  also if you could provide more detail regarding the failure point, i would appreciate that.    it is still a work in progress and testing on a variety of machines is the most important part.

thank you for your input.

final edit:  i just remembered, i may have had to "slapt-get --install lzma"  before i could crack the deb package open.  i'll add a test to the script for lzma capability.

 
Title: Re: google chrome linux...
Post by: brokndodge on August 05, 2009, 09:32:23 pm
so i've done a lot of work on my installation script.  i did not follow a previous suggestion about using deb2targz.  i prefer to do things manually if possible.  i just added checks to make sure the deps were installed.  it's possible some deps might be missing as i have not tried this on a fresh install.  takes like 6 hours to install VL60 on this machine. soon as a couple of folks let me know this thing works for them, i'm going to post it to chromium.  hopefully they can then add support for slackware and vectorlinux from their website.

changelog:

tests for the presence of lzma, if not present installs thru slapt-get

tests for the presense of nss = 3.12.3, if not present installs from connie's slackware site.
         connie.slackware.com

added a lot of tests and error points.  i think every stage of the install now has a test and error message.  that way we can tell exactly where things went wrong.

removed almost all of the user prompts.  the script still warns you that it's about to make some system changes as root.  it also now checks to see if chrome has been installed, if so it will ask if you want to remove and reinstall chrome.

checks for the existence of the simlinks.  fixme:  still need to follow the links to find out what they link to.

added menu entry to any window manager that adhere's to the freedesktop.org specification.  yes, there will now be a menu entry under xfce's menu under network.

here it is:

Code: [Select]
#!/bin/bash
# Title:   install-chrome
# Author:  BroknDodge
# License: BSD
# Version: 0.0.3
#
# Special thanks to Vectorite Daniel for his help and suggestions.
# Very Special thanks to the folks at Chromium.org and Google
# without whom there wouldn't be anything to install
#

#------------------------------------------#
# Setting up the Environment

tmp="/tmp"

chromeURL="http://dl.google.com/linux/direct"
chromePackage="google-chrome-unstable_current_i386.deb"

nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2"
nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"

#------------------------------------------#
# Making sure the system is sane

if [ $UID != 0 ]; then
  echo "You must run this script as root."
  exit 1
fi

if [ -d "$tmp/install-chrome" ]; then # check for and create temp dir
    # Will enter here if dir doesn't exist
    rm -R $tmp/install-chrome # hope you didn't have anything
mkdir $tmp/install-chrome # stored there
else
mkdir $tmp/install-chrome
fi

#------------------------------------------#

function DoTests {

echo Running tests...
#------------------------------------------#
# check for lzma

haveLZMA=`which lzma` # check for and getting lzma
if [ "$haveLZMA" == "" ]; then
slapt-get --install lzma
fi

#------------------------------------------#

#------------------------------------------#
# check for nss = 3.12.3

nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version
nssInstalled=${nssInstalled#*=} # as well, but this build seems to
nssInstalled=${nssInstalled%]*} # work best with 3.12.3

if [ "$nssInstalled" != "yes" ]; then
InstallNSS
fi
simlinks
}
#------------------------------------------#


function simlinks {
cd /usr/lib
if [ ! -f "libnspr4.so.0d" ]; then
ln -s libnspr4.so libnspr4.so.0d
fi

if [ ! -f "libnss3.so.1d" ]; then
ln -s libnss3.so libnss3.so.1d
fi

if [ ! -f "libnssutil3.so.1d" ]; then
ln -s libnssutil3.so libnssutil3.so.1d
fi

if [ ! -f "libplc4.so.0d" ]; then
ln -s libplc4.so libplc4.so.0d
fi

if [ ! -f "libplds4.so.0d" ]; then
ln -s libplds4.so libplds4.so.0d
fi

if [ ! -f "libsmime3.so.1d" ]; then
ln -s libsmime3.so libsmime3.so.1d
fi

if [ ! -f "libssl3.so.1d" ]; then
ln -s libssl3.so libssl3.so.1d
fi

InstallChrome
}

function InstallNSS {

cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
echo For some reason wget didnt pull nss from Connie's
echo slackware site!!!
exit 1
fi
installpkg $nssPackage

rm $nssPackage
simlinks
}

function InstallChrome {

cd $tmp/install-chrome
wget $chromeURL/$chromePackage

if [ ! -f "$chromePackage" ]; then # quit running if wget failed
echo Something went wrong while retrieving # and kick out a sane error msg
echo Google Chrome!!!
exit 1
fi

echo Unpacking the deb file...
ar -x $tmp/install-chrome/$chromePackage

if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed
echo Something went wrong while unpacking # and kick out a sane error msg
echo the .deb file!!!
exit 1
fi

echo Extracting Google Chrome...
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then # quit running if lzma failed
echo Something went wrong while extracting # and kick out a sane error msg
echo Google Chrome!!!
exit 1
fi

cd /
echo Installing Google Chrome...

tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
echo Installation failed while # installed correctly
echo moving files!!!
exit 1
else
cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop
echo Installation complete!
echo Just type google-chrome
quit
fi
}

function quit {
exit 0
}

function main {
echo
echo WARNING WARNING WARNING WARNING WARNING
echo This script may severely damage your system!!!
echo Don't say I didn't WARN you!
echo
echo Are you sure you want me to Monkey with your System? [yes/no]
echo [for your safety you must type "yes" to proceed]
echo
 
read YN
if [ "$YN" = "yes" ]; then
if [ -d "/opt/google/chrome" ]; then
echo Looks like Google Chrome is already installed!
echo Do you want to remove it and reinstall? [yes/no]
read yn
if [ "$yn" = "yes" ]; then
rm -R /opt/google/chrome
rm /usr/share/applications/google-chrome.desktop
DoTests
else
quit
fi
else
DoTests
fi
elif [ "$YN" = "no" ]; then
quit
else
main
fi
quit
}

main
exit
Title: Re: google chrome linux...
Post by: stretchedthin on August 05, 2009, 11:50:34 pm
Howdy,

I gave the script a whirl.  Really do think it would be a win for Vector to be able to offer Google Chrome and this is taking things in that direction.

First run of the script resulted in an error.  I think it has to do with function InstallNSS
Code: [Select]
function InstallNSS {

cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
echo For some reason wget didnt pull nss from Connie's
echo slackware site!!!
exit 1
fi
installpkg $nssPackage

For some reason it downloads the package to $tmp/install-chrome, but it does not install it afterwards.

So no biggy, I changed directories into /tmp/install-chrome and I did the installpkg myself.

Then ran the script again. It moved further along but resulted in....
Quote
Running tests...
./chrome: line 99: InstallChrome: command not found

Well I figured for some reason the InstallChrome function wasn't being seen or recognized so I just copied the function code and needed variables into a second script and ran it separately.

Code: [Select]
#!/bin/bash

tmp="/tmp"

chromeURL="http://dl.google.com/linux/direct"
chromePackage="google-chrome-unstable_current_i386.deb"

cd /tmp/install-chrome
wget http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.debcd

if [ ! -f "$chromePackage" ]; then # quit running if wget failed
echo Something went wrong while retrieving # and kick out a sane error msg
echo Google Chrome!!!
exit 1
fi

echo Unpacking the deb file...
ar -x $tmp/install-chrome/$chromePackage

if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed
echo Something went wrong while unpacking # and kick out a sane error msg
echo the .deb file!!!
exit 1
fi

echo Extracting Google Chrome...
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then # quit running if lzma failed
echo Something went wrong while extracting # and kick out a sane error msg
echo Google Chrome!!!
exit 1
fi

cd /
echo Installing Google Chrome...

tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
echo Installation failed while # installed correctly
echo moving files!!!
exit 1
else
cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop
echo Installation complete!
echo Just type google-chrome
quit
fi
exit

This time success!! I now have Google Chrome, and it is sooooooooo much faster then when I was running it under crossover.  Hope my detail helps you shake the last couple of bugs out.
Title: Re: google chrome linux...
Post by: uelsk8s on August 06, 2009, 06:27:43 am
I had to enclose all the text in quotes after the echo's to get it to work here
Title: Re: google chrome linux...
Post by: M0E-lnx on August 06, 2009, 06:32:38 am
I really wanted to try this again, but I'm to lazy to be jacking with the script.
I might just do it manually some time, just for giggles. I was not too impressed with crossover chrome, but want to check this out
Title: Re: google chrome linux...
Post by: uelsk8s on August 06, 2009, 06:37:23 am
to add flash:
as root
Code: [Select]
mkdir /opt/google/chrome/plugins
cp -ax /usr/lib/mozilla/plugins/libflashplayer.so /opt/google/chrome/plugins/

then run it with:
Code: [Select]
google-chrome --enable-plugins
Title: Re: google chrome linux...
Post by: M0E-lnx on August 06, 2009, 07:15:13 am
Changed my mind and did it manually using the steps outlined in the script.

here is a couple of suggestions for the script.
chrome needs GConf installed, have it check for libgconf.
clean up the bash code.
look for the flash plugin, and install it if present.
Title: Re: google chrome linux...
Post by: M0E-lnx on August 06, 2009, 07:19:21 am
Is it just me, or does the thing not close when you click the X on the top-right corner (window decoreation)?
Title: Re: google chrome linux...
Post by: Daniel on August 06, 2009, 08:01:46 am
stretchedthin: was this the order that you ran the scripts and stuff?

Run brokndodge's script.
Do manual installpkg.
Run stretchedthin's script.

I would also like to get Google Chrome and I wanted to make sure of the order you did things in.


brokndodge: I am not completely sure but capitalized functions might not work in scripts.
Title: Re: google chrome linux...
Post by: brokndodge on August 06, 2009, 09:31:40 am
thank you all for your comments.  i've got do a clean install from a clean system.  i forgot about the gconf dependency, but seems like it was for build rather than binary.  i'll add the check and release it.  i'm not getting why it would have trouble with capitalized function names.  but i will change the names again, can everyone respond with the shells they are running. i like to know if anyone has switched form the stock shell that ships with vl60.  currently it's in a state of i 'it works for me'  but i would like to get it to work for everyone. 

so what i'm gathering now is that the code works well, but we are having problems with the function calls.  does that sum it up? i'll update the script and release again tonight.

for flash support, there is no need to make the simlinks for plug-ins, chrome will find them on it's own.  just use
Code: [Select]
google-chrome --enable-plugins to use them.  be advised, plugin support is still very alpha.  flash may crash or even hang your browser.
Title: Re: google chrome linux...
Post by: stretchedthin on August 06, 2009, 09:44:35 am
stretchedthin: was this the order that you ran the scripts and stuff?

Run brokndodge's script.
Do manual installpkg.
Run stretchedthin's script.

I would also like to get Google Chrome and I wanted to make sure of the order you did things in.


brokndodge: I am not completely sure but capitalized functions might not work in scripts.
That's right.
Run brokndodge's script.
After you run brokndodge's script the nss tgz will be in /tmp/chrome-install/Do manual installpkg.
 there.
Run stretchedthin's script.
Well, it's really brokendodges function and variables just copied over into a text file to run as it's own script, but yes.
That's it. Post back if it works for you. 

@uelsk8s
I just changed the desktop file in usr/share applications Exec line to read...
Exec="google-chrome --enable-plugins"
Then you should be able to use flash no problem.  Doesn't seem to require anything more than that.



@MOE-lnx
Quote
Is it just me, or does the thing not close when you click the X on the top-right corner (window decoreation)?
All OK, here.  (PS, Awesome new installer on SOHO by the way.
Title: Re: google chrome linux...
Post by: brokndodge on August 06, 2009, 11:35:57 am
boss is out of the office so i took a few minutes to apply various suggestions.  check it out and let me know if it works any better, i don't have a vl box here to test on. tonight i'm going to rework the script to remove all functions.  set it up just to run straight thru.  i think that will be the most portable method.

Code: [Select]
#! /bin/bash
# Title:   install-chrome
# Author:  BroknDodge
# License: BSD
# Version: 0.0.3
#
# Special thanks to Vectorite Daniel for his help and suggestions.
# Very Special thanks to the folks at Chromium.org and Google
# without whom there wouldn't be anything to install
#

#------------------------------------------#
# Setting up the Environment

tmp="/tmp"

chromeURL="http://dl.google.com/linux/direct"
chromePackage="google-chrome-unstable_current_i386.deb"

nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2"
nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"

#------------------------------------------#
# Making sure the system is sane

if [ $UID != 0 ]; then
  echo "You must run this script as root."
  exit 1
fi

if [ -d "$tmp/install-chrome" ]; then # check for and create temp dir
    # Will enter here if dir doesn't exist
    rm -R $tmp/install-chrome # hope you didn't have anything
mkdir $tmp/install-chrome # stored there
else
mkdir $tmp/install-chrome
fi

#------------------------------------------#

function dotests {

echo Running tests...
#------------------------------------------#
# check for lzma

haveLZMA=`which lzma` # check for and getting lzma
if [ "$haveLZMA" == "" ]; then
slapt-get --install lzma
fi

#------------------------------------------#

#------------------------------------------#
# check for nss = 3.12.3

nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version
nssInstalled=${nssInstalled#*=} # as well, but this build seems to
nssInstalled=${nssInstalled%]*} # work best with 3.12.3

if [ "$nssInstalled" != "yes" ]; then
installnss
fi
simlinks
}
#------------------------------------------#


function simlinks {
cd /usr/lib
if [ ! -f "libnspr4.so.0d" ]; then
ln -s libnspr4.so libnspr4.so.0d
fi

if [ ! -f "libnss3.so.1d" ]; then
ln -s libnss3.so libnss3.so.1d
fi

if [ ! -f "libnssutil3.so.1d" ]; then
ln -s libnssutil3.so libnssutil3.so.1d
fi

if [ ! -f "libplc4.so.0d" ]; then
ln -s libplc4.so libplc4.so.0d
fi

if [ ! -f "libplds4.so.0d" ]; then
ln -s libplds4.so libplds4.so.0d
fi

if [ ! -f "libsmime3.so.1d" ]; then
ln -s libsmime3.so libsmime3.so.1d
fi

if [ ! -f "libssl3.so.1d" ]; then
ln -s libssl3.so libssl3.so.1d
fi

installchrome
}

function installnss {

cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
echo "For some reason wget didnt pull nss from Connies"
echo "slackware site"
exit 1
fi
installpkg $nssPackage

rm $nssPackage
simlinks
}

function installchrome {

cd $tmp/install-chrome
wget $chromeURL/$chromePackage

if [ ! -f "$chromePackage" ]; then # quit running if wget failed
echo "Something went wrong while retrieving" # and kick out a sane error msg
echo "Google Chrome"
exit 1
fi

echo "Unpacking the deb file"
ar -x $tmp/install-chrome/$chromePackage

if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed
echo "Something went wrong while unpacking" # and kick out a sane error msg
echo "the .deb file"
exit 1
fi

echo "Extracting Google Chrome"
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then # quit running if lzma failed
echo "Something went wrong while extracting" # and kick out a sane error msg
echo "Google Chrome"
exit 1
fi

cd /
echo "Installing Google Chrome"

tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
echo "Installation failed while" # installed correctly
echo "moving files"
exit 1
else
cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop
echo "Installation complete"
echo "Just type google-chrome"
echo "to enable flash type google-chrome --enable-plugins"
quit
fi
}

function quit {
exit 0
}

function main {
echo
echo "WARNING WARNING WARNING WARNING WARNING"
echo "This script may severely damage your system"
echo "Dont say I didnt WARN you"
echo
echo "Are you sure you want me to Monkey with your System? [yes/no]"
echo "[for your safety you must type yes to proceed]"
echo
 
read YN
if [ "$YN" = "yes" ]; then
if [ -d "/opt/google/chrome" ]; then
echo "Looks like Google Chrome is already installed"
echo "Do you want to remove it and reinstall? [yes/no]"
read yn
if [ "$yn" = "yes" ]; then
rm -R /opt/google/chrome
rm /usr/share/applications/google-chrome.desktop
dotests
else
quit
fi
else
dotests
fi
elif [ "$YN" = "no" ]; then
quit
else
main
fi
quit
}

main
exit

closed quote per uelsk8s
Title: Re: google chrome linux...
Post by: M0E-lnx on August 06, 2009, 12:21:41 pm

@MOE-lnx
Quote
Is it just me, or does the thing not close when you click the X on the top-right corner (window decoreation)?
All OK, here.  (PS, Awesome new installer on SOHO by the way.

Thank you vm.
Title: Re: google chrome linux...
Post by: uelsk8s on August 06, 2009, 12:58:48 pm
line 168 is missing a closing quotation mark
Code: [Select]
echo "WARNING WARNING WARNING WARNING WARNING
I closed it and is working well here
Title: Re: google chrome linux...
Post by: brokndodge on August 06, 2009, 07:29:41 pm
Changed my mind and did it manually using the steps outlined in the script.

here is a couple of suggestions for the script.
chrome needs GConf installed, have it check for libgconf.
clean up the bash code.
look for the flash plugin, and install it if present.

GConf is required by so many vl60 packages that it should be standard equipment in vl60.  it's not listed in the official dependencies from Google, figure if this makes it into a package GConf can be listed as required.  but it really should already be present.

chrome will find the plug-in on it's own.  but due to the instability of the code, for the moment, you have to enable plugins from the command line.  i'll look into making a switch for plugins.

folks - uelsk8ts reports the script is working well with the tweaks i made at work.  has anyone else tested it?  i'd like to run a clean install of vl60 on this old machine to test my script, but it takes over 6 hours to install.  gonna save that for a day off.

Title: Re: google chrome linux...
Post by: stretchedthin on August 06, 2009, 07:36:28 pm
I've tested your latest version.  Worked well. I think some new users will be surprised how easy it is, so I made a screencast.

brokndodge's google-chrome script in action. (http://www.opensourcebistro.com/Tutorial/VL60/10.Browsers/GchromeScript.htm)
Title: Re: google chrome linux...
Post by: brokndodge on August 06, 2009, 09:35:09 pm
here's the new version.  since we have the functions working well now i left them in.  per MOE-lnx suggestion added support for enabling plugins.  however, i figure google has it right for hte moment.  i didn't make it mandatory.  rather than adding yet another prompt, this time i used a command line switch.
save the file as install-chrome
then:
Code: [Select]
chmod 755 install-chrome
./install-chrome --enable-plugins   #will set up google-chrome.desktop to use plugins
./install-chrome                          # sets up the .desktop file the way google ships it

here it is: install-chrome_0.0.4
Code: [Select]
#! /bin/bash
# Title:   install-chrome
# Author:  BroknDodge
# License: BSD
# Version: 0.0.4
#
# Special thanks to the following Vectorians for their help and suggestions:
# Daniel stretchedthin uelsk8ts
# hata_ph rbistolfi MOE-lnx
#
# Very Special thanks to the folks at Chromium.org and Google
# without whom there wouldn't be anything to install
#

#------------------------------------------#
# Setting up the Environment

enablePlugins="$1"
tmp="/tmp"

chromeURL="http://dl.google.com/linux/direct"
chromePackage="google-chrome-unstable_current_i386.deb"

nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2"
nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"

#------------------------------------------#
# Making sure the system is sane

if [ $UID != 0 ]; then
  echo "You must run this script as root."
  exit 1
fi

if [ -d "$tmp/install-chrome" ]; then # check for and create temp dir
    # Will enter here if dir doesn't exist
    rm -R $tmp/install-chrome # hope you didn't have anything
mkdir $tmp/install-chrome # stored there
else
mkdir $tmp/install-chrome
fi

#------------------------------------------#

function dotests {

echo Running tests...
#------------------------------------------#
# check for lzma

haveLZMA=`which lzma` # check for and getting lzma
if [ "$haveLZMA" == "" ]; then
slapt-get --install lzma
fi

#------------------------------------------#

#------------------------------------------#
# check for nss = 3.12.3

nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version
nssInstalled=${nssInstalled#*=} # as well, but this build seems to
nssInstalled=${nssInstalled%]*} # work best with 3.12.3

if [ "$nssInstalled" != "yes" ]; then
installnss
fi
simlinks
}
#------------------------------------------#


function simlinks {
cd /usr/lib
if [ ! -f "libnspr4.so.0d" ]; then
ln -s libnspr4.so libnspr4.so.0d
fi

if [ ! -f "libnss3.so.1d" ]; then
ln -s libnss3.so libnss3.so.1d
fi

if [ ! -f "libnssutil3.so.1d" ]; then
ln -s libnssutil3.so libnssutil3.so.1d
fi

if [ ! -f "libplc4.so.0d" ]; then
ln -s libplc4.so libplc4.so.0d
fi

if [ ! -f "libplds4.so.0d" ]; then
ln -s libplds4.so libplds4.so.0d
fi

if [ ! -f "libsmime3.so.1d" ]; then
ln -s libsmime3.so libsmime3.so.1d
fi

if [ ! -f "libssl3.so.1d" ]; then
ln -s libssl3.so libssl3.so.1d
fi

installchrome
}

function installnss {

cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
echo "For some reason wget didnt pull nss from Connies"
echo "slackware site"
exit 1
fi
installpkg $nssPackage

rm $nssPackage
simlinks
}

function installchrome {

cd $tmp/install-chrome
wget $chromeURL/$chromePackage

if [ ! -f "$chromePackage" ]; then # quit running if wget failed
echo "Something went wrong while retrieving" # and kick out a sane error msg
echo "Google Chrome"
exit 1
fi

echo "Unpacking the deb file"
ar -x $tmp/install-chrome/$chromePackage

if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed
echo "Something went wrong while unpacking" # and kick out a sane error msg
echo "the .deb file"
exit 1
fi

echo "Extracting Google Chrome"
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then # quit running if lzma failed
echo "Something went wrong while extracting" # and kick out a sane error msg
echo "Google Chrome"
exit 1
fi

cd /
echo "Installing Google Chrome"

tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
echo "Installation failed while" # installed correctly
echo "moving files"
exit 1
fi

if [ "$enablePlugins" = "--enable-plugins" ]; then
IFS='
'
file=( $( < /opt/google/chrome/google-chrome.desktop ) )
file[5]="Exec=/opt/google/chrome/google-chrome --enable-plugins %U"
echo "${file[*]}" > /usr/share/applications/google-chrome.desktop
echo "Desktop Menu created with Plugin support"
echo "Installation complete"
quit
else
cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop
echo "Desktop Menu created without Plugin support"
echo "Installation complete"
echo
echo "to enable flash type google-chrome --enable-plugins"
quit
fi

}

function quit {
exit 0
}

function main {
echo
echo "WARNING WARNING WARNING WARNING WARNING"
echo "This script may severely damage your system"
echo "Dont say I didnt WARN you"
echo
echo "Are you sure you want me to Monkey with your System? [yes/no]"
echo "[for your safety you must type yes to proceed]"
echo
 
read YN
if [ "$YN" = "yes" ]; then
if [ -d "/opt/google/chrome" ]; then
echo "Looks like Google Chrome is already installed"
echo "Do you want to remove it and reinstall? [yes/no]"
read yn
if [ "$yn" = "yes" ]; then
rm -R /opt/google/chrome
rm /usr/share/applications/google-chrome.desktop
dotests
else
quit
fi
else
dotests
fi
elif [ "$YN" = "no" ]; then
quit
else
main
fi
quit
}

main
exit

let me know how it works
Title: Re: google chrome linux...
Post by: M0E-lnx on August 07, 2009, 07:55:14 am
WoW... this thing is worse than FF

I noticed my box was starting to lag a bit, and kept getting worse, so I took a look @ htop, and there is a ton of google-chrome child processes.
my single cpu core was being used up completely, so I killed it and I got my system back

Ill have to try it later on, maybe when they come up with another build
Title: Re: google chrome linux...
Post by: Daniel on August 07, 2009, 06:43:36 pm
I installed google chrome as well and found that (as M0E mentioned) it progressively makes more processes, uses up more memory and eventually maxes out the cpu. I think it was kind of fast when I first started it but I'm running VL 6.0 Light and I think Opera is still faster. (I'm not completely sure though) Google Chrome looks like a good browser and I hope they fix the problems with it soon.

brokndodge: Did you post an update script to update google chrome or was that just mentioned?
Title: Re: google chrome linux...
Post by: brokndodge on August 07, 2009, 08:19:02 pm
Daniel, here is the update script:  http://forum.vectorlinux.com/index.php?topic=10210.msg65875#msg65875

3.0.197.11 was released today

i think that the issue with chrome slowing down is a flash plugin issue.  i run with plugins off, the way it ships from google.  runs absolutely great on my pII 300 running vector standard 6.0.  no slow down issues, also running it on the ubuntu machine at work for the last couple of months, i can leave it up all night without running into the memory leak that firefox has had since 1.5.  but again without flash plugins turned on.  i think that has got to be where the problem is.  i noticed it slowing down on this old machine the one time i tested --enable-plugins. 

i don't want flash running anyway, this is just a utility machine, check my mail, do a few forum posts.  maybe some light scripting.  every week, chrome gets better. i'm looking forward to print capability.  then i can move to chrome for every machine i maintain at work. 

as a side note, i talked my boss into testing vl6.0 standard on one machine at work.  said if all goes well, he will look into getting authorization to add 4 more vl computers, for a total of 5.  chrome was a major road block, but i've got that solved now.
Title: Re: google chrome linux...
Post by: Daniel on August 08, 2009, 08:28:57 am
So do I have to reinstall Chrome with the installation script and not use the switch --enable-plugins for the plugins not to be enabled?
Title: Re: google chrome linux...
Post by: brokndodge on August 08, 2009, 05:14:26 pm
scope out stretchedthin's video.  there is a desktop file called /usr/share/applications/google-chrome.desktop.  there is a line in that script starting with Exec:  remove --enable-plugins from that line.  that should be enough.

i don't know for sure that that is the problem with chrome slowing down.  i just haven't noticed it here.  my machine is slow anyway, i haven't noticed chrome slowing down any more.  firefox still takes longer to load anything that chrome.  it takes almost two minutes for firefox just to start on this machine.  i've done my search and moved on to the third or fourth page by then running chrome.
Title: Re: google chrome linux...
Post by: stretchedthin on August 08, 2009, 09:03:45 pm
So far my experiences are pretty good with Chrome, I did have one experience with excessive cpu usage but it was temporary.  Lasted around a minute then dropped right off.   One thing I find odd is that xfce-task-manager shows 7 different instaces of chrome running at the same time.  They aren't doing anything but they are there all the same.  However, the speed is good, I'd say better than firefox for me and I'm still using this with plugins-enabled.  Still it's been a short testing period. I'll keep you posted.
Title: Re: google chrome linux...
Post by: brokndodge on August 09, 2009, 08:23:14 am
i think that all the tasks is part of the security and stability system they are using.  each new tab starts a new process.  the tabs are not all running in the same process.  that way, if one tab crashes you don't loose the whole browser.  they are using sqlite for cache management.  as the cache grows, sqlite slows down.  firefox has a similar issue, after a few weeks of usage firefox can spend more time searching the cache than actually loading web pages.  i solved this in firefox by purging the cache each time ff is closed.  but it still doesn't help with rendering speed.  i haven't found an option yet to purge chrome's cache at each close. edit/ just purged the cache and chrome is back to the speed it was running at my first installation.  page cache is per user, so reinstall or removal doesn't effect the cache.  mine was from over a week of testing.  still can't find a setting to purge the cache at each close. /endit

remember, chrome is still very beta.  we are also running a debian build on a slackware distro.  some of these issues may be solved with a native build.  others are bugs that will slowly be worked out of the code.  we just have to keep pounding on the thing till it becomes what it really has to potential to be:  the fastest, most stable, most standards compliant web browser on the planet.
Title: Re: google chrome linux...
Post by: brokndodge on August 10, 2009, 08:39:13 pm
well, i switched to vl light on the armada.  found that MOR-lnx was right, i need to test for GConf.  So I updated the code.  Before testing, I decided to remove GConf.  Bad idea.  Half my system is uninstalling right now.  I'm posting my hack while I can, cause I think this is gonna take a reinstall to fix.

0.0.5-untested
Code: [Select]
#! /bin/bash
# Title:   install-chrome
# Author:  BroknDodge
# License: BSD
# Version: 0.0.4
#
# Special thanks to the following Vectorians for their help and suggestions:
# Daniel stretchedthin uelsk8ts
# hata_ph rbistolfi MOE-lnx
#
# Very Special thanks to the folks at Chromium.org and Google
# without whom there wouldn't be anything to install
#

#------------------------------------------#
# Setting up the Environment

enablePlugins="$1"
tmp="/tmp"

chromeURL="http://dl.google.com/linux/direct"
chromePackage="google-chrome-unstable_current_i386.deb"

nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2"
nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"

#------------------------------------------#
# Making sure the system is sane

if [ $UID != 0 ]; then
  echo "You must run this script as root."
  exit 1
fi

if [ -d "$tmp/install-chrome" ]; then # check for and create temp dir
    # Will enter here if dir doesn't exist
    rm -R $tmp/install-chrome # hope you didn't have anything
mkdir $tmp/install-chrome # stored there
else
mkdir $tmp/install-chrome
fi

#------------------------------------------#

function dotests {

echo Running tests...
#------------------------------------------#
# check for lzma

haveLZMA=`which lzma` # check for and getting lzma
if [ "$haveLZMA" == "" ]; then
slapt-get --install lzma
fi

#------------------------------------------#

#------------------------------------------#
# check for nss = 3.12.3

nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version
nssInstalled=${nssInstalled#*=} # as well, but this build seems to
nssInstalled=${nssInstalled%]*} # work best with 3.12.3

if [ "$nssInstalled" != "yes" ]; then
installnss
fi
#------------------------------------------#

#------------------------------------------#
# check for nss = 3.12.3

gconfInstalled=`slapt-get --search GConf-2.22.0` # VL-Light doesn't ship with GConf
gconfInstalled=${gconfInstalled#*=}
gconfInstalled=${gconfInstalled%]*}

if [ "$gconfInstalled" != "no" ]; then
slapt-get --install GConf
fi
return
}
#------------------------------------------#


function simlinks {
cd /usr/lib
if [ ! -f "libnspr4.so.0d" ]; then
ln -s libnspr4.so libnspr4.so.0d
fi

if [ ! -f "libnss3.so.1d" ]; then
ln -s libnss3.so libnss3.so.1d
fi

if [ ! -f "libnssutil3.so.1d" ]; then
ln -s libnssutil3.so libnssutil3.so.1d
fi

if [ ! -f "libplc4.so.0d" ]; then
ln -s libplc4.so libplc4.so.0d
fi

if [ ! -f "libplds4.so.0d" ]; then
ln -s libplds4.so libplds4.so.0d
fi

if [ ! -f "libsmime3.so.1d" ]; then
ln -s libsmime3.so libsmime3.so.1d
fi

if [ ! -f "libssl3.so.1d" ]; then
ln -s libssl3.so libssl3.so.1d
fi

return
}

function installnss {

cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
echo "For some reason wget didnt pull nss from Connies"
echo "slackware site"
exit 1
fi
installpkg $nssPackage

rm $nssPackage
return
}

function installchrome {

cd $tmp/install-chrome
wget $chromeURL/$chromePackage

if [ ! -f "$chromePackage" ]; then # quit running if wget failed
echo "Something went wrong while retrieving" # and kick out a sane error msg
echo "Google Chrome"
exit 1
fi

echo "Unpacking the deb file"
ar -x $tmp/install-chrome/$chromePackage

if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed
echo "Something went wrong while unpacking" # and kick out a sane error msg
echo "the .deb file"
exit 1
fi

echo "Extracting Google Chrome"
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then # quit running if lzma failed
echo "Something went wrong while extracting" # and kick out a sane error msg
echo "Google Chrome"
exit 1
fi

cd /
echo "Installing Google Chrome"

tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
echo "Installation failed while" # installed correctly
echo "moving files"
exit 1
fi

if [ "$enablePlugins" = "--enable-plugins" ]; then
IFS='
'
file=( $( < /opt/google/chrome/google-chrome.desktop ) )
file[5]="Exec=/opt/google/chrome/google-chrome --enable-plugins %U"
echo "${file[*]}" > /usr/share/applications/google-chrome.desktop
echo "Desktop Menu created with Plugin support"
echo "Installation complete"
quit
else
cp /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop
echo "Desktop Menu created without Plugin support"
echo "Installation complete"
echo
echo "to enable flash type google-chrome --enable-plugins"
quit
fi

}

function quit {
exit 0
}

function main {
echo
echo "WARNING WARNING WARNING WARNING WARNING"
echo "This script may severely damage your system"
echo "Dont say I didnt WARN you"
echo
echo "Are you sure you want me to Monkey with your System? [yes/no]"
echo "[for your safety you must type yes to proceed]"
echo
 
read YN
if [ "$YN" = "yes" ]; then
if [ -d "/opt/google/chrome" ]; then
echo "Looks like Google Chrome is already installed"
echo "Do you want to remove it and reinstall? [yes/no]"
read yn
if [ "$yn" = "yes" ]; then
rm -R /opt/google/chrome
rm /usr/share/applications/google-chrome.desktop
dotests
simlinks
installchrome
else
quit
fi
else
dotests
simlinks
installchrome
fi
elif [ "$YN" = "no" ]; then
quit
else
main
fi
quit
}

main
exit
Title: Re: google chrome linux...
Post by: brokndodge on August 11, 2009, 08:43:11 am
new version with check for GConf tested, works for me.  MOE-lnx, your right, chrome over vl-light is less than expected.  yet firefox absolutely screems.  it's the other way around on vl-standard. 

now, this GConf issue.  why is it that a packages that isn't installed by default has so many packages that depend on it after it's installed.
Title: Re: google chrome linux...
Post by: M0E-lnx on August 11, 2009, 10:19:28 am
It doesn't have deps on the stock vl-light.
You start running into deps when you extend it ;)

Ideally, the build script would pick up these dependancies and make arrangements to install them on its own. That's what the script is for ;)
Title: Re: google chrome linux...
Post by: brokndodge on August 11, 2009, 08:16:54 pm
okay, i think i found out why the buildbot snapshot won't run on my system.  seems it's looking for sse2 support in the processor.  apparently pII doesn't have that.  so when i actually try to build this thing, i'm going to have to find out how to disable that.  i found a conversation on this page close to half way down that talks about this issue:  http://echelog.matzon.dk/logs/browse/chromium/1244152800

seems as if, when you build chromium from source, there is an option somewhere to disable sse2.
Title: Re: google chrome linux...
Post by: brokndodge on August 11, 2009, 09:46:37 pm
okay... got the official word from the chromium bug tracking system.  there is a rendering bug in chrome (bug 8475).  they enabled sse2 support in intel p4 and later cpu's to make it go away.  problem is, too many people in the world have amd or p3 or earlier cpu's.  so for the release version, they disable sse2.  that's why chrome works on my pII, but chromium buildbot won't.  so now i have to figure out how to compile with release as my target.

see:
http://code.google.com/p/chromium/issues/detail?id=9007
http://code.google.com/p/chromium/issues/detail?id=8475
Title: Re: google chrome linux...
Post by: brokndodge on August 12, 2009, 08:59:01 pm
at this point, i'm trying to put together a chrome.SlackBuild.  Got enough hacked together that chrome is building on my antique armada right now.  who knows how long that will take.  posting from my wife's windows (UGH) laptop.  the only other machine that wasn't hooked up during that fateful storm.  chrome's build system is, to say the least, awful.  the source package doesn't follow any modern naming conventions and it includes absolutely everything they have for 3 or 4 operating systems.  but, hopefully, i have it worked out well enough to build.  then i just have to figure out the installation stuff. 

so far, my hacks have been to move the chrome stuff to what sbbuilder expects.  the actual build part is custom to chrome.  go figure. they couldn't just do it the linux way.  got to reinvent the wheel.  they use scons and some custom scripts.  this .slackbuild is gonna be ugly, no matter how you look at it. 

if i manage to get a rough package built, will i have to find my own host for it in order to get folks to test it?  figure my first try won't be repo ready.  may take several builds for that.  but i would like to post it somewhere easily accessible.  i also don't want to pollute my filebutler sourceforge page with alien packages. 

any response as to where to post this thing would be greatly appreciated.

thx for all yall's help.
Title: Re: google chrome linux...
Post by: uelsk8s on August 12, 2009, 09:23:16 pm
you can give it to me and I can find somewhere to upload it.
Title: Re: google chrome linux...
Post by: brokndodge on August 13, 2009, 07:15:58 pm
thx uelsk8ts, when i get a successful build, i'll let you know.  one of my sons interrupted the build early this morning.  have restarted it.  hopefully it will finish this time.  first deal is to get it to build, then figure out the installation stuff in the SlackBuild.  chrome's build system places everything in $CHROMIUM_ROOT/src/sconsbuilds/Release.  That should result in a file hierarchy identical to the deb file.  so i should just have to mv to the right spot in the sbbuilder folders.  cross my fingers.  got to get a successful build first.  takes over an hour just to extract the src.  who knows how long it will take to build.
Title: Re: google chrome linux...
Post by: brokndodge on August 16, 2009, 03:27:22 pm
well, after two and a half days of compiling, the build failed.  error 132 or something like that.  went and got a couple of old hp vectra systems outta storage.  i think i can find enough good ram around here to put together a build system.  will keep trying.

here's what i've got so far (gperf is a required build dep):
Code: [Select]

#!/usr/bin/bash
# This script assumes it will be launched within "/NAME/VERSION/src" dir.
# With all sources in "src" Your Vector Linux .tlz package, slack-desc,
# and slack-required will be found in "VERSION" dir. The extraction and
# build will be in a temp dir created in "NAME" dir, and then removed on exit.
# Comment out second to last line to keep this dir intact.
#
# This Template was compiled from the contributions of many users of the Vector
# Linux forum at http://forum.vectorlinux.com and from tidbits collected
# from all over the internet.
#
# Generated by sbbuilder-0.4.12.2, written by Rodrigo Bistolfi
# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
#
# Please put your name below if you add some original scripting lines.
# AUTHORS = BroknDodge

NAME="chromium"            #Enter package Name!
VERSION=${VERSION:-"r23013"}      #Enter package Version!
VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
VL_PACKAGER=${VL_PACKAGER:-"BroknDodge"}   #Enter your Name!
LINK=${LINK:-""}  #Enter URL for package here!
BUILDTOOLS="http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz"


#SYSTEM VARIABLES
#----------------------------------------------------------------------------
BUILDNUM=${BUILDNUM:-"1"}
VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
ARCH=${ARCH:-"$(uname -m)"}
CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
#----------------------------------------------------------------------------


#SETUP PACKAGING ENVIRONMENT
#--------------------------------------------
CWD=$(pwd)
cd ../
RELEASEDIR=$(pwd)
cd $CWD
mkdir -p $RELEASEDIR/tmp
TMP=$RELEASEDIR/tmp
PKG=$TMP/package-$NAME
CHROMIUM_ROOT=$TMP/home/chrome-svn/tarball/chromium
#--------------------------------------------



if [ $UID != 0 ]; then
   echo "You are not authorized to run this script. Please login as root"
   exit 1
fi

if [ ! -x /usr/bin/requiredbuilder ]; then
   echo "Requiredbuilder not installed, or not executable."
   exit 1
fi

if [ $VL_PACKAGER = "YOURNAME" ]; then
   echo 'Who are you?
   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
   Change the word "YOURNAME" to your VectorLinux packager name.
   You may also export VL_PACKAGER, or call this script with
   VL_PACKAGER="YOUR NAME HERE"'
   exit 1
fi


#CFLAGS SETUP
#--------------------------------------------
if [[ "$ARCH" = i?86 ]]; then
  ARCH=i586
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  CONFIGURE_TRIPLET="i486-slackware-linux"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fpic"
  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
elif [ "$ARCH" = "powerpc" ]; then
  SLKCFLAGS="-O2"
  CONFIGURE_TRIPLET="powerpc-vlocity-linux"
fi

export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
export CXXFLAGS=$CFLAGS
export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
#--------------------------------------------


#GET THE SOURCE
#--------------------------------------------
for SRC in $(echo $LINK);do
if [ ! -f $CWD/$(basename $SRC) ]
then
        wget -c $SRC
fi
done


rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf $NAME-$VERSION


#EXTRACT SOURCES
#-----------------------------------------------------
echo "Extracting source..."
tar xvf $CWD/$NAME.$VERSION.tgz || exit 1
#-----------------------------------------------------


cd $TMP/home

# Put any Patches here
#-----------------------------------------------------
#patch -p1 <
#-----------------------------------------------------


#SET PERMISSIONS
#-----------------------------------------
echo "Setting permissions..."
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 2777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 2755 -exec chmod 755 {} \;
find . -perm 774 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
#-----------------------------------------

#GET THE BUILD TOOLS
#-----------------------------------------
cd $TMP
wget $BUILDTOOLS
tar xvfz depot_tools.tar.gz
export PATH=$TMP/depot_tools:"$PATH"

#CONFIGURE & MAKE
#----------------------------------------------------------------------
# If you are building a KDE-related app, then change the following
# arguments in the script below:
# --prefix=$(kde-config -prefix) \
# --sysconfdir=/etc/kde \
#
# Making these changes will ensure that your package will build in the
# correct path and that it will work seamlessly within the KDE environment.
#
#-----------------------------------------------------------------------

echo "Configuring source..."
cd $CHROMIUM_ROOT
gclient runhooks --force
cd $CHROMIUM_ROOT/src/build
hammer --implicit-deps-changed --mode=Release chrome
#./configure --prefix=/usr \
#  --sysconfdir=/etc \
#  --localstatedir=/var \
#  --mandir=/usr/man \
#  --with-included-gettext \
#  --disable-debug \
#  --program-prefix="" \
#  --program-suffix="" \
#  --build=$CONFIGURE_TRIPLET \
#  $CONFIG_OPTIONS || exit 1

#make || exit 1

#make install DESTDIR=$PKG || exit

#-----------------------------------------------
# temporary end of script, till i get the build stuff worked out.
exit

#######################################################################
#Miscellenious tweaks and things outside a normal ./configure go here #
#######################################################################



mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
$PKG/usr/doc/$NAME-$VERSION
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild

#----------------------------------------------------------------------

if [ -d $PKG/usr/share/man ] ; then
mkdir -p $PKG/usr/man
mv $PKG/usr/share/man/* $PKG/usr/man
rm -rf $PKG/usr/share/man
fi
find $PKG/usr/man -type f -exec gzip -9 {} \;

if [ -d $PKG/usr/share/info ] ; then
mkdir -p $PKG/usr/info
mv $PKG/usr/share/info/* $PKG/usr/info
rm -rf $PKG/usr/share/info
fi

find $PKG/usr/info -type f -exec gzip -9 {} \;
mkdir -p $PKG/install
if [ -d $PKG/usr/info ] ; then
cat >> $PKG/install/doinst.sh << EOF
cd usr/info
if [ -f dir ]; then
    rm dir
fi
if [ -f dir.gz ]; then
    rm dir.gz
fi
for i in *.info.gz
        do
        install-info $i dir
    done
EOF
fi

mkdir -p $PKG/install


#if there is a slack-desc in src dir use it
if test -f $CWD/slack-desc; then
cp $CWD/slack-desc $RELEASEDIR/slack-desc
else
# This creates the white space in front of "handy-ruler" in slack-desc below.

LENGTH=$(expr length "$NAME")
SPACES=0
SHIM=""
until [ "$SPACES" = "$LENGTH" ]; do
SHIM="$SHIM "
let SPACES=$SPACES+1
done

# Fill in the package summary between the () below.
# Then package the description, License, Author and Website.
# There may be no more then 11 $NAME: lines in a valid slack-desc.

cat > $RELEASEDIR/slack-desc << EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

$SHIM|-----handy-ruler------------------------------------------------------|
$NAME: $NAME ()
$NAME:
$NAME:
$NAME:
$NAME:
$NAME:
$NAME:
$NAME: License: GPL
$NAME: Authors:
$NAME: Website:

EOF
fi
cat >> $RELEASEDIR/slack-desc << EOF



#----------------------------------------
BUILDDATE: $(date)
PACKAGER:  $VL_PACKAGER
HOST:      $(uname -srm)
DISTRO:    $(cat /etc/vector-version)
CFLAGS:    $CFLAGS
LDFLAGS:   $LDFLAGS
CONFIGURE: $(awk "/\.\/configure\ /" $TMP/$NAME-$VERSION/config.log)

EOF

cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc

#STRIPPING
#------------------------------------------------------------------------------------------------------------------
cd $PKG
echo " "
echo "Stripping...."
echo " "
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
#------------------------------------------------------------------------------------------------------------------


#FINISH PACKAGE
#--------------------------------------------------------------
echo "Finding dependencies..."
ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.tlz"
makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.tlz

cd $CWD
echo "Cleaning up temp files..." && rm -rf $TMP
echo "Package Complete"
#--------------------------------------------------------------

# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##
Title: Re: google chrome linux...
Post by: Daniel on August 16, 2009, 04:36:36 pm
brokndodge: Just so you know, "chromium" is the name of another package, a game called chromium. And I believe, (from looking at the google-chrome website) that chromium is the name of the project to create google-chrome and google-chrome is the product, the browser.
Title: Re: google chrome linux...
Post by: brokndodge on August 17, 2009, 04:44:51 pm
yup... your right.  the src release and buildbot versions are refered to as chromium. but the release builds,
are refered to as google chrome.  if i can get this thing built, gonna name the final package google-chrome  if google doesn't fuss too much about that.  otherwise, might have to call it chromium.org.  we figure it out then.  right now i can't even get it to build.  so name of the package is kinda splitting hairs.

but thank you for your obversation.  seems like since chromium (the game) has been around so long google should have picked a different name.
Title: Re: google chrome linux...
Post by: blurymind on September 14, 2009, 02:59:06 am
brokndodge: Just so you know, "chromium" is the name of another package, a game called chromium. And I believe, (from looking at the google-chrome website) that chromium is the name of the project to create google-chrome and google-chrome is the product, the browser.

ubuntu/debian repos call the package chrome-browser or chromium-browser
Title: Re: google chrome linux...
Post by: stretchedthin on September 14, 2009, 09:00:39 am
Brokndodge has added a script for updating Google-Chrome on his blog.  He is going through a difficult time.  I think I speak for the forum as well when I say we wish him all the best.

I've given this a try and it works very well.

Brokndodges script for updating Google Chrome to latest version. (http://brokndodge.blogspot.com/2009/08/script-for-updating-chrome-on-vector.html)
Title: Re: google chrome linux...
Post by: brokndodge on September 28, 2009, 08:10:33 pm
stretchedthin - thank you for your kind words.  i've been absent these last few months  but i haven't forgotten the wonderful folks here in the forum.  i will post a full update on my blog in the next few days and i believe i may be able to begin work on building a vl buildscript for chromium-browser soon.  things are beginning to settle down for me at home, but are beginning to get rather volatile at work.  suffice it to say the president of a 200 million dollar company has my personal cell number at this point.  i'm still not sure if that's good or bad.  i did get one e-mail saying "...i'm impressed." i'm hoping to place myself in a position to promote vl gold.  don't hold your breath... it may all die down soon. 

posting this from a fresh install of vl-gold and google chrome installed from the last posted version of my script.  thx... you guys are great.
Title: Re: google chrome linux...
Post by: md5fungi on October 10, 2009, 12:54:53 pm
Hey, just a Slackware user that stumbled upon this thread. Downloaded your Google Chrome install script and it works perfectly. Nice work! I know more than a few people that would be interested in this.
Title: Re: google chrome linux...
Post by: hata_ph on October 12, 2009, 07:58:32 am
Pls provide guide to install chrome to VL... :)
Title: Re: google chrome linux...
Post by: Daniel on October 13, 2009, 10:52:46 am
At the moment, (at least until a package gets built) just run brokndodge's install script. (which is on page 3 of this thread I think)
Title: Re: google chrome linux...
Post by: stretchedthin on October 13, 2009, 11:09:23 am
Walk through Screencast. Installing Google Chrome via brokndodge's script. (http://www.opensourcebistro.com/Tutorial/VL60/10.Browsers/GchromeScript.htm)
Title: Re: google chrome linux...
Post by: hata_ph on October 20, 2009, 12:33:50 am
I try to install it in my VL6-light but it prompt out this error...

(http://img43.imageshack.us/img43/8452/googlechrome.th.gif) (http://img43.imageshack.us/i/googlechrome.gif/)

EDIT: Solve the problem by installing GConf from VL repo. It would be nice if the install script can auto install the GConf package too.....

BTW, Is there a way to uninstall it?
Title: Re: google chrome linux...
Post by: brokndodge on October 20, 2009, 09:25:58 am
the latest version of the script does check for gconf.  sorry i haven't implemented an uninstall option.  the latest version of the install script and the update script can be found on my blog: brokndodge.blogspot.com i recommend you set a chron job for the update script to run at least weekly.  seems like new builds get released on tuesdays.  but i'm not sure.  print and flash are both working fairly well now and turned on by default.  tho print has broken once or twice.
Title: Re: google chrome linux...
Post by: stretchedthin on October 20, 2009, 12:27:03 pm
Thanks brokndodge.  Really great work.  I'll be sure to upgrade my scripts.
Title: Re: google chrome linux...
Post by: brokndodge on October 31, 2009, 08:16:43 am
I noticed the other day that xfce crashes immediately after installing chrome with my installer.  you just have to get to a console and reboot for everything to go back to normal.  but that really shouldn't be needed.  i'm not understanding the problem.  do i need to trigger something in xfce before the script ends?

 
Title: Re: google chrome linux...
Post by: stretchedthin on October 31, 2009, 09:31:48 am
I noticed the same thing during my installs into VL on virtualbox.  I rebooted from the console and all was well as you described, but I didn't realize that it was Xfce that was crashing. 

I'm going to try the script again and see if
xfdesktop --reload
Is enough to bring the desktop back.  If it works that should be easy enough to include in your script.
Title: Re: google chrome linux...
Post by: stretchedthin on October 31, 2009, 11:10:44 pm
xfdesktop --reload didn't work.  I think the problem has to do with permissions.  When I exited root and went back to being a normal user, I didn't have permissions to do anything.  I could not even su again to become a super user once more.  But as you said all you need to do is restart the system and everything is fine.
Title: Re: google chrome linux...
Post by: brokndodge on November 01, 2009, 11:57:12 am
tried:
xfce4-session
it doesn't have any reload, refresh or restart command line options

xfce4-panel
has a --restart switch, but it just causes the crash to occur more quickly.  once the crash occurs you can run xfce4-panel --restart to get it back, but with limited functionality.  xfce will still need to be completely restarted to get it back to normal. i also tried the --add switch.  same results.  i don't know why the crash is occurring. i think it may have something to do with the google-chrome.desktop file

edit: i don't think that it's just the panel that's crashing, i think it's the whole xfce session.  thing is, when i try to run xfce4-session after the crash, it tells me there is already a session manager running.  but when i try to run xfdesktop, it tells me there is no session manager.  i'm lost.  i also commented out the entire google-chrome.desktop portion of the script and still get the same behavior.  so it's not the overly bloated (with international language support and support for 3 different desktops) .desktop file that's crashing xfce.  maybe it's the exit code.  i don't know.

edit2:  well i triggered the crash again so i could look at the log files. 
dmesg tail gives me this:
Code: [Select]
xfdesktop[5870]: segfault at 0 ip b7647e25 sp bfd3c7e8 error 4 in libglib-2.0.so.0.1600.3[b75f1000+cc000]
xfce4-menu-plug[5868]: segfault at 0 ip b7815e25 sp bfcd34b8 error 4 in libglib-2.0.so.0.1600.3[b77bf000+cc000]
xfce4-panel[5860]: segfault at 0 ip 08053118 sp bfb36a50 error 4 in xfce4-panel[8048000+17000]

Title: Re: google chrome linux...
Post by: stretchedthin on November 05, 2009, 12:05:54 am
I just tried running the Check-Update script and got the following error...
./update-chrome: line 66: `check-update': not a valid identifier

Odd, because I seem to remember having run the script without any trouble not to long ago.
Title: Re: google chrome linux...
Post by: brokndodge on November 09, 2009, 05:54:46 am
stretchedthing  - Sorry for the delay in replying.  I retested the version of update-chrome from my blog.  Worked fine here on VL standard.  Has same issue as install-chrome, for some unknown reason it's crashing xfce.  I think I'm going to post a bug report for xfce.  Try the version from my blog, shouldn't be any different from what you have, but just to be sure.


[url]http://brokndodge.blogspot.com/2009/08/script-for-updating-chrome-on-vector.html/url]
Title: Re: google chrome linux...
Post by: Daniel on November 11, 2009, 11:22:52 am
I tried the makepkg method to package google-chrome and I think it worked. I have uploaded the package to my google site. BUT, google sites has an 11MB file size limit on uploading so I used a method that I am working using in a script/program to take the file apart and be able to put it back together again. I took the file apart into 2 pieces. The script below should wget the pieces and put them back together. Please test and see if the package works.

Code: [Select]
#! /bin/sh

wget http://sites.google.com/site/tuxtoys/Home/packages/piece1
wget http://sites.google.com/site/tuxtoys/Home/packages/piece2

cat piece1 > google-chrome-unstable-current-1vl60.tlz
cat piece2 >> google-chrome-unstable-current-1vl60.tlz

check=$(md5sum google-chrome-unstable-current-1vl60.tlz)

if [ $check = "1d4c6c58d1b831772c375ae4a9f51c35" ];then
echo google-chrome-unstable-current-1vl60.tlz has been put back together and is the same as the original.
else
echo google-chrome-unstable-current-1vl60.tlz has been put back together but is not the same as the original. The pieces may be corrupted.
fi

exit 0
Title: Re: google chrome linux...
Post by: brokndodge on November 16, 2009, 06:27:30 am
daniel - i gave the script a try, wget couldn't get the pieces. i pulled the two pieces using chrome browser but one or both seem to be corrupted. 

on a side note, i have a build system that should build chrome from source now.  but haven't tried because of the instability of the code.  any given update could have bugs that will need patched as soon as possible.  that really means that a static package would require almost a full time maintainer.  there are anywhere from 1-5 full releases each week.  that would require a dedicated build system just for chrome. 

i haven't made any headway at all on figuring out why my two scripts are crashing xfce.  i'm starting to think that it may require going the long way around:  maybe building a slackware package then installing that package.  i just can't see anywhere that my script overlaps xfce.  even if you comment out the parts that touch the google-chrome.desktop file, xfce still crashes. 

does xfce crash using your makepkg method?
Title: Re: google chrome linux...
Post by: Daniel on November 16, 2009, 08:40:48 pm
I will try to fix the wget/put-together script thingy. I actually haven't had time to try my chrome package on my testing system yet. I am running VL 5.9.1 SOHO (w/KDE) so I can't really test the xfce crash problem.
Title: Re: google chrome linux...
Post by: Daniel on November 17, 2009, 02:20:25 pm
Ok, something about links and uploads and stuff with google sites makes it impossible (at least, I haven't found a solution yet) for wget to get stuff from a google site. You will have to get the pieces by downloading from these links:

http://sites.google.com/site/tuxtoys/Home/packages/piece1
http://sites.google.com/site/tuxtoys/Home/packages/piece2

Then run this script in the directory where the pieces are:

Code: [Select]
#! /bin/sh

cat piece1 > google-chrome-unstable-current-1vl60.tlz
cat piece2 >> google-chrome-unstable-current-1vl60.tlz

check=$(md5sum google-chrome-unstable-current-1vl60.tlz)

if [ $check = "1d4c6c58d1b831772c375ae4a9f51c35" ];then
echo google-chrome-unstable-current-1vl60.tlz has been put back together and is the same as the original.
else
echo google-chrome-unstable-current-1vl60.tlz has been put back together but is not the same as the original. The pieces may be corrupted.
fi

exit 0

That should put the pieces back together into the package and check to make sure that the md5sum is the same as the original.
Title: Re: google chrome linux...
Post by: Daniel on December 09, 2009, 12:09:55 pm
Since Google released an official beta version for linux, I decided to take a look at it. It's a .deb or .rpm package ( and 32 or 64 bit) so I cracked open the .deb, and repackaged it as a .tlz (as I did before). I installed the package and I think it would work except for this error message that I get when I execute "google-chrome":

[7376:7376:18159943326:FATAL:/usr/local/google/home/chrome-eng/b/slave/chrome-official-linux/build/src/chrome/browser/zygote_host_linux.cc(117)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /opt/google/chrome/chrome-sandbox is mode 4755 and owned by root.
Trace/breakpoint trap

I'm not sure about how to check the "mode 4755" but I did confirm that chrome-sandbox is owned by root. Any ideas about how to fix this?
Title: Re: google chrome linux...
Post by: Pita on December 19, 2009, 09:37:07 pm
I installed google-chrome-beta_current_i386.rpm and all seems to be working fine.
No hang-ups or hick-ups sofar. Flash is excellent. Installed as rpm -i --nodeps.
Title: Re: google chrome linux...
Post by: stretchedthin on December 20, 2009, 04:19:20 pm
I installed google-chrome-beta_current_i386.rpm and all seems to be working fine.
No hang-ups or hick-ups sofar. Flash is excellent. Installed as rpm -i --nodeps.

That will work if you already have the dependencies installed, but for someone adding to a freshly installed Vector system, it just wouldn't work.  I've noticed brokndodges script isn't working for me anymore since Google come out with this official release.
Title: Re: google chrome linux...
Post by: stretchedthin on December 21, 2009, 12:47:36 am
Here's an updated tut on installing Google Chrome on Vector.  I did this on a fresh install of VL 6.0 standard.  If it works or even more importantly does not work for you, I sure would like to know.

Installing Google Chrome and dependecies on Vectorlinux light (http://www.opensourcebistro.com/Tutorial/VL60/10.Browsers/gchrome/gchromeVLlight.htm)

Installing Google Chrome and dependecies on Vectorlinux Gold (http://www.opensourcebistro.com/Tutorial/VL60/10.Browsers/gchrome/gchrome2.htm)
Title: Re: google chrome linux...
Post by: brokndodge on January 01, 2010, 12:18:17 pm
I've been busy with work and other stuff.  I just now check the forums and found that the installer is broken.  Google now has two entries in the Packages.gz file.  My script assumes only one entry.  I'm going to have to find a way to parse the data into the two seperate entries.  There is one entry for the Beta version and one for the Unstable version.
Title: Re: google chrome linux...
Post by: brokndodge on January 01, 2010, 08:25:09 pm
Ok, I have updated the scripts to handle the new multi-package release of google chrome. Right now both the update script and the install script default to the first package listed, at the moment that is the beta release.  I'll implement package selection in a few days.  Working on a method of determining the installed package and keeping to that for the update script.  Have the basic variables already in place to select which release you want for the install script.  i just haven't built the menu, that will rely on the method I use to determine which package is installed for the update script.

I did a lil work today on the crash issue, still can't figure it out.  Both scripts will crash xfce!!!  You must reboot after running the scripts. Once rebooted, everything will return to normal.  You can type "reboot"  in the terminal that you ran the script in to reboot the system.

install-chrome.sh
Code: [Select]
#! /bin/bash
# Title: install-chrome
# Author: BroknDodge
# License: BSD
# Version: 0.0.5
#
# Special thanks to the following Vectorians for their help and suggestions:
# Daniel stretchedthin uelsk8ts
# hata_ph rbistolfi MOE-lnx
#
# Very Special thanks to the folks at Chromium.org and Google
# without whom there wouldn't be anything to install
#

#------------------------------------------#
# Setting up the Environment

enablePlugins="$1"
tmp="/tmp"
release="0"
chromeURL="http://dl.google.com/linux/deb/"

nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2"
nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"

#------------------------------------------#
# Making sure the system is sane

if [ $UID != 0 ]; then
echo "You must run this script as root."
exit 1
fi

if [ -d "$tmp/install-chrome" ]; then  # check for and create temp dir
 # Will enter here if dir doesn't exist
 rm -R $tmp/install-chrome  # hope you didn't have anything
 mkdir $tmp/install-chrome  # stored there
else
 mkdir $tmp/install-chrome
fi

#------------------------------------------#

function trim() # function for trimming white space from my arrays
{
    trimmed=$1
    trimmed=${trimmed%% }
    trimmed=${trimmed## }

    echo $trimmed
}


function dotests {

echo Running tests...
#------------------------------------------#
# check for lzma

haveLZMA=`which lzma`    # check for and getting lzma
if [ "$haveLZMA" == "" ]; then
 slapt-get --install lzma
fi

#------------------------------------------#

#------------------------------------------#
#  check for nss = 3.12.3

nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version
nssInstalled=${nssInstalled#*=}   # as well, but this build seems to
nssInstalled=${nssInstalled%]*}   # work best with 3.12.3

if [ "$nssInstalled" != "yes" ]; then
 installnss
fi
#------------------------------------------#

#------------------------------------------#
#  check for GConf

gconfInstalled=`slapt-get --search GConf-2.22.0` # VL-Light doesn't ship with GConf
gconfInstalled=${gconfInstalled#*=}   
gconfInstalled=${gconfInstalled%]*}   

if [ "$gconfInstalled" != "no" ]; then
 slapt-get --install GConf
fi

}
#------------------------------------------#


function simlinks {
cd /usr/lib
if [ ! -f "libnspr4.so.0d" ]; then
 ln -s libnspr4.so libnspr4.so.0d
fi

if [ ! -f "libnss3.so.1d" ]; then
 ln -s libnss3.so libnss3.so.1d
fi

if [ ! -f "libnssutil3.so.1d" ]; then
 ln -s libnssutil3.so libnssutil3.so.1d
fi

if [ ! -f "libplc4.so.0d" ]; then
 ln -s libplc4.so libplc4.so.0d
fi

if [ ! -f "libplds4.so.0d" ]; then
 ln -s libplds4.so libplds4.so.0d
fi

if [ ! -f "libsmime3.so.1d" ]; then
 ln -s libsmime3.so libsmime3.so.1d
fi

if [ ! -f "libssl3.so.1d" ]; then
 ln -s libssl3.so libssl3.so.1d
fi


}

function installnss {

cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
 echo "For some reason wget didnt pull nss from Connies"
 echo "slackware site"
 return 1
fi
installpkg $nssPackage

rm $nssPackage

}

function installchrome {

cd $tmp/install-chrome
wget http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
gunzip Packages.gz
rm -f Packages.gz
IFS='
'

declare -a fn=( `grep 'Filename:' Packages` ) # assign grep output to a variable
for i in 0 $((${#fn[@]} - 1))
do
  fn[$i]=$(trim "${fn[$i]#*:}")
done

chromeFilename="${fn[$release]}"
chromePackage="${chromeFilename##*/}"

wget $chromeURL$chromeFilename

if [ ! -f "$chromePackage" ]; then   # quit running if wget failed
 echo "Something went wrong while retrieving" # and kick out a sane error msg
 echo "Google Chrome"
 return 1
fi

echo "Unpacking the deb file"
ar -x $tmp/install-chrome/$chromePackage

if [ ! -f "data.tar.lzma" ]; then   # quit running if ar failed
 echo "Something went wrong while unpacking" # and kick out a sane error msg
 echo "the .deb file"
 return 1
fi

echo "Extracting Google Chrome"
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then    # quit running if lzma failed
 echo "Something went wrong while extracting" # and kick out a sane error msg
 echo "Google Chrome"
 return 1
fi

cd /
echo "Installing Google Chrome"

tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
 echo "Installation failed while moving files" # installed correctly
 echo ""
 return 1
fi
echo "Installation Complete!"

}

function main {
echo
echo "WARNING WARNING WARNING WARNING WARNING"
echo "This script may severely damage your system"
echo "Dont say I didnt WARN you"
echo
echo "Are you sure you want me to Monkey with your System? [yes/no]"
echo "[for your safety you must type yes to proceed]"
echo

read YN
if [ "$YN" = "yes" ]; then
 if [ -d "/opt/google/chrome" ]; then
  echo "Looks like Google Chrome is already installed"
  echo "Do you want to remove it and reinstall? [yes/no]"
  read yn
  if [ "$yn" = "yes" ]; then
   rm -R /opt/google/chrome
   rm /usr/share/applications/google-chrome.desktop
   dotests
   simlinks
   installchrome
  else
   return
  fi
 else
  dotests
  simlinks
  installchrome
 
 fi
elif [ "$YN" = "no" ]; then
 return
else
 main
fi

}

main




update-chrome.sh
Code: [Select]
#!/bin/bash
# Title: update-chrome
# Author: BroknDodge
# License: BSD
# Version: 0.0.1

# http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
# http://dl.google.com/linux/deb/dists/pool/main/g/google-chrome-unstable/google-chrome-unstable_3.0.196.0-r22005_i386.deb

#----------------------------------------#
#  Settings 

url="http://dl.google.com/linux/deb/"
tmp="/tmp"
declare -a ChromePackages

#----------------------------------------#

#----------------------------------------#
# Testing the Environment

if [ $UID != 0 ];then    # test for root
echo "You must run this script as root."
exit 0
fi

if [ ! -d "$tmp/update-chrome" ]; then
# Will enter here if dir doesn't exist
mkdir $tmp/update-chrome
fi

cd $tmp/update-chrome

if [ -f "Packages" ]; then
 #checking to see if Packages exists
 mv Packages Packages.installed
fi

#----------------------------------------#

function check-update {
wget http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
gunzip Packages.gz

if [ ! -f "Packages.installed" ]; then
 update
fi

IFS='
'
declare -a version=( `grep 'Version:' Packages` )
for i in 0 $((${#version[@]} - 1))
do
  version[$i]=$(trim "${version[$i]#*:}")
done

declare -a VersionInstalled=( `grep 'Version:' Packages.installed` )
for i in 0 $((${#VersionInstalled[@]} - 1))
do
  VersionInstalled[$i]=${VersionInstalled[$i]#*:}
done

if [ "$version[0]" == "$VersionInstalled[0]" ]; then
 echo Google Chrome is Up to Date
 rm Packages
 return
else
 echo $VersionInstalled[0] is installed, but $version[0] is available
 echo Updating
 update
fi

}

function update {   
IFS='
'

declare -a fn=( `grep 'Filename:' Packages` ) # assign grep output to a variable
for i in 0 $((${#fn[@]} - 1))
do
  fn[$i]=$(trim "${fn[$i]#*:}")
done

filename="${fn[0]}"

mkdir tmp
cd tmp
wget $url$filename

rm -R /opt/google/chrome  # get rid of the previous install
     # don't worry settings are stored in $HOME dir
cd $tmp/update-chrome/tmp

echo Unpacking the deb file...
ar -x ${filename##*/}
echo Extracting Google Chrome...
lzma -d data.tar.lzma
cd /
echo Updating Google Chrome...

tar xf $tmp/update-chrome/tmp/data.tar
cd $tmp/update-chrome
mv Packages Packages.installed
declare -a VersionInstalled=( `grep 'Version:' Packages.installed` )
for i in 0 $((${#VersionInstalled[@]} - 1))
do
  echo ${VersionInstalled[$i]}
  VersionInstalled[$i]=$(trim "${VersionInstalled[$i]#*:}")
  echo "${VersionInstalled[$i]}"
done

echo "Google Chrome updated to version" ${VersionInstalled[0]}
rm -R tmp

return
}


function trim() # function for trimming white space from my arrays
{
    trimmed=$1
    trimmed=${trimmed%% }
    trimmed=${trimmed## }

    echo $trimmed
}


function main {
check-update
return
}

main

Title: Re: google chrome linux...
Post by: brokndodge on September 12, 2010, 06:14:08 pm
Tested my install script today.  Still works, ran it from tty2 cause of the swap space issue I posted bout in the Lounge.  Installed Chrome without any issues, I issued a reboot from tty2 without checking to see if xfce had crashed, just assumed it would.  Once rebooted, Chrome was working flawlessly.  Except for the swap issue previously mentioned.
Title: Re: google chrome linux...
Post by: kc1di on September 20, 2010, 05:20:24 am
Here's an updated tut on installing Google Chrome on Vector.  I did this on a fresh install of VL 6.0 standard.  If it works or even more importantly does not work for you, I sure would like to know.

Installing Google Chrome and dependecies on Vectorlinux light (http://www.opensourcebistro.com/Tutorial/VL60/10.Browsers/gchrome/gchromeVLlight.htm)

Installing Google Chrome and dependecies on Vectorlinux Gold (http://www.opensourcebistro.com/Tutorial/VL60/10.Browsers/gchrome/gchrome2.htm)

Works great here on both lite and Std 6.0. Work in 7.0 Alpha but fonts and colors nor correct. Won't work in SOHO 6.0 though.  there is a long list of missing Deps in soho.

dave
Title: Re: google chrome linux...
Post by: roarde on September 20, 2010, 10:15:31 am
Followed the Light tutorial. A few glitches when tried with a light that's in use and has had packages installed:

Tried mc to install mozilla-nss. "Install" is not in the menu of my later version of mc installation. Not knowing how to change the menu or manually install the package, I located a VL 6 package of mozilla-nss (now in the testing repo) and installed.

Tried alien for chrome itself, but I'm not willing to learn how to use it properly right now, so it failed. Chrooted to my fresh light jail, did mc -V, and d/l'd that version from the "old" repo to my working light, installing it with upgradepkg. Installed chrome using mc. Didn't get the xdg-desktop warning, but was warned that atd wasn't running. Something for me to look at later, as the install did complete, and I'm posting from Chrome right now.

The hard part, of course, was remembering my forum password.

Speed is improved, flash is better though still not practical on this machine (ALSA needs tweaks for VIA). FYI, this version of chrome-linux has been "upgraded" from beta to stable.

Good tutorial, thank you. Hope the feedback helps.
Title: Re: google chrome linux...
Post by: prince on September 20, 2010, 11:53:15 am
If it walks like a snake, talks like a snake ....

No disrespect, but I'm not the least bit impressed.

In terms of Google Chrome speed, on this computer, it is not dissimilar to Opera's latest, among others.
Right now, out of the popular Web Browsers, Opera and Seamonkey are one of the few web browsers I trust. Okay, Seamonkey, not as popular, but I find it much more stable than Firefox.

To me, mainstream means trouble.  I prefer browsers more away from mainstream such as Konqueror, Midori, Netsurf, and Dillo. You might find them faster, too.  More of an essence, you should find them much more safer, because feeble-minded virus programmers invest on a big catch, predominately - the mainstream web browsers.  Plus these Open Source browsers intentions are more clear than Google's.

In terms of security, I find some of Google's practices questionable. By the way, I notice on a MS Windows machines Google Chrome chooses to install on administrators account, strictly. Which is unsafe, the least, let alone, suspect.

Also, the Youtube Downloader is another suspect program (as identified by Eset Smart Security for Windows).  You would figure Youtube would provide that feature by default.  As to: why not?, It would appear as another questionable practice.

No  disrespect, I could be wrong about people running machines as testers, but in my neighborhood people put out testers curbside from time to time.  I had grabbed one myself, only to test software with it, but ultimately, don't make it your main computer.  Invest, you deserve much better than that.
Above all, don't frustrate yourself or waste time.

Futhermore, I would question any company that releases a watered down versions of their product (like Picasa) for Unix and Linux.  I don't see Unix and Linux as an afterthought, neither should they.



,
Title: Re: google chrome linux...
Post by: kc1di on September 20, 2010, 02:11:01 pm
Followed the Light tutorial. A few glitches when tried with a light that's in use and has had packages installed:

Tried mc to install mozilla-nss. "Install" is not in the menu of my later version of mc installation. Not knowing how to change the menu or manually install the package, I located a VL 6 package of mozilla-nss (now in the testing repo) and installed.

Tried alien for chrome itself, but I'm not willing to learn how to use it properly right now, so it failed. Chrooted to my fresh light jail, did mc -V, and d/l'd that version from the "old" repo to my working light, installing it with upgradepkg. Installed chrome using mc. Didn't get the xdg-desktop warning, but was warned that atd wasn't running. Something for me to look at later, as the install did complete, and I'm posting from Chrome right now.

The hard part, of course, was remembering my forum password.

Speed is improved, flash is better though still not practical on this machine (ALSA needs tweaks for VIA). FYI, this version of chrome-linux has been "upgraded" from beta to stable.

Good tutorial, thank you. Hope the feedback helps.

For Chrome you need to download the .rpm package and also you'll need to install rpm in light from the repository as it was not installed by default.
but it's in the repro.  Then the install in mc will show in the menu.
works great here.
:)
Title: Re: google chrome linux...
Post by: Daniel on September 23, 2010, 10:26:23 am
I think mozilla-nss is in the repo already.
Title: Re: google chrome linux...
Post by: kc1di on September 23, 2010, 12:35:12 pm
I think mozilla-nss is in the repo already.
it's in Testing