Page 1 of 1

Google Chrome with root and sound

Posted: 22 Jul 2017, 13:21
by amplatfus
Hi,

I managed to run Chrome under root using below sh

Code: Select all

sudo su guest << BASH
  /opt/google/chrome/google-chrome --start-maximized;
BASH
But I have no sound. In LXDE same script, same version of Chrome worked fine with sound under root.
But now with Porteus-v3.2.2 XFCE Kernel: 4.9.0-porteus I have sound only when I run chrome under guest.

Could you please give a hint?
Many thanks,
amplatfus

Re: Google Chrome with root

Posted: 22 Jul 2017, 17:01
by Ed_P
Hi amplatfus.

May I ask why you want to run Chrome as root? Especially if it runs ok as guest?

Re: Google Chrome with root

Posted: 22 Jul 2017, 17:28
by amplatfus
Ed_P wrote:Hi amplatfus.

May I ask why you want to run Chrome as root? Especially if it runs ok as guest?
Because I frequently need to edit folders that are created using a ftp account. And these foldere are made automated as root and I cannot change it.

BR

Re: Google Chrome with root

Posted: 22 Jul 2017, 17:55
by francois
I do not know why but, there is no sound with:

Code: Select all

su -c google-chrome guest
So I use opera.

Re: Google Chrome with root and sound

Posted: 22 Jul 2017, 19:47
by beny
i have chromium so you have to edited /etc/chromium/00-default.conf with this line: # Options to pass to chromium:
CHROMIUM_FLAGS="--user-data-dir"
and for me work to use it with root, take a try

Re: Google Chrome with root and sound

Posted: 23 Jul 2017, 02:42
by francois
All you need to do is to modify the last line of the file /opt/google/chrome/google-chrome from:

Code: Select all

exec -a "$0" "$HERE/chrome"  "$@" 
to:

Code: Select all

exec -a "$0" "$HERE/chrome"  "$@" --user-data-dir
Also, in my case:
If you need to run as root for development, rerun with the --no-sandbox flag:

Code: Select all

root@porteus:~# /opt/google/chrome/google-chrome --no-sandbox
And I get a message about security that will suffer.

Google Chrome with root and sound

Posted: 31 Jul 2017, 20:38
by amplatfus
Thank you. I choose to use guest account. All the best,
amplatfus

Re: Google Chrome with root and sound

Posted: 06 Jan 2019, 16:31
by francois
No reason to why it works again, but it works now:

Code: Select all

su -c google-chrome guest

Re: Google Chrome with root and sound

Posted: 06 Jan 2019, 17:36
by amplatfus
Happy New Year! Thanks so much for follow up. In the meantime I switched my profile from root to guest with all my settings.
All the best!

Re: Google Chrome with root and sound

Posted: 06 Jan 2019, 18:08
by francois
Happy new year to you amplatfus. :happy62:

It will be good for short term posterity.

Google Chrome with root and sound

Posted: 01 Sep 2019, 00:55
by Flexdj
sudo -u guest google-chrome

Google Chrome with root and sound

Posted: 29 May 2021, 19:16
by rchase
The proposed solutions (other than logging in as guest) do not seem to work;
su -c google-chrome guest
and
sudo -u guest google-chrome
produce
google-chrome: command not found
I downloaded the Porteus server edition of Chrome (89.0.4389.90) using update-browser and the module is shown as loaded, but it won't run from the root account. What is needed to run Chrome as root?

Google Chrome with root and sound

Posted: 29 May 2021, 21:13
by beny
hi, via terminal or konsole start chrome with --no-sandbox, with opera work try it for...