[Linuxulator] How to run Google Chrome (linux-binary) on FreeBSD

stratacast1

Well-Known Member

Reaction score: 43
Messages: 336

They sure weren't kidding about the high load with spotify lol. I'm amazed this works!

Code:
last pid: 31988;  load averages:  3.06,  2.33,  1.36                                   up 0+00:24:05  18:43:23
76 processes:  1 running, 75 sleeping
CPU:  4.1% user,  0.5% nice,  2.5% system,  0.0% interrupt, 92.9% idle
Mem: 3066M Active, 2460M Inact, 151M Laundry, 2923M Wired, 7094M Free
ARC: 1528M Total, 353M MFU, 1135M MRU, 1096K Anon, 8585K Header, 28M Other
     1331M Compressed, 2622M Uncompressed, 1.97:1 Ratio
Swap: 4096M Total, 4096M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
13280 stratacast     36  20    0  3153M   264M select   8  11:07 200.00% ThreadPoolForeg
13449 stratacast      5  20    0   911M   139M futex    6   5:32 100.00% ThreadPoolForeg
13528 stratacast     13  30   10  6086M   361M futex    7   0:16   0.29% ThreadPoolForeg
 

delphinoob

New Member

Reaction score: 3
Messages: 14

Let me rephrase: it works on any BSD as long it's FreeBSD.
Okay. Obviously this specific guide would only work on freebsd but what i'm asking is if it's even in the realm of possibility that netbsd's linux binary emulation could be used for running the linux versions of chrome.
And if not I am simply curious as to why not
 

linux->bsd

Active Member

Reaction score: 67
Messages: 167

I wrote a script based on patovm04 's howto, which installs Chrome or Brave into a Ubuntu jail under /compat/ubuntu.
You're missing Ubuntu's security and update repos in your generated /etc/apt/sources.list. After adding them, an apt upgrade resulted in 184 package security updates being applied, including the following packages your script installs directly:

Code:
root@bionic:/# apt list --upgradable | grep -E 'gnupg|pulseaudio|\bapt|\bcurl'
apt/bionic-security 1.6.12ubuntu0.2 amd64 [upgradable from: 1.6.1]
apt-transport-https/bionic-security 1.6.12ubuntu0.2 all [upgradable from: 1.6.1]
apt-utils/bionic-security 1.6.12ubuntu0.2 amd64 [upgradable from: 1.6.1]
curl/bionic-security 7.58.0-2ubuntu3.12 amd64 [upgradable from: 7.58.0-2ubuntu3]
gnupg/bionic-security 2.2.4-1ubuntu1.3 amd64 [upgradable from: 2.2.4-1ubuntu1]
gnupg-l10n/bionic-security 2.2.4-1ubuntu1.3 all [upgradable from: 2.2.4-1ubuntu1]
gnupg-utils/bionic-security 2.2.4-1ubuntu1.3 amd64 [upgradable from: 2.2.4-1ubuntu1]
pulseaudio/bionic-security 1:11.1-1ubuntu7.11 amd64 [upgradable from: 1:11.1-1ubuntu7]
pulseaudio-utils/bionic-security 1:11.1-1ubuntu7.11 amd64 [upgradable from: 1:11.1-1ubuntu7]
Code:
root@bionic:/# apt-cache policy | grep 500
 500 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_18.04  Packages
 500 https://brave-browser-apt-release.s3.brave.com stable/main amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
 500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
Your script also works for installing the Pale Moon browser using Steve Pusser's Ubuntu steps. For sound support, my modifications create an additional /usr/local/bin/palemoon wrapper for exporting the audio/pulseaudio socket.

Additionally, I tested using your script to install Ubuntu 20.04, since Ubuntu 18.04 universe multiverse repos will hit EOL in April this year. It seems to be working fine there as well. You should consider updating the script to install 20.04 instead.
 

vigole

Daemon

Reaction score: 1,453
Messages: 1,266

if it's even in the realm of possibility that netbsd's linux binary emulation could be used for running the linux versions of chrome.
Almost certainly not. N.B. I don't have a GUI/NetBSD installation, only CLI. It's N/A!
But if you have one, please test it and share your experience/result at netbsd-users mailing list.
Suppose it were possible to run Chromium: I'm not sure about HTML5/Sound.

More info at NetBSD:
https://man.netbsd.org/compat_linux.8/
 

urmia

New Member


Messages: 1

I have a problem running Chrome and Brave. But before that I have a question about the starting steps. By doing 'service linux start' when linux is not installed it gives error that you don't have linux files, which by running 'pkg install emulators/linux_base-c7' I solve that error. Then I was not be able to run 'rm -Rf /compat/linux' given that the operation not permitted. Do we need 'service linux start' as clean install, or I am missing something? I know that you mentioned we need to start clean!

Then, following steps, and getting error on not able to write the chrome key in /dev/null, after fixing that, I could finished all steps but getting these errors and applications wont't start:

Chrome
$ /compat/linux/bin/chrome
ERROR: ld.so: object '/usr/local/steam-utils/lib64/webfix/webfix.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[2249:100920:0227/004438.576817:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
[2249:100924:0227/004438.635112:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[2249:100919:0227/004438.636545:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[2249:100920:0227/004438.637676:ERROR:udev_watcher.cc(51)] Failed to initialize a udev monitor.
Trace/BPT trap (core dumped)

Brave
$ /compat/linux/bin/brave
ERROR: ld.so: object '/usr/local/steam-utils/lib64/webfix/webfix.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[2202:101609:0227/003010.476300:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
[2202:101613:0227/003010.541241:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[2202:101608:0227/003010.544440:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[2202:101609:0227/003010.545604:ERROR:udev_watcher.cc(51)] Failed to initialize a udev monitor.
Trace/BPT trap (core dumped)

/etc/fstab
Code:
tmpfs                   /tmp            tmpfs           rw,mode=1777            0       0
procfs                  /proc           procfs          rw,late                 0       0
fdescfs                 /dev/fd         fdescfs         rw,late                 0       0
linprocfs       /compat/linux/proc      linprocfs       rw,late                 0       0
linsysfs        /compat/linux/sys       linsysfs        rw,late                 0       0
devfs           /compat/linux/dev       devfs           rw,late                 0       0
fdescfs         /compat/linux/dev/fd    fdescfs         rw,late,linrdlnk        0       0
tmpfs           /compat/linux/dev/shm   tmpfs           rw,late,mode=1777       0       0
/home           /compat/linux/home      nullfs          rw,late                 0       0
/tmp            /compat/linux/tmp       nullfs          rw,late                 0       0

$ kldstat | grep linux
Code:
3    7 0xffffffff83a32000     d770 linux_common.ko
 4    3 0xffffffff83a40000    b2868 linux.ko
14    1 0xffffffff84226000    35cb0 linux64.ko

uname -a
Code:
FreeBSD freebsd 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64

Thanks
 

bsdavguser

New Member


Messages: 1

Hi, FreeBSD community.

This is my first time posting here and I am not sure if this is the right place to troubleshoot my issue - apologize if not.

Last night I was trying to install Chrome using the mrclksr script which is built based on the instructions provided in this post.

The script installation was smooth and straightforward. However, when trying to run Chrome, Brave, Vivaldi, I am getting the output shown below:

Code:
freebsd@freebsd13:/usr/home/freebsd $ /usr/local/bin/linux-chrome
No matching processes belonging to you were found
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without
capabilities support.
[2448:101949:0806/114322.551647:ERROR:file_path_watcher_linux.cc(326)] inotify_init() failed: Function not implemented (38)
Gtk-Message: 11:43:22.939: Failed to load module "colorreload-gtk-module"
Gtk-Message: 11:43:22.940: Failed to load module "window-decorations-gtk-module"
[2448:101953:0806/114322.950387:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:2448:0806/114322.950508:ERROR:proxy_config_service_linux.cc(609)] inotify_init failed: Function not implemented (38)
[2448:101949:0806/114322.953071:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported b
y protocol (97)
[2448:101949:0806/114322.954907:ERROR:udev_watcher.cc(52)] Failed to initialize a udev monitor.
[0806/114322.956338:ERROR:ptracer.cc(476)] Unexpected registers size 0 != 216, 68
[0806/114322.956573:ERROR:proc_task_reader.cc(45)] format error
[2448:2448:0806/114322.983646:ERROR:proxy_config_service_linux.cc(609)] inotify_init failed: Function not implemented (38)
[2448:101962:0806/114322.984311:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101962:0806/114322.985467:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2454:101965:0806/114322.995849:ERROR:file_path_watcher_linux.cc(326)] inotify_init() failed: Function not implemented (38)
[2454:101967:0806/114322.995997:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported b
y protocol (97)
[2448:101962:0806/114323.011820:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101962:0806/114323.012174:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2454:101967:0806/114323.112257:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported b
y protocol (97)
[2448:101976:0806/114323.131896:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.132474:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.132873:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.133120:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.133404:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
Illegal instruction (core dumped)
freebsd@freebsd13:/usr/home/freebsd $

The browser window appears for a few seconds without any content and closes.

I installed Linux binary compatibility based on the instructions provided here.

Would highly appreciate any help in this matter.

Stay safe.
 
OP
P

patovm04

Member

Reaction score: 61
Messages: 63

Hi, FreeBSD community.

This is my first time posting here and I am not sure if this is the right place to troubleshoot my issue - apologize if not.

Last night I was trying to install Chrome using the mrclksr script which is built based on the instructions provided in this post.

The script installation was smooth and straightforward. However, when trying to run Chrome, Brave, Vivaldi, I am getting the output shown below:

Code:
freebsd@freebsd13:/usr/home/freebsd $ /usr/local/bin/linux-chrome
No matching processes belonging to you were found
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without
capabilities support.
[2448:101949:0806/114322.551647:ERROR:file_path_watcher_linux.cc(326)] inotify_init() failed: Function not implemented (38)
Gtk-Message: 11:43:22.939: Failed to load module "colorreload-gtk-module"
Gtk-Message: 11:43:22.940: Failed to load module "window-decorations-gtk-module"
[2448:101953:0806/114322.950387:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:2448:0806/114322.950508:ERROR:proxy_config_service_linux.cc(609)] inotify_init failed: Function not implemented (38)
[2448:101949:0806/114322.953071:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported b
y protocol (97)
[2448:101949:0806/114322.954907:ERROR:udev_watcher.cc(52)] Failed to initialize a udev monitor.
[0806/114322.956338:ERROR:ptracer.cc(476)] Unexpected registers size 0 != 216, 68
[0806/114322.956573:ERROR:proc_task_reader.cc(45)] format error
[2448:2448:0806/114322.983646:ERROR:proxy_config_service_linux.cc(609)] inotify_init failed: Function not implemented (38)
[2448:101962:0806/114322.984311:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101962:0806/114322.985467:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2454:101965:0806/114322.995849:ERROR:file_path_watcher_linux.cc(326)] inotify_init() failed: Function not implemented (38)
[2454:101967:0806/114322.995997:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported b
y protocol (97)
[2448:101962:0806/114323.011820:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101962:0806/114323.012174:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2454:101967:0806/114323.112257:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported b
y protocol (97)
[2448:101976:0806/114323.131896:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.132474:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.132873:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.133120:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
[2448:101976:0806/114323.133404:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: t
he remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the net
work connection was broken.
Illegal instruction (core dumped)
freebsd@freebsd13:/usr/home/freebsd $

The browser window appears for a few seconds without any content and closes.

I installed Linux binary compatibility based on the instructions provided here.

Would highly appreciate any help in this matter.

Stay safe.
I don't think you did anything wrong. There seems to be an issue with Chromium v92+ and certain systemd libs. Thus it is not related to FreeBSD or Linuxulator as far as I understand. So I'm staying at v91 at the moment, as I don't know how to fix it
 
Top