User:PeterSR

From ArchWiki
Revision as of 10:00, 30 January 2015 by PeterSR (talk | contribs) (Added Steam)
Jump to navigation Jump to search

Real name: Peter Severin Rasmussen


GitHub: PeterSR

BitBucket: PeterSR


Arch level: Just started.


Personal setup

Here my personal setup will be explained.


Storage

Using a GPT partition table, the partitions are as follows: [1]

Every storage device reference below will be corresponding to this layout.

Note: Use GParted live-USB if in doubt. [2]


Installation

Set the keyboard to the Danish Dvorak keyboard layout:

# loadkeys no-dvorak
Note: There is currently no Danish Dvorak built in, so we use the Norwegian as it is almost identical

Don't bother setting up locale on the live system.

Also use a wired connection with DHCP, and the internet will most likely just work. Wireless connection can always be configured when the system is installed.


Activate swap partition

# mkswap /dev/sda3
# swapon /dev/sda3


Mount partitions

# mount /dev/sda1 /mnt

# mkdir -p /mnt/boot
# mount /dev/sda2 /mnt/boot

# mkdir -p /mnt/boot/efi
# mount /dev/sda5 /mnt/boot/efi

# mkdir -p /mnt/home
# mount /dev/sda4 /mnt/home


Edit /etc/pacman.conf

# vi /etc/pacman.conf

Find the line with #Color and uncomment it


Edit the mirrorlist

# vi /etc/pacman.d/mirrorlist

Find first occurrence of Denmark and move it to the top.


Install the base system

# pacstrap -i /mnt base base-devel


Generate fstab file

# genfstab -U -p /mnt >> /mnt/etc/fstab
# vi /mnt/etc/fstab
Note: Remember to verify the correctness of the generated file using the second line in the code above

Configuration

Chroot into the system

# arch-chroot /mnt /bin/bash


Configure wired connection using DHCP:

# ip link

# systemctl enable dhcpcd@interface_name.service

Here, read the output of ip link and find the ethernet interface name, properly enp3s0 or something similar.


And then install preliminary packages

# pacman -S polkit
Note: Without polkit you might encounter "Failed to execute operation: The name org.freedesktop.PolicyKit1 was not provided by any .service files"

Locale

Edit /etc/locale.gen

# vi /etc/locale.gen

and uncomment da_DK.UTF-8 UTF-8 as well as en_US.UTF-8 UTF-8.

Note: The recommended way is to search for DK using vi's search /. Remove the #. Search for US. Remove the #.


Run

# locale-gen

and edit the file /etc/locale.conf (which does not exist)

# vi /etc/locale.conf

and write

LANG=da_DK.UTF-8
LC_MESSAGES=en_US.UTF-8

This will use the Danish locale in terms of dates, currency etc., but keep the system language in English.


Setup Danish Dvorak permanently for VC (virtual console):

# localectl --no-convert set-keymap no-dvorak 
Note: This keyboard layout should match the one in the installation. This only affects the virtual console which is used when no GUI is present. To change keyboard layout etc. in GUI, edit X configuration (see later)
Note: To do it manually, edit the file /etc/vconsole.conf:
# vi /etc/vconsole.conf

and write KEYMAP=no-dvorak. If another font is desired, use FONT= here as well.


Set timezone and hardware clock:

# pacman -S ntp
# timedatectl set-timezone Europe/Copenhagen
# ntpd -qg
# hwclock --systohc
# systemctl enable ntpd.service

Computer

Add hostname pc to /etc/hostname:

# echo pc > /etc/hostname

and edit /etc/hosts accordingly:

# vi /etc/hosts

#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost pc
::1   localhost.localdomain localhost pc


Remove PC case speaker beep:

# echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf

User

Install zsh and change the default shell of the root:

# pacman -S zsh
# chsh
Changing shell for root.
New shell [/bin/bash]: /bin/zsh


Create new user called user:

# useradd -m -g users -G wheel,storage,power -s /bin/zsh user
# passwd user


Allow the wheel group to perform sudo by editing /etc/sudoers:

# visudo

Go to the line # %wheel ALL=(ALL) ALL and uncomment it.


Lock the root user:

# passwd -l root
Warning: Do not lock the root user before you are sure that another user can use sudo. Also make sure that you have set the password of that other user.
Note: Restore root user with sudo passwd -u root.

Boot loader

The currently used boot loader is GRUB with UEFI. First install the packages:

# pacman -S grub efibootmgr

Install GRUB to the ESP partition:

# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck

Create the configuration file

# grub-mkconfig -o /boot/grub/grub.cfg


Further reading: GRUB#Installation_2, Unified_Extensible_Firmware_Interface#EFI_System_Partition


The moment of truth

Exit the chroot

# exit

and reboot

# reboot

Now, in BIOS edit the default boot device to grub_uefi and cross your fingers.

Post-installation

Here we set up the system as we actually want it to be. First login as the newly created user:

pc login: user
Password: 

If you are presented with a Z Shell screen, simply press q. You should now see a command prompt.


First and foremost, update the system

# sudo pacman -Syu


Next, install preliminary packages

# sudo pacman -S vim git openssh upower


Now fetch the dotfiles using HTTPS (we will change this to SSH later):

# git clone https://PeterSR@bitbucket.org/PeterSR/dotfiles.git
# cd dotfiles
# git submodule init
# git submodule update --recursive
# ./install.sh symlink
Note: Using HTTPS requires authentication via password if the repo is private.


Audio

Install ALSA

# sudo pacman -S alsa-utils

Go inside the alsamixer and max the different volumes.

# alsamixer


GUI

Install Xorg packages

# sudo pacman -S xorg-xinit xorg-server xorg-server-utils numlockx

Setup keyboard

# sudo localectl --no-convert set-x11-keymap da "" dvorak
Note: Here we use the same keyboard layout as in the virtual console. And Danish Dvorak is actually a supported Xorg keyboard layout.

Further reading: Xorg

Note: Xorg might be replaced by Wayland in the future.


Install Nvidia packages

# sudo pacman -S nvidia

Further reading: NVIDIA

Note: If using another graphics card, find the appropriate package. Xorg requires libgl which can also come from mesa.

OR (in case of Intel graphics)

Install Intel packages

# sudo pacman -S xf86-video-intel mesa-libgl


Install i3 packages

# sudo pacman -S i3

Further reading: i3


Copy the .xinitrc and edit it

# cp /etc/skel/.xinitrc ~

# vim .xinitrc

Add the lines

#setxkbmap dk dvorak

numlockx &

exec i3

to the end of the file. Use startx to access i3.

Note: The .xinitrc might be included in the dotfiles in the future.


Install GDM:

# sudo pacman -S gdm
# sudo systemctl enable gdm.service

OR

Install LightDM:

# sudo pacman -S lightdm lightdm-gtk3-greeter
# sudo systemctl enable lightdm.service
Note: Currently the keyboard layout is incorrect on the login screen for some odd reason.

Fonts

# sudo pacman -S ttf-dejavu ttf-ubuntu-font-family

Fix fonts in Firefox

# sudo ln -s /etc/fonts/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/

Source: [3]

Applications

# sudo pacman -S firefox terminator nautilus nautilus-open-terminal librsvg gvim feh scrot imagemagick dmenu evince hexchat file-roller filezilla
Note: Installing the gvim package will conflict with vim. But this is okay as the gvim package will also install vim.
Steam

Steam is currently only 32-bit, so enable Multilib and update the system:

# vim /etc/pacman.conf
(Uncomment multilib section)
 
# sudo pacman -Syu

Finally, install

# sudo pacman -S steam

Programming

# sudo pacman -S python3 jdk8-openjdk nodejs


AUR

Install the AUR helper Yaourt using aur.sh:

# bash <(curl aur.sh) -si package-query yaourt


Spotify
# yaourt spotify
Dropbox
# yaourt dropbox dropbox-cli