LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-22-2017, 12:54 AM   #1
xaxlm
LQ Newbie
 
Registered: Nov 2016
Location: México City
Distribution: Debian & Slackware
Posts: 23

Rep: Reputation: Disabled
Smile Google Chrome does not boot - custom install


Hello

I have Debian Stretch and I have installed some programs in a specific directory basically to have more control, one of them is google-chrome. I have made a small script for the customization of the installation, however when I finish installing chrome does not start; Only starts after restarting the machine.
Here the information:

ERROR_DISPLAYED
Click image for larger version

Name:	Captura de pantalla_2017-08-21_20-58-45.png
Views:	4
Size:	59.9 KB
ID:	25762

INSTALLATION_SCRIPT

Code:
# Ultima actualización: 20/08/2017
#!/bin/bash
cd /
#
# Se descarga Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -x google-chrome-stable_current_amd64.deb /tmp/
cd /tmp/
tar czvf google-chrome-stable_current_amd64.tar.gz opt/ usr/ etc/
cd /
mv /tmp/google-chrome-stable_current_amd64.tar.gz .
#
# Se confirma la existencia de dependencias necesarias
echo '>>> Ingresando a /usr/local/...'
cd /usr/local/
echo 'Instalando dependencias adicionales...'
apt-get install libindicator7 libdbusmenu-gtk4 libdbusmenu-glib4 libappindicator1
echo 'Dependencias instaladas...'
sleep 2
echo 'Se va a instalar en /usr/local/...'
read -p "Ingresa el nombre del directorio principal de instalacion, si no existe se creará: " DIRINST
if [ -d $DIRINST ];
	then
		echo 'El directorio ya existe...'
		echo '>>> Ingresando...'
		cd $DIRINST
	else
		echo 'El directorio no existe...'
		echo 'Creando directorio...'
		mkdir $DIRINST
		echo 'Directorio creado...'
		echo '>>> Ingresando...'
		cd $DIRINST
fi
sleep 2
mkdir google_chrome
cd google_chrome/
mv /google-chrome-stable_current_amd64.tar.gz /usr/local/$DIRINST/google_chrome/
tar xzvf google-chrome-stable_current_amd64.tar.gz
cd ../
#
# El directorio tiene que ser propiedad de root para actuar sobre éste
# SUID adecuados sobre google-sandbox para poder ejecutar el binario
chown -R root:root google_chrome/
chmod -R +x google_chrome/
chmod g-s google_chrome/
chmod 4755 google_chrome/opt/google/chrome/chrome-sandbox
#
#App a Menú
cd /usr/share/applications/
touch google-chrome.desktop
echo '[Desktop Entry]' > google-chrome.desktop
echo 'Version=60.0.3112.101 empaquetado de .deb' >> google-chrome.desktop
echo 'Name=Google Chrome' >> google-chrome.desktop
echo 'Comment=Suite Navegador Web' >> google-chrome.desktop
echo 'Exec=/usr/local/'$DIRINST'/google_chrome/opt/google/chrome/google-chrome' >> google-chrome.desktop
echo 'Icon=/usr/local/'$DIRINST'/google_chrome/opt/google/chrome/product_logo_16.png' >> google-chrome.desktop
echo 'Categories=Network;' >> google-chrome.desktop
echo 'Terminal=false' >> google-chrome.desktop
echo 'Type=Application' >> google-chrome.desktop
cd /usr/local/$DIRINST/google_chrome/
#
#Remove
touch remove.sh
echo "#!/bin/bash" > remove.sh
echo "echo '------------------------------'" >> remove.sh
echo "echo 'Removiendo...'" >> remove.sh
echo 'apt-get remove libindicator7 libdbusmenu-gtk4 libdbusmenu-glib4 libappindicator1' >> remove.sh
echo "echo -ne '[===>                                    ]( 8.33%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=========>                              ](16.66%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[============>                           ](24.99%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[===============>                        ](33.32%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[==================>                     ](41.65%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=====================>                  ](49.98%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[========================>               ](58.31%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[===========================>            ](66.64%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[==============================>         ](74.97%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=================================>      ](83.30%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[====================================>   ](91.64%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=======================================>](100.00%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '\n'" >> remove.sh
echo 'cd /' >> remove.sh
echo 'rm -rf /usr/share/applications/google-chrome.desktop' >> remove.sh
echo 'rm -rf /usr/local/'$DIRINST'/google_chrome/' >> remove.sh
USR=`users`
echo 'rm -rf /home/'$USR'/.cache/google-chrome/' >> remove.sh
echo 'rm -rf /home/'$USR'/.config/google-chrome/' >> remove.sh
echo "echo 'Completado!'" >> remove.sh
echo "echo '------------------------------'" >> remove.sh
echo 'exit' >> remove.sh
chmod 744 remove.sh
#
#README
touch README.txt
echo 'Google Chrome' > README.txt
echo 'Idioma=es_MX' >> README.txt
echo 'Version=60.0.3112.101 empaquetado de .deb' >> README.txt
echo 'Arquitectura=x86_64' >> README.txt
echo 'Esta es una instalación no invasiva.' >> README.txt
echo 'Para desinstalar ejecute el fichero remove.sh como root.' >> README.txt
echo '' >> README.txt
echo 'https://www.google.com.mx/chrome/browser/desktop/index.html' >> README.txt
echo '' >> README.txt
echo 'xaxlm' >> README.txt
cd /
echo '------------------------------'
echo 'Limpiando...'
echo -ne '[===>                                    ]( 8.33%)\r';sleep 0.2
echo -ne '[=========>                              ](16.66%)\r';sleep 0.2
echo -ne '[============>                           ](24.99%)\r';sleep 0.2
echo -ne '[===============>                        ](33.32%)\r';sleep 0.2
echo -ne '[==================>                     ](41.65%)\r';sleep 0.2
echo -ne '[=====================>                  ](49.98%)\r';sleep 0.2
echo -ne '[========================>               ](58.31%)\r';sleep 0.2
echo -ne '[===========================>            ](66.64%)\r';sleep 0.2
echo -ne '[==============================>         ](74.97%)\r';sleep 0.2
echo -ne '[=================================>      ](83.30%)\r';sleep 0.2
echo -ne '[====================================>   ](91.64%)\r';sleep 0.2
echo -ne '[=======================================>](100.00%)\r';sleep 0.2
echo -ne '\n'
rm -rf /tmp/opt/
rm -rf /tmp/usr/
rm -rf /tmp/etc/
rm -rf /google-chrome-stable_current_amd64.deb
rm -rf /usr/local/$DIRINST/google_chrome/google-chrome-stable_current_amd64.tar.gz
if [ -d /home/$USR/.cache/google-chrome/ ];
	then
		rm -rf /home/$USR/.cache/google-chrome/
	else
		:
fi
if [ -d /home/$USR/.config/google-chrome/ ];
	then
		rm -rf /home/$USR/.config/google-chrome/
	else
		:
fi
echo 'Completado!'
echo '------------------------------'
exit
Note: Chrome worked without rebooting with Debian Jessie
I appreciate any help or suggestion.

Last edited by xaxlm; 08-22-2017 at 08:32 AM.
 
Old 08-22-2017, 05:19 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19 MATE
Posts: 6,441
Blog Entries: 2

Rep: Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113
Quote:
Originally Posted by xaxlm View Post
Hello

I have Debian Stretch and I have installed some programs in a specific directory basically to have more control, one of them is google-chrome. I have made a small script for the customization of the installation, however when I finish installing chrome does not start; Only starts after restarting the machine.
Here the information:

ERROR_DISPLAYED when running google-chrome in /gogle_chrome/opt/google/chrome/google-chrome

SAMPLE_VIDEO


INSTALLATION_SCRIPT


Note: Chrome worked without rebooting with Debian Jessie
I appreciate any help or suggestion.
Hi xaxlm.

I can't comment on any of the info you have provided in your links as, for security reasons, I won't click on unknown links (we have no idea what's awaiting us on that Google drive). You could have pasted text or images directly into this thread rather than post links. Also, what happens in the future if you delete the information on your Google drive? - it could render this thread pretty useless indeed.

But anyway, what I can comment on is that you have used the directory /gogle_chrome/ which contains a spelling error. You should therefore check your installation of Chrome and your scripts for similar spelling errors just in case.

Good luck.
 
Old 08-22-2017, 06:02 PM   #3
xaxlm
LQ Newbie
 
Registered: Nov 2016
Location: México City
Distribution: Debian & Slackware
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Hi xaxlm.

I can't comment on any of the info you have provided in your links as, for security reasons, I won't click on unknown links (we have no idea what's awaiting us on that Google drive). You could have pasted text or images directly into this thread rather than post links. Also, what happens in the future if you delete the information on your Google drive? - it could render this thread pretty useless indeed.

But anyway, what I can comment on is that you have used the directory /gogle_chrome/ which contains a spelling error. You should therefore check your installation of Chrome and your scripts for similar spelling errors just in case.

Good luck.

Hello, thank you for your suggestion, i have managed to solve it. Something happened with the permissions when unpacking the .de so I created a directory specifically to unpack and then pack in .tar.gz. Here the final code, can still be improved more:

Code:
#!/bin/bash
# Ultima actualización: 22/08/2017
cd /
#
# Se descarga Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
mkdir /tmp/google
chmod 755 /tmp/google/
dpkg -x google-chrome-stable_current_amd64.deb /tmp/google/
cd /tmp/google/
tar czvf google-chrome-stable_current_amd64.tar.gz opt/ usr/ etc/
#
# Se confirma la existencia de dependencias necesarias
echo '>>> Ingresando a /usr/local/...'
cd /usr/local/
echo 'Instalando dependencias adicionales...'
apt-get install libindicator7 libdbusmenu-gtk4 libdbusmenu-glib4 libappindicator1
echo 'Dependencias instaladas...'
sleep 2
echo 'Se va a instalar en /usr/local/...'
read -p "Ingresa el nombre del directorio principal de instalacion, si no existe se creará: " DIRINST
if [ -d $DIRINST ];
	then
		echo 'El directorio ya existe...'
		echo '>>> Ingresando...'
		cd $DIRINST
	else
		echo 'El directorio no existe...'
		echo 'Creando directorio...'
		mkdir $DIRINST
		echo 'Directorio creado...'
		echo '>>> Ingresando...'
		cd $DIRINST
fi
sleep 2
mkdir google-chrome
cd google-chrome/
mv /tmp/google/google-chrome-stable_current_amd64.tar.gz .
tar xzvf google-chrome-stable_current_amd64.tar.gz
cd ../
#
# El directorio tiene que ser propiedad de root para actuar sobre éste
# SUID adecuados sobre google-sandbox para poder ejecutar el binario
chown -R root:root google-chrome/
chmod -R +x google-chrome/
chmod g-s google-chrome/
chmod 4755 google-chrome/opt/google/chrome/chrome-sandbox
#
#App a Menú
cd /usr/share/applications/
touch google-chrome.desktop
echo '[Desktop Entry]' > google-chrome.desktop
echo 'Version=60.0.3112.101 empaquetado de .deb' >> google-chrome.desktop
echo 'Name=Google Chrome' >> google-chrome.desktop
echo 'Comment=Suite Navegador Web' >> google-chrome.desktop
echo 'Exec=/usr/local/'$DIRINST'/google-chrome/opt/google/chrome/google-chrome' >> google-chrome.desktop
echo 'Icon=/usr/local/'$DIRINST'/google-chrome/opt/google/chrome/product_logo_16.png' >> google-chrome.desktop
echo 'Categories=Network;' >> google-chrome.desktop
echo 'Terminal=false' >> google-chrome.desktop
echo 'Type=Application' >> google-chrome.desktop
cd /usr/local/$DIRINST/google-chrome/
#
#Remove
touch remove.sh
echo "#!/bin/bash" > remove.sh
echo "echo '------------------------------'" >> remove.sh
echo "echo 'Removiendo...'" >> remove.sh
echo 'apt-get remove libindicator7 libdbusmenu-gtk4 libdbusmenu-glib4 libappindicator1' >> remove.sh
echo "echo -ne '[===>                                    ]( 8.33%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=========>                              ](16.66%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[============>                           ](24.99%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[===============>                        ](33.32%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[==================>                     ](41.65%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=====================>                  ](49.98%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[========================>               ](58.31%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[===========================>            ](66.64%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[==============================>         ](74.97%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=================================>      ](83.30%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[====================================>   ](91.64%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '[=======================================>](100.00%)\r';sleep 0.2" >> remove.sh
echo "echo -ne '\n'" >> remove.sh
echo 'cd /' >> remove.sh
echo 'rm -rf /usr/share/applications/google-chrome.desktop' >> remove.sh
echo 'rm -rf /usr/local/'$DIRINST'/google-chrome/' >> remove.sh
USR=`users`
echo 'rm -rf /home/'$USR'/.cache/google-chrome/' >> remove.sh
echo 'rm -rf /home/'$USR'/.config/google-chrome/' >> remove.sh
echo "echo 'Completado!'" >> remove.sh
echo "echo '------------------------------'" >> remove.sh
echo 'exit' >> remove.sh
chmod 744 remove.sh
#
#README
touch README.txt
echo 'Google Chrome' > README.txt
echo 'Idioma=es_MX' >> README.txt
echo 'Version=60.0.3112.101 empaquetado de .deb' >> README.txt
echo 'Arquitectura=x86_64' >> README.txt
echo 'Esta es una instalación no invasiva.' >> README.txt
echo 'Para desinstalar ejecute el fichero remove.sh como root.' >> README.txt
echo '' >> README.txt
echo 'https://www.google.com.mx/chrome/browser/desktop/index.html' >> README.txt
echo '' >> README.txt
echo 'xaxlm' >> README.txt
cd /
echo '------------------------------'
echo 'Limpiando...'
echo -ne '[===>                                    ]( 8.33%)\r';sleep 0.2
echo -ne '[=========>                              ](16.66%)\r';sleep 0.2
echo -ne '[============>                           ](24.99%)\r';sleep 0.2
echo -ne '[===============>                        ](33.32%)\r';sleep 0.2
echo -ne '[==================>                     ](41.65%)\r';sleep 0.2
echo -ne '[=====================>                  ](49.98%)\r';sleep 0.2
echo -ne '[========================>               ](58.31%)\r';sleep 0.2
echo -ne '[===========================>            ](66.64%)\r';sleep 0.2
echo -ne '[==============================>         ](74.97%)\r';sleep 0.2
echo -ne '[=================================>      ](83.30%)\r';sleep 0.2
echo -ne '[====================================>   ](91.64%)\r';sleep 0.2
echo -ne '[=======================================>](100.00%)\r';sleep 0.2
echo -ne '\n'
rm -rf /tmp/google/
rm -rf /google-chrome-stable_current_amd64.deb
rm -rf /usr/local/$DIRINST/google-chrome/google-chrome-stable_current_amd64.tar.gz
if [ -d /home/$USR/.cache/google-chrome/ ];
	then
		rm -rf /home/$USR/.cache/google-chrome/
	else
		:
fi
if [ -d /home/$USR/.config/google-chrome/ ];
	then
		rm -rf /home/$USR/.config/google-chrome/
	else
		:
fi
echo 'Completado!'
echo '------------------------------'
exit
 
Old 08-23-2017, 10:06 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19 MATE
Posts: 6,441
Blog Entries: 2

Rep: Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113Reputation: 2113
Glad you got it sorted, xaxlm.

Thanks for posting your solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't install Google Chrome browser Gregg Bell Linux - Software 15 07-09-2016 09:49 PM
LXer: Linux Software you won't find on your Software Center: Install Google Chrome, Google Earth and LXer Syndicated Linux News 0 05-16-2015 07:48 PM
[SOLVED] Can't install Google Chrome on OpenSUSE 12.1 CellBlock420 Linux - Software 4 09-05-2012 07:22 AM
Google chrome install problem awdoyle Linux - Software 3 01-26-2011 05:35 AM
I can't install google-chrome on Slackware 13.1 for x86_64 alculquicondor Slackware 6 07-18-2010 02:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration