coldReactive

Arch Linux XFCE Installation Guide

Jul 28th, 2024 (edited)
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.47 KB | None | 0 0
  1. ######################################################################################
  2.  
  3. COLDREACTIVE's
  4.  
  5. `8.`8888. ,8' 8 8888888888 ,o888888o. 8 8888888888
  6. `8.`8888. ,8' 8 8888 8888 `88. 8 8888
  7. `8.`8888. ,8' 8 8888 ,8 8888 `8. 8 8888
  8. `8.`8888.,8' 8 8888 88 8888 8 8888
  9. `8.`88888' 8 888888888888 88 8888 8 888888888888
  10. .88.`8888. 8 8888 88 8888 8 8888
  11. .8'`8.`8888. 8 8888 88 8888 8 8888
  12. .8' `8.`8888. 8 8888 `8 8888 .8' 8 8888
  13. .8' `8.`8888. 8 8888 8888 ,88' 8 8888
  14. .8' `8.`8888. 8 8888 `8888888P' 8 888888888888
  15.  
  16. INSTALL GUIDE
  17.  
  18. For Arch Linux
  19. ######################################################################################
  20.  
  21. Make sure Internet is working with
  22.  
  23. ping archlinux.org
  24.  
  25. CTRL+C to stop testing
  26.  
  27. ——————————————————————————————————————————————————————————————————————————————————————
  28.  
  29. If you currently have an installation of Windows or other distribution, and are following this guide, this guide will be teaching you how to remove those installations and replace it with a fresh installation of Arch Linux using the XFCE Desktop Environment. Before doing this, please understand that this is DESTRUCTIVE, and will permanently destroy all partitions/data that is currently on the disk. With that warning out of the way, use
  30.  
  31. lsblk
  32.  
  33. to find all of the partitions/drive currently detected by the system. After finding out which drive/partition you want to use, you will then proceed to use
  34.  
  35. cfdisk /dev/[drive]
  36.  
  37. to start partitioning the drive (where [drive] is the placeholder for the actual drive name from the lsblk command). Delete all of the current partitions, then, make at least two partitions: 1G and one with the remaining free space. If you do not want to use a swapfile or pagefile, make a third partition for swap space, the amount of space reserved for swap should be dependent on your physical RAM, and how much you need over and above your physical RAM that you currently have installed. I, myself, would recommend 16 GB at minimum if you have 32 GB of RAM as an example. You can allocate more before finishing partitioning (if you aren't using a file) if you need to. After creating your new partitions, write the partition tables and exit cfdisk. You can confirm the blocks are the right size using the lsblk command from before. Once the block/partition sizes are correct/confirmed, you should format them using
  38.  
  39. mkfs.ext4 /dev/[Largest Partition]
  40. mkfs.vfat -F32 /dev/[1G Partition]
  41.  
  42. and if you decided to make a swap partition, you would use
  43.  
  44. mkswap /dev/[Swap Partition]
  45.  
  46. afterward. Starting from here on, we will begin tinkering with the contents within these partitions, so we will need to mount them starting with the largest partition using
  47.  
  48. mount /dev/[Largest Partition] /mnt
  49.  
  50. once that is done, you will need to make the boot directory and mount it to the 1 Gigabyte Partition using
  51.  
  52. mount --mkdir /dev/[1G Partition] /mnt/boot
  53.  
  54. if you elected to make a swapfile / pagefile instead, this is where you would execute the following,
  55.  
  56. mkswap -U clear --size ??G --file /mnt/swapfile
  57.  
  58. where ?? is the amount of Gigabytes you would allocate to the swapfile / pagefile. Once you have finished these, you will need to turn on swap using one of the following commands based on whether or not you chose to use a partition...
  59.  
  60. swapon /dev/[Swap Partition]
  61.  
  62. ...or using a swapfile / pagefile...
  63.  
  64. swapon /mnt/swapfile
  65.  
  66. once swap has been turned on, you will then need to install the base packages for the installation to function (change amd-ucode to intel-ucode if you use intel),
  67.  
  68. pacstrap -K /mnt base linux linux-headers linux-firmware sof-firmware base-devel efibootmgr nano networkmanager grub os-prober bash-completion dosfstools amd-ucode
  69.  
  70. there will be a lot of output on the screen once it is finished, so if you feel the need to, you can clear the screen with CTRL+L after the command has finished. Then, you will have to generate the fstab using
  71.  
  72. genfstab -U /mnt > /mnt/etc/fstab
  73.  
  74. once it is generated, it should have entries for everything created up to this point, including swap and the partitions created earlier using cfdisk/etc. But if you desire to confirm if all of that is contained within, use
  75.  
  76. nano /mnt/etc/fstab
  77.  
  78. From here on, we will be entering the installation itself, this requires the use of the command
  79.  
  80. arch-chroot /mnt
  81.  
  82. now we will be setting up the time-zone and localization. You will need to check if your timezone is available using
  83.  
  84. dir /usr/share/zoneinfo/
  85.  
  86. and then, once you have found it (by further using the dir command in an appropriate subfolder like America), you can set it using
  87.  
  88. ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
  89.  
  90. as an example. America/Chicago is the timezone I choose, hence its inclusion. The reason why this method has to be used rather than the command timedatectl, is because that command cannot be used during chroot. After setting your time, you may find it useful to sync the system clock to the hardware clock by using
  91.  
  92. hwclock --systohc
  93.  
  94. Afterward, we will be choosing the locales. For the purpose of this guide, I will be choosing English (US) and Japanese. But you may need to adjust this for your own locales. First,
  95.  
  96. nano /etc/locale.gen
  97.  
  98. which will bring up a file on screen with a list of locales. Find (without quotation marks) "en_US.UTF-8 UTF-8" for English (US) and "ja_JP.UTF-8 UTF-8" for Japanese. Uncomment them by hitting the DEL (Delete) key with the cursor on the pound/hash symbols before them. Then, press CTRL and O at the same time then after, press Enter, to write the changes to the file; and then press CTRL and X at the same time to exit nano. Once you have done this, you will then need to execute
  99.  
  100. locale-gen
  101.  
  102. to generate the appropriate locale configurations. After it finishes,
  103.  
  104. nano /etc/locale.conf
  105.  
  106. and put "LANG=en_US.UTF-8" (without quotation marks) into the file. Like before, press CTRL and O at the same time then after, press Enter, to write the changes to the file; and then press CTRL and X at the same time to exit nano. Next, we will be choosing the hostname for our system. This is what your computer will identify as to the network and other devices. Use the command
  107.  
  108. nano /etc/hostname
  109.  
  110. and write your desired hostname in the file. it should be all one-word. Such as "localhost" or "SaekoMeinaShrine" (without quotation marks.) Make sure you DO NOT place a trailing space or extra line at the end or bottom of the file. Like before, press CTRL and O at the same time, then press Enter to write the changes to the file, and then press CTRL and X at the same time to close nano. We will now create the user account to be used for the system. But before we do that, it is recommended to set a root password using,
  111.  
  112. passwd
  113.  
  114. putting this command in will either show a blank line, or ask to enter a password. When you start typing, you will notice nothing seems to be inputting, but this is normal. All of your inputs are being read, and if you make a mistake, you can even hit backspace like normal. Hitting enter at any point will then continue, and it will ask you to confirm the password by typing it again. Once it is set, we will then add the user you will be using. This is an example user, so it will be using a name I choose,
  115.  
  116. useradd -m -G wheel -s /bin/bash ian
  117.  
  118. we will need to create a password for this user like we just did for root,
  119.  
  120. passwd ian
  121.  
  122. like before, you will need to type in the password, then hit the enter key and type it again, then enter to confirm. Now, we will need to give the user sudo access by first using the command
  123.  
  124. EDITOR=nano visudo
  125.  
  126. and finding "%wheel ALL=(ALL:ALL) ALL" (without quotation marks) in the file. Once found, make sure the text cursor is over the pound/hash symbol, and hit the DEL (delete) key to remove both the pound/hash symbol and the space that came after the pound/hash symbol. Once done, press CTRL and O at the same time, then press Enter to write the changes to the file, and then press CTRL and X at the same time to close the program. Now we will enable the network service,
  127.  
  128. systemctl enable NetworkManager
  129.  
  130. Afterward, we will be installing the boot manager for GRUB using
  131.  
  132. grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --recheck
  133.  
  134. After it finishes, the configuration file will have to be generated with
  135.  
  136. grub-mkconfig -o /boot/grub/grub.cfg
  137.  
  138. Now that we have successfully installed the base arch installation, we can finally exit the mounted installation with
  139.  
  140. exit
  141.  
  142. then unmount everything with
  143.  
  144. umount -a
  145.  
  146. and finally reboot the system with
  147.  
  148. reboot
  149.  
  150. After the system has rebooted, and everything seems stable, you will notice that you will be booting into the installed system rather than what we had before. On the prompt given, it will ask for a username, give it the username you created before. After giving the username, it will then ask for the password. Like before, when we created the password, the password prompt will not show anything being typed in, but it will still be reading all of your inputs as if you were typing it in. This is a standard security feature of the terminal. Once logged into the system after pressing enter once the correct username and password has been given, you will want to next install all of the packages needed for XFCE and the like. A lot of these packages come down to my preferences, but it's a pretty basic XFCE installation without some of the extra programs most distros give alongside XFCE. This will be a long command, so I hope your typing fingers are ready for this,
  151.  
  152. sudo pacman -S xfce4 xfce4-goodies seahorse blueman system-config-printer cups-pk-helper vlc gimp gscan2pdf discord firefox qt5ct qt6ct pipewire-alsa pipewire-pulse pipewire-jack transmission-gtk pavucontrol ntfs-3g lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings light-locker geany noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-liberation ttf-droid ttf-dejavu gnu-free-fonts ttf-junicode ttf-gentium otf-crimson adobe-source-sans-fonts ttf-opensans cantarell-fonts gsfonts otf-libertinus unzip zip unrar p7zip engrampa nss-mdns cups cups-pdf gst-plugins-good gst-plugins-bad gst-plugins-ugly ffmpeg imagemagick gvfs ffmpegthumbnailer webp-pixbuf-loader poppler-glib libappindicator-gtk3
  153.  
  154. note that, as soon as you press enter after this command, it will ask you for your password. This will become common when using a sudo command. Once everything above has been installed, you will then need to enable some services for booting alongside the system,
  155.  
  156. sudo systemctl enable lightdm
  157. sudo systemctl enable cups
  158. sudo systemctl enable avahi-daemon
  159.  
  160. lightdm is the display manager, which will greet you when you login, and is responsible for starting the whole graphical boot rather than the terminal. The cups service is the printer system. The avahi-daemon allows your desktop to talk with other systems and devices basically. Now that those have been enabled, we can move onto some janitorial work. Firstly, we need to make sure that this system can discover other devices on the network properly, like network printers. So, we will need to enable mdns,
  161.  
  162. sudo nano /etc/nsswitch.conf
  163.  
  164. On the hosts line, add "mdns_minimal" (without quotation marks) just before "[!UNAVAIL=return]" (without quotation marks.) Then, add mdns to the end of the line. Then, press CTRL and O at the same time, then press Enter to write the changes to the file, and then press CTRL and X at the same time to close nano. Now, we will need to enable LightDM's Greeter, or else LightDM will fail to start in the first place.
  165.  
  166. sudo nano /etc/lightdm/lightdm.conf
  167.  
  168. In this file, you will need to change "#greeter-session=" (without quotation marks) to be "greeter-session=lightdm-gtk-greeter" (without quotation marks.) Once more, press CTRL and O at the same time, then press Enter to write the changes to the file, and then press CTRL and X at the same time to close nano. Now, we will need to configure GTK and QT to sync each-other up,
  169.  
  170. nano ~/.bashrc
  171.  
  172. within that file, above "# If not running interactively, don't do anything" (without quotation marks) add "QT_QPA_PLATFORMTHEME=qt5ct:qt6ct" (without quotation marks), and make sure there is a line above and below it. So it looks like so...
  173.  
  174. #
  175. # ~/.bashrc
  176. #
  177.  
  178. QT_QPA_PLATFORMTHEME=qt5ct:qt6ct
  179.  
  180. # If not running interactively, don't do anything
  181.  
  182. afterward, press CTRL and O at the same time, then press Enter to write the changes to the file, and then press CTRL and X at the same time to close nano. Now we will need to enable 32-bit packages for certain programs like steam, and windows binaries and applications. So first,
  183.  
  184. sudo nano /etc/pacman.conf
  185.  
  186. and within that file, find the section...
  187.  
  188. #[multilib]
  189. #Include = /etc/pacman.d/mirrorlist
  190.  
  191. ...with the text cursor over the pound/hash symbols, press DEL (delete) to remove them so they are uncommented. BOTH lines must no longer have the pound/hash symbol for this to work. Once that is done, press CTRL and O at the same time, then press Enter to write the changes to the file, and then press CTRL and X at the same time to close nano. Now that the multilib repository is enabled, you will need to do an update to get that repository's information, do the command
  192.  
  193. sudo pacman -Syu
  194.  
  195. to perform a system update. There may be new package updates available too. Make sure they are updated before continuing. Once they are updated, if you have an NVIDIA GPU, use the following command
  196.  
  197. sudo pacman -S lib32-nvidia-utils lib32-opencl-nvidia opencl-nvidia nvidia-open-dkms nvidia-utils nvidia-settings steam mangohud protontricks
  198.  
  199. if you instead have an AMD GPU, use
  200.  
  201. sudo pacman -S vulkan-radeon lib32-vulkan-radeon lib32-mesa lib32-vulkan-icd-loader vulkan-tools llvm lib32-llvm lib32-llvm-libs llvm-libs steam mangohud protontricks
  202.  
  203. this will install the necessary 32-bit libraries and GPU drivers for your system, and also install Steam. MangoHud is an overlay program that works similar to RivaTuner Statistics Server, which is usually installed alongside MSI Afterburner on Windows systems. If you want to configure MangoHud, first, you should get the generic configuration file from the MangoHud GitHub using the following commands,
  204.  
  205. mkdir -p ~/.config/MangoHud/
  206. curl -L https://raw.githubusercontent.com/flightlessmango/MangoHud/master/data/MangoHud.conf --output MangoHud.conf --output-dir ~/.config/MangoHud/
  207.  
  208. the curl command basically downloads a file through the terminal. If you open the MangoHud.conf file in nano or otherwise, you can read all the commented sections to see what each setting/configuration does. Now that all of that is done, and the XFCE System is basically installed, we need one last part to get full use out of Arch and its community, the Arch User Repository. In order to enable the Arch User Repository, we need something called an AUR Helper. For the purposes of this guide, I will be using the yay AUR Helper. To get it installed and working, run the command
  209.  
  210. sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si
  211.  
  212. and allow it to finish. Once it is finished, you can then install some extra packages not in the standard arch repository, such as
  213.  
  214. yay -S mugshot geany-themes ttf-ms-fonts protonplus faugus-launcher
  215.  
  216. the mugshot package, is an old GUI front-end for managing user information for XFCE and certain other Desktop-handling systems, and allows changing your "face" picture seen in the whisker menu. Without mugshot, using the whisker menu may return an error when clicking on your face icon next to your username. ttf-ms-fonts are Microsoft fonts, like Impact and Arial. The protonplus package is a program that manages the Proton installations on the system. It's very useful for if you need to install multiple proton versions for specific applications or otherwise. The faugus-launcher package is a program similar to Lutris, but much simpler, and allows you to specify a wine/proton prefix when installing a windows program rather than after.
  217.  
  218. After everything above is completed, you can use the reboot command to reboot the system and finally enjoy your XFCE system.
  219.  
  220. ——————————————————————————————————————————————————————————————————————————————————————
  221.  
  222. If you need any extra information, it's highly recommend you peruse and bookmark the Arch Wiki at https://wiki.archlinux.org/title/Main_page as it is a great resource. The Arch Wiki can even be used as a reference for other Linux Distributions too. Most of this guide was written using the information compiled there.
Advertisement
Add Comment
Please, Sign In to add comment