Skip to content

Commit

Permalink
Switch to dbus-x11
Browse files Browse the repository at this point in the history
  • Loading branch information
sileshn committed Jul 6, 2022
1 parent 6367f45 commit ddd3c64
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rootfs: base.tar

base.tar:
@echo -e '\e[1;31mExporting base.tar using docker...\e[m'
docker run --net=host --name archwsl archlinux:base-devel /bin/bash -c "curl -s 'https://archlinux.org/mirrorlist/?country=SG&country=US&country=DE&protocol=https&use_mirror_status=on' | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist; pacman --noconfirm --needed -Sy pacman-contrib; cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup; rankmirrors -n 5 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist; rm /etc/pacman.d/mirrorlist.backup; pacman-key --init; pacman-key --populate; pacman-key -r A2861ABFD897DD37; pacman-key --lsign-key A2861ABFD897DD37; sed -ibak -e 's/#Color/Color/g' -e 's/CheckSpace/#CheckSpace/g' /etc/pacman.conf; sed -ibak -e 's/IgnorePkg/#IgnorePkg/g' /etc/pacman.conf; echo '[wslutilities]' | sudo tee -a /etc/pacman.conf >/dev/null 2>&1; echo 'Server = https://pkg.wslutiliti.es/arch/' | sudo tee -a /etc/pacman.conf >/dev/null 2>&1; pacman --noconfirm -Syyu; pacman --noconfirm --needed -Sy aria2 aspell ccache dbus dconf dos2unix figlet git grep hspell hunspell inetutils iputils iproute2 keychain libvoikko linux-tools lolcat nano ntp nuspell openssh procps socat sudo usbutils vi vim wget wslu xdg-utils; mkdir -p /etc/pacman.d/hooks; echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel; yes | LC_ALL=en_US.UTF-8 pacman -Scc"
docker run --net=host --name archwsl archlinux:base-devel /bin/bash -c "curl -s 'https://archlinux.org/mirrorlist/?country=SG&country=US&country=DE&protocol=https&use_mirror_status=on' | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist; pacman --noconfirm --needed -Sy pacman-contrib; cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup; rankmirrors -n 5 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist; rm /etc/pacman.d/mirrorlist.backup; pacman-key --init; pacman-key --populate; pacman-key -r A2861ABFD897DD37; pacman-key --lsign-key A2861ABFD897DD37; sed -ibak -e 's/#Color/Color/g' -e 's/CheckSpace/#CheckSpace/g' /etc/pacman.conf; sed -ibak -e 's/IgnorePkg/#IgnorePkg/g' /etc/pacman.conf; echo '[wslutilities]' | tee -a /etc/pacman.conf >/dev/null 2>&1; echo 'Server = https://pkg.wslutiliti.es/arch/' | tee -a /etc/pacman.conf >/dev/null 2>&1; pacman --noconfirm -Syyu; pacman --noconfirm -Rdd dbus; pacman --noconfirm --needed -Sy aria2 aspell autoconf-archive ccache dbus dconf docbook-xsl dos2unix doxygen figlet git grep hspell hunspell inetutils iputils iproute2 keychain libvoikko linux-tools lolcat nano ntp nuspell openssh procps socat sudo usbutils vi vim wget wslu xdg-utils xmlto yelp-tools; mkdir -p /etc/pacman.d/hooks; echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel; yes | LC_ALL=en_US.UTF-8 pacman -Scc"
docker export --output=base.tar archwsl
docker rm -f archwsl

Expand Down
17 changes: 16 additions & 1 deletion bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,26 @@ echo -e ${grn}"Initializing and populating keyring..."${txtrst}
pacman-key --init >/dev/null 2>&1
pacman-key --populate >/dev/null 2>&1
setcap cap_net_raw+p /usr/sbin/ping

echo -e ${grn}"Compiling & switching to dbus-x11. Please be patient.."${txtrst}
systemd-machine-id-setup
rm /var/lib/dbus/machine-id
dbus-uuidgen --ensure=/etc/machine-id
dbus-uuidgen --ensure
pacman -Rdd --noconfirm dbus >/dev/null 2>&1
useradd -m -g users -G wheel builduser >/dev/null 2>&1
passwd -d builduser >/dev/null 2>&1
cd /home && wget -q https://aur.archlinux.org/cgit/aur.git/snapshot/dbus-x11.tar.gz
tar xf dbus-x11.tar.gz >/dev/null 2>&1
sudo chown -R builduser dbus-x11 && cd dbus-x11
sudo -u builduser bash -c 'makepkg -si --noconfirm && libtool --finish /usr/lib' >/dev/null 2>&1
cd .. && rm -rf dbus-x11 && rm dbus-x11.tar.gz
userdel -r builduser >/dev/null 2>&1
sed -i '/PS1/d' /etc/skel/.bashrc
echo "PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '" | tee -a /etc/skel/.bashrc >/dev/null 2>&1
echo 'export BROWSER="wslview"' | tee -a /etc/skel/.bashrc >/dev/null 2>&1

echo -e ${grn}"Do you want to create a new user?"${txtrst}
echo -e ${grn}"\nDo you want to create a new user?"${txtrst}
select yn in "Yes" "No"; do
case $yn in
Yes)
Expand Down

0 comments on commit ddd3c64

Please sign in to comment.