bitflippin.com
Steven's personal website and bit flipping laboratory
2024-07-21

Google Chrome on Arch Linux

After installing Arch Linux, I got google-chrome from the AUR running by way of installing sway, git, and yay. I configured these packages only minimally for getting started purposes.

Installing sway

Chrome needs a graphical environment to run in, such as a wayland compositor like sway. Install sway and choose gnu-free-fonts when the installation process asks about a font. Other choices probably work fine. Also install alacritty which is a terminal for sway. Copy the default sway configuration file to the user home directory. Edit the configuration file to set alacritty as the default terminal. Launch sway. Open a terminal by pressing the Win+Enter keys together. Continue to the remaining steps in the alacritty terminal.

# Install sway and alacritty
sudo pacman -S sway alacritty

# Use the default sway configuration file
mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway

# Change "set $term foot" to "set $term alacritty"
vim ~/.config/sway/config

# Launch sway
sway

Installing git

Chrome is not available through pacman, only through the AUR. A straightforward way to use AUR is with the yay package. The most straightforward way to install yay is cloning it using git.

Install git. Optionally set the name for default branches. This avoids warning messages when cloning repositories. The common choice used to be master but recently seems to have shifted to main. Optionally set a name and email which will attribute authorship to future commits.

sudo pacman -S git

git config --global init.defaultBranch main
git config --global user.name "My Name"
git config --global user.email "myemail@bitflippin.com"

Installing yay

Clone the yay repository. Build and install yay. Once installed the repository is no longer necessary. Interestingly yay seems to install itelf as a yay package!

git clone https://aur.archlinux.org/yay.git
cd yay
sudo pacman -S base-devel
makepkg -si
cd ..
rm -rf yay

Google Chrome

All that remains is to install Google Chrome and run it. On wayland the additional flag below may be necessary. It is for me.

yay -S google-chrome
google-chrome-stable --ozone-platform=wayland

Small usability gaps like having sway start on login, having google-chrome-stable launch without a terminal, and further customizations of sway still remain; however these steps are sufficient to get started.

References