Skip to content

Instantly share code, notes, and snippets.

@rbreaves
Last active May 2, 2024 06:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbreaves/293d72e162e9d5e8c5e40d5263dc6d28 to your computer and use it in GitHub Desktop.
Save rbreaves/293d72e162e9d5e8c5e40d5263dc6d28 to your computer and use it in GitHub Desktop.
Firefox AUR global menu fix for any distro
#!/bin/bash
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh
sudo apt install podman
distrobox-create --name arch --image docker.io/library/archlinux:latest
distrobox-enter arch
# Pre-compiled
# update
sudo pacman -Syy
sudo pacman -S patch libunistring pkgconf make gnutls appmenu-gtk-module xapp git neofetch ttf-dejavu ttf-liberation
# For proper youtube codec support (already in the above command)
# sudo pacman -S patch libunistring pkgconf make gnutls
# clone yay repo
git clone https://aur.archlinux.org/yay-git.git
sudo pacman -S --needed base-devel
cd ./yay-git
makepkg -si
# Note many keyserver urls suck, this one works
gpg --keyserver keyserver.ubuntu.com --recv-keys 85F86E317555BECC1C2184BF2C45BA09ABC5D7DA
yay -Syu firefox-appmenu-bin ttf-ms-fonts
distrobox-export --app firefox --export-label " "
# For proper youtube codec support
yay -Syu ffmpeg-compat-58
@benyaminl
Copy link

Thanks man! This sealing the xfce-global-appmenu fully! Distrobox rocks!

@benyaminl
Copy link

benyaminl commented Apr 29, 2023

@rbreaves hello, seems the notification doesn't follow dbus if we doesn't install libnotify. Could you update the code, so the notify doesn't use firefox build in pop up, rather using libnotify as stated in https://wiki.archlinux.org/title/Desktop_notifications ?

Related question 89luca89/distrobox#727

$ yay -Syu libnotify
$ exit
$ podman restart arch

EDIT: Also, if we need IBus for inputing emoji, we need to install ibus package, and set it in the container/distrobox. https://wiki.archlinux.org/title/IBus

$ yay -Syu ibus
$ cat /etc/environment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

$ exit
$ podman restart arch

@Cm4nXD
Copy link

Cm4nXD commented May 29, 2023

I'm trying to use this script to setup Firefox on Ubuntu, but the arch instance of firefox does not interact with gnome properly? I cannot pin the app to the dock and such. according to distrobox github its because of a hostname mismatch on X11? could you update your guide to fix that?
89luca89/distrobox#128

@Cm4nXD
Copy link

Cm4nXD commented Jun 3, 2023

Ok I figured it out, my issue is that the latest version of arch doesn't ship with inetutils, which prevents the solution proposed by distrobox dev from working. I'm not sure if this is the best way to do it, but using this as the command to create the container fixed my issues.

distrobox-create --name arch --image docker.io/library/archlinux:latest --init-hooks 'sudo pacman -S inetutils --noconfirm && hostname ryzen-tower'

of course replace ryzen-tower with whatever your computer's hostname is ( the output of uname -n from host system)

I tried replaceing hostname with a variable but distrobox just spat errors at me. (somthing like this:)

distrobox-create --name arch --image docker.io/library/archlinux:latest --init-hooks 'sudo pacman -S inetutils --noconfirm && hostname $(uname -n)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment