Google Chrome with root and sound

Get help with XFCE specific problems
Post Reply
User avatar
amplatfus
Samurai
Samurai
Posts: 108
Joined: 30 Oct 2012, 14:55
Distribution: MATE Porteus-v3.2.2
Location: Romania

Google Chrome with root and sound

Post#1 by amplatfus » 22 Jul 2017, 13:21

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
Last edited by amplatfus on 26 Jul 2017, 17:44, edited 2 times in total.
Porteus-v3.2.2 MATE
Kernel: 4.9.12-porteus

User avatar
Ed_P
Contributor
Contributor
Posts: 3159
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Google Chrome with root

Post#2 by Ed_P » 22 Jul 2017, 17:01

Hi amplatfus.

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

User avatar
amplatfus
Samurai
Samurai
Posts: 108
Joined: 30 Oct 2012, 14:55
Distribution: MATE Porteus-v3.2.2
Location: Romania

Re: Google Chrome with root

Post#3 by amplatfus » 22 Jul 2017, 17:28

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
Porteus-v3.2.2 MATE
Kernel: 4.9.12-porteus

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Google Chrome with root

Post#4 by francois » 22 Jul 2017, 17:55

I do not know why but, there is no sound with:

Code: Select all

su -c google-chrome guest
So I use opera.
Voltaire: Le mieux est l'ennemi du bien.

beny
Full of knowledge
Full of knowledge
Posts: 723
Joined: 02 Jan 2011, 11:33
Location: italy

Re: Google Chrome with root and sound

Post#5 by beny » 22 Jul 2017, 19:47

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

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Google Chrome with root and sound

Post#6 by francois » 23 Jul 2017, 02:42

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.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
amplatfus
Samurai
Samurai
Posts: 108
Joined: 30 Oct 2012, 14:55
Distribution: MATE Porteus-v3.2.2
Location: Romania

Google Chrome with root and sound

Post#7 by amplatfus » 31 Jul 2017, 20:38

Thank you. I choose to use guest account. All the best,
amplatfus
Porteus-v3.2.2 MATE
Kernel: 4.9.12-porteus

Post Reply