# How to : how to run google chrome on Devuan OS (incomplete,it does not work).



## ziomario (Feb 19, 2022)

Hello.

I've just mixed two tutorials together (the tutorial that allows to run google chrome inside the linux jail,but that uses ubuntu and the tutorial that uses devuan instead of ubuntu,but that it has not been written for running google chrome) because I was curious to see what I would have got. I would like to understand if without systemd I have a better linux compatibility and a cleaner configuration. So,I've copied some commands from this tutorial :

#devuan








						Setting up a (Debian) Linux jail on FreeBSD
					

Hi gang!  Prerequisites: I am assuming that you know how to install software on FreeBSD and also have some basic understanding about FreeBSD jails.  Editorial  I'm going to be very honest here: I started disliking Linux for a while, and I've worked with it for a long time. For various reasons...




					forums.freebsd.org
				




and some others from this tutorial :

#ubuntu








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

[Update] For new instructions targeting FreeBSD 13.0 and newer, please see: https://forums.freebsd.org/threads/linuxulator-how-to-install-brave-linux-app-on-freebsd-13-0.78879/   Important notes:  1) Tested upon FreeBSD 12.2-RELEASE. Used Ubuntu-based linux compat instead of default CentOS one...




					forums.freebsd.org
				




and this is what I did :


```
#configure FreeBSD :

# Enable linux compatibility layer:

sysrc linux_enable=YES


# Start linux service:

service linux start


# Install needed packages:

pkg install linux-steam-utils debootstrap pulseaudio


# Copy the useful files to a temporary folder:

cp -R /usr/local/steam-utils /usr/local/steam-utils-bak


# Uninstall linux-steam-utils and all its dependencies:

pkg delete linux-steam-utils && pkg autoremove


# Move back /usr/local/steam-utils-bak to the correct location:

mv /usr/local/steam-utils-bak/ /usr/local/steam-utils



#configure #Devuan :


mkdir /compat/devuan

mkdir /compat/psi


debootstrap --foreign --arch=amd64 stable /compat/devuan http://deb.devuan.org/merged/


mount -t linprocfs none /compat/devuan/proc

mount -t linsysfs none /compat/devuan/sys

mount -t tmpfs none /compat/devuan/tmp


# Make sure your /etc/fstab looks like this:


#devuan


linprocfs       /compat/devuan/proc      linprocfs       rw,late                 0       0

linsysfs        /compat/devuan/sys       linsysfs        rw,late                 0       0

tmpfs           /compat/devuan/tmp       tmpfs           rw,late,mode=1777       0       0


# Mount needed filesystems:


chroot /compat/devuan /bin/bash

mount -F /etc/fstab.devuan `pwd`/sys

mount -F /etc/fstab.devuan `pwd`/proc

mount -F /etc/fstab.devuan `pwd`/tmp


# Install devuan into /compat/devuan:


dpkg --force-depends -i /var/cache/apt/archives/*.deb

dpkg --configure --pending


Make sure that only base-files and sysvinit-core are partially configured:


dpkg -l | grep -v ^ii


Their status should be iF. If there is a problem try to forcefully reinstall the package:


dpkg --force-all -i /path/to/package

dpkg --force-all -i /var/cache/apt/archives/sysvinit-core*


# Fix APT package manager:

printf "APT::Cache-Start 251658240;" > /etc/apt/apt.conf.d/00aptitude


# Enable more repositories:

printf "deb http://deb.devuan.org/merged chimaera main" > /etc/apt/sources.list
printf "deb http://deb.devuan.org/merged chimaera-updates  main" > /etc/apt/sources.list
printf "deb http://deb.devuan.org/merged chimaera-security main" > /etc/apt/sources.list


# Add Chrome repository:

printf "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list


# Get Chrome signing key:

apt install wget

wget https://dl.google.com/linux/linux_signing_key.pub


# Create custom Chrome launcher script and make it executable:

touch /bin/chrome

chmod +x /bin/chrome


# Edit it so it has this content:


#!/compat/devuan/bin/bash


export CHROME_PATH="/compat/devuan/chrome/chrome"

export CHROME_WRAPPER="`readlink -f "$0"`"

export LD_LIBRARY_PATH=/usr/local/steam-utils/lib64/fakeudev

export LD_PRELOAD=/usr/local/steam-utils/lib64/webfix/webfix.so

export LIBGL_DRI3_DISABLE=1


exec -a "$0" "$CHROME_PATH" --no-sandbox --no-zygote --test-type --v=0 "$@"


# Set correct timezone inside your chroot:

printf "%b\n" "0.0 0 0.0\n0\nUTC" > /etc/adjtime


# Choose your timezone:

dpkg-reconfigure tzdata


# Install some required programs :

apt update ; apt install -y gnupg pulseaudio fonts-symbola


# Install Google Chrome:

apt-key add linux_signing_key.pub && apt update && apt install -y google-chrome-stable


# Exit chroot

exit


# Exit su

exit


# Now create a .desktop file to launch Chrome as any other app:

touch ~/.local/share/applications/google-chrome.desktop


# Make it contain something like this:


[Desktop Entry]

Type=Application

Version=1.0

Encoding=UTF-8

Name=Google Chrome on Devuan

Comment=Google web browser running on Devuan

Icon=google-chrome

Exec=/compat/devuan/bin/chrome

Categories=Application;Network;WebBrowser;

MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;

StartupNotify=true


nano /etc/jail.conf:


devuan {

        host.hostname = "devuan.jail";

        interface = tap0;

        ip4.addr = 192.168.1.100;

        path = /compat/devuan;

        exec.start = "/etc/init.d/rc 3";

        exec.stop = "/etc/init.d/rc 0";

        persist;

        mount.devfs;

        mount.fstab = /etc/fstab.devuan;


        allow.mount;

        allow.mount.devfs;

}


jail -c devuan

devuan: created
Using makefile-style concurrent boot in runlevel 3.
Starting enhanced syslogd: rsyslogdmknod: /dev/xconsole: Operation not supported
chown: cannot access '/dev/xconsole': No such file or directory
rsyslogd: cannot create '/dev/log': Operation not supported [v8.2102.0 try https://www.rsyslog.com/e
/2176 ]
rsyslogd: imuxsock does not run because we could not aquire any socket  [v8.2102.0]
rsyslogd: activation of module imuxsock failed [v8.2102.0]
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): No such file or directory.
rsyslogd: activation of module imklog failed [v8.2102.0 try https://www.rsyslog.com/e/2145 ]
.
dmesg: read kernel buffer failed: Operation not permitted
Starting periodic command scheduler: cron.
Can't start system message bus - /proc is not mounted ... failed!
Starting session management daemon: elogind.


# /compat/devuan/bin/chrome


[21224:102845:0218/234112.132650:ERROR:file_path_watcher_linux.cc(321)] inotify_init() failed: Function not implemented (38)

(chrome:21224): Gtk-WARNING **: 23:41:13.905: Unknown key gtk-applications-prefer-dark-theme in /root/.config/gtk-3.0/settings.ini

Gtk-Message: 23:41:14.184: Failed to load module "colorreload-gtk-module"

Gtk-Message: 23:41:14.185: Failed to load module "window-decorations-gtk-module"

[21224:102854:0218/234114.947955:ERROR:bus.cc(397)] 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.

[21224:102854:0218/234114.963025:ERROR:bus.cc(397)] 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.

[21224:102846:0218/234115.770664:ERROR:address_tracker_linux.cc(196)] Could not create NETLINK socket: Address family not supported by protocol (97)

[21224:102853:0218/234115.795018:ERROR:bus.cc(397)] 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.

[21224:102853:0218/234115.795076:ERROR:bus.cc(397)] 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.

[21224:102846:0218/234116.707297:ERROR:udev_watcher.cc(52)] Failed to initialize a udev monitor.

[21233:102862:0218/234117.094025:ERROR:address_tracker_linux.cc(196)] Could not create NETLINK socket: Address family not supported by protocol (97)

[21233:102864:0218/234117.094035:ERROR:file_path_watcher_linux.cc(321)] inotify_init() failed: Function not implemented (38)

[21224:21224:0218/234117.188257:ERROR:process_singleton_posix.cc(1100)] Failed to bind() /tmp/.com.google.Chrome.Pbohb3/SingletonSocket: No such file or directory (2)

[21224:21224:0218/234117.216008:ERROR:chrome_browser_main.cc(1305)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.
```

unfortunately chrome does start but I feel to  be close.


----------

