Arch Linux Install Guide - lhl/linuxlaptops GitHub Wiki

About

This is a personal install and setup guide that I've maintained/kept mostly up to date since 2015. This doc is migrated from its original location on Dropbox Paper for stability and b/c Dropbox Paper seems to have dropped old revision history.

Other resources:

USB Boot Stick Installer

This is a manual proce


Initial Boot and Getting into New System


In New System (chroot)

  • paru
  • rate-mirrors-bin
  • rate-mirrors --save mirrorlist arch
  • Select a mirror

  • Update

    • pacman -Syu
    • pacman -Sy fish vim neovim
    • cd /usr/bin; ln -s nvim vi
  • Locale

    • vi /etc/locale.gen and uncomment en_US.UTF-8 UTF-8
    • locale-gen
    • echo LANG=en_US.UTF-8 > /etc/locale.conf
  • Time

    • ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
    • hwclock --systohc --utc
  • Hostname

    • echo '{$hostname}' > /etc/hostname
  • Root

    • passwd
  • Boot Loader

    • systemd-boot (gummiboot)

      • bootctl —path=/boot install

      • vi /boot/loader/entries/arch.conf

    title Arch Linux
    linux /vmlinuz-linux
    initrd /initramfs-linux.img
    options root=/dev/sda2 rw  
    
    • vi /boot/loader/loader.conf
timeout 3
default arch
  • Notes

    • $esp = /boot if you’ve mounted things as I have (should be where the EFI folder is)
    • you need to boot from the boot stick as UEFI I order for UEFI to work
    • See also: https://wiki.archlinux.org/index.php/Archboot
    • You could use grub but it’s more of a PITA
      • GRUB UEFI - refuses to boot properly…
        • pacman -S dosfstools grub os-prober efibootmgr
        • grub-install —target=x86_64-efi —efi-directory=/boot —bootloader-id=grub —recheck
        • grub-mkconfig -o /boot/grub/grub.cfg
        • efibootmgr -v
  • Network Setup

    • Here’s a basic thing you could do:
      • Wired on startup
        • systemctl enable dhcpcd
      • Wireless
        • pacman -S dialog
        • wifi-menu
    • To simply start up the network once
      • ip link to get your network devices
      • ip link set {$interface_name} up to bring it up
      • dhcpcd {$interface_name} to get a dhcp lease
    • Lets save ourselves some trouble and set up NetworkManager now though (otherwise you will need to systemctl --type=service and systemctl disable other network services)
    • pacman -S networkmanager
    • sudo systemctl enable NetworkManager
    • sudo systemctl start NetworkManager
  • Network Accessibility

    • pacman -S openssh
    • systemctl enable sshd
    • systemctl start sshd
    • pacman -S avahi nss-mdns
    • vi /etc/nsswitch.conf and append mdns to the hosts: line
    • sudo systemctl enable avahi-daemon.service
    • sudo systemctl start avahi-daemon.service
    • Reference: https://wiki.archlinux.org/index.php/Avahi
  • Install optional Packages

    • Honestly, we can do most of the stuff we know we want or need now, or we can just reboot and do w/ it once we’re not in chroot (make a user of course)
  • Reboot

    • exit
    • umount -R /mnt
    • reboot


Create a Local User

Install AUR Helper

NOTE: makepkg won’t run as root so you need to make a local user first

These days I use paru:

git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin
makepkg -si

NTFS Drive Mounting

NTFS is the best choice for data drives as it is the only modern FS that has support on Linux, OSX, and Windows.

Other File Systems

  • pacaur -S btrfs-progs dosfstools exfat-utils f2fs-tools fuse-exfat gdisk gpart gparted ms-sys mtools nilfs-utils
  • Note Linux can only mount journaled HFS+ partitions as read-only

rc.local w/ systemd


NTP

systemd-timesyncd might not work w/o systemd-networkd - this doesn’t necessarily play well with networkmanager

Alternative

  • pacaur -S ntpdate
  • sudo ntpdate -s time.nist.gov

CPU Drivers

  • Intel

    • pacaur -S intel-ucode
  • AMD

    • pacaur -S amd-ucode
  • Grub

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

  • gummiboot

    • Add initrd /intel-ucode.img before other initrd in /boot/loader/entries/arch.conf

Power Management

If laptop:

Wifi Drivers

If you have weird hardware, this may be an issue…

  • Reference
  • Find out what HW you have
    • lspci -k for PCI, or for USB lsusb -v
  • Broadcom
    • While there are open source drives, broadcom-wl (restricted) is supposedly the most stable. You will need to wait until setting up pacaur to install those (dkms version makes kernel upgrades less likely to break things)
    • pacaur -S broadcom-wl-dkms
    • modprobe wl
  • Realtek
  • Kernel Upgrades
    • Regular
      • pacaur -S broadcom-wl
      • sudo modprobe wl
    • DKMS
      • While dkms is listed as less likely to break things, this hasn’t been the case for me. If you upgrade the kernel, you will probably want to pacuar -R broadcom-wl-dkms and pacaur -S broadcom-wl-dkms to reinstall before rebooting
      • If not you probably can do the following:
        • dkms status
        • sudo dkms remove broadcom-wl/6.30.233.271 --all
          • this should be whatever version is listed
        • sudo dkms build broadcom-wl/6.30.233.271
        • sudo dkms install broadcom-wl/6.30.233.271
        • sudo systemctl restart dkms.service
        • modprobe wl
          • If this doesn’t work a reboot might help
    • If that doesn’t work, you’re going to need to want to either remove/install broadcom-wl-dkms from a hard line or copy the package over sneakernet. Terrible I know.

Video Card Drivers


Basic Apps

  • pacaur -Syu
  • pacaur -S cpio lbzip2 links lsof lzop mlocate net-tools openssh p7zip rsync sift the_silver_searcher time unace unrar unzip wireless_tools xz zip
  • pacaur -S bind-tools
  • pacaur -S python2 python2-setuptools
  • sudo easy_install-2.7 pip
  • pacaur -S python python-setuptools
  • sudo easy_install pip
  • CLI niceness
    • pacaur -S fish
    • chsh -s /usr/bin/fish
    • pacaur -S byobu
    • sudo pip install powerline-status psutil
    • pacaur -S python-pygit2
  • mdns
    • pacaur -S avahi nss-mdns
    • vi /etc/nsswitch.conf and append mdns to the hosts: line
    • sudo systemctl enable avahi-daemon.service
    • sudo systemctl start avahi-daemon.service
    • Reference: https://wiki.archlinux.org/index.php/Avahi
  • Arch feedback
    • pacaur -S pkgstats

Monitoring Tools

XWindows

Wayland

Wayland window managers:

paru -S labwc
paru -S sway
paru -S qtile python-pywlroots
paru -S gnome gnome-extra


LightDM

  • pacaur -S lightdm lightdm-gtk-greeter accountsservice
  • systemctl enable lightdm.service

GUI

  • WM & Friends

    • pacaur -S compton gnome-keyring gsimplecal hsetroot openbox network-manager-applet scrot tint2
  • Fonts (infinality-bundle)

    • infanility is dead. here’s how to remove it:

      • https://gist.github.com/cryzed/e002e7057435f02cc7894b9e748c5671 pacaur -S cairo pacaur -S fontconfig pacaur -S pkgbrowser pacaur -Rns ibfonts-meta-extended pacaur -S gsfonts pacaur -S ttf-dejavu pacaur -S cantarell-fonts pacaur -S tt-droid pacaur -S ttf-liberation

        Remove/replace rest of the fonts

        pacaur -S fonts-meta-extended-lt ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d

  • Powerline Fonts

    • git clone https://github.com/powerline/fonts.git
    • cd fonts; ./install.sh; cd ..; rm -rf fonts
  • Terminal

  • File Manager (including iOS + Android support)

    • pacaur -S gvfs gvfs-afc gvfs-gphoto2 gvfs-mtp mtpfs thunar thunar-volman thunar-archive-plugin thunar-media-tags-plugin tumbler usbmuxd xarchiver
  • Clipboard Manager

    • pacaur -S copyq clipit
  • Notifications

    • pacaur -S dunst
  • Launcher

    • pacaur -S bc pastebinit albert
  • Search (recoll may be better, will test if it ever becomes a need/problem)

    • pacaur -S tracker
    • tracker daemon -s
    • tracker status
    • tracker-needle for search gui
    • pacaur -S ripgrep
  • Sound

    • pacaur -S alsa-utils pulseaudio pulseaudio-alsa pavucontrol pnmixer

Browsers


Development

  • General
    • pacaur -S gvim
      • make sure .vimrc is installed (see config)
      • git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
      • vim +PluginInstall +qall
    • pacaur -S npm
    • sudo npm install http-server -g
    • pacaur -S racket
    • sudo pip install httpie
    • sudo pip install ipython[notebook]
  • Lensley
    • sudo easy_install-2.7 pip
    • sudo pip2 install envoy ll-xist==3.25 pycurl pyserial python-memcached
    • pacaur -S imagemagick openjpeg2
    • pacaur -S mysql-workbench
  • VR
    • pacaur -S unity-editor
    • pacaur -S osvr-core-git osvr-libfunctionality-git osvr-oculus-rift-git osvr-steamvr-git osvr-tracker-viewer-git
  • ARM
    • pacaur -S debootstrap qemu-user-static binfmt-support

WINE/1Password


Multimedia

  • Images
    • pacaur -S eog gthumb qiv
    • pacaur -S evince mcomix
    • pacaur -S gimp
    • pacaur `` -S okular
  • Music
    • pacaur -S clamz moc-svn mopidy mopidy-spotify spotify
    • Spotify may have issues w/ the AUR (2017-04-25) gpg --recv-keys --keyserver hkp://pgp.mit.edu D9C4D26D0E604491 gpg --recv-keys --keyserver hkp://pgp.mit.edu 5CC908FDB71E12C2 pacaur -S libopenssl-1.0-compat libcurl-openssl-1.0 cd ~/.cache/pacaur/spotify git clean -fdx git pull origin # cheers agm28011997 git checkout 226c803
    • Reference:
  • Video
    • pacaur -S atomicparsley ffmpeg rtmpdump gnome-vfs gst-libav gst-plugins-bad gst-plugins-good libva-vdpau-driver libmtp lua-socket mpv vlc youtube-dl
      • new versions of vlc may segfault w/o intel-ucode update

Slack

  • pacaur -S slack-desktop ****## Dropbox
  • pacaur -S dropbox dropbox-cli thunar-dropbox
  • Reference: https://wiki.archlinux.org/index.php/Dropbox
  • MAX file watches
    • echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p

Android Development

  • Install
    • vi /etc/pacman.conf and enable [multilib] and [multilib-testing]
    • pacaur -S android-sdk android-sdk-platform-tools android-sdk-build-tools android-studio android-udev
    • infinality bundles preferred but maybe not available?
  • Permissions for sdk manager updates
    • sudo chown -R :lhl /opt/android-sdk
    • sudo chmod -R g+w /opt/android-sdk
  • Fix Fonts
    • sudo vi /opt/android-studio/bin/studio64.vmoptions
      • -Dawt.useSystemAAFontSettings=on
  • Reference: https://wiki.archlinux.org/index.php/Android

Steam

  • pacaur -S steam
  • requires multilib

Bluetooth

Sony MDR-1000XM3 Setup

## Requires pulseaudio-modules-bt-git (w/ libldac)
# echo 'load-module module-bluetooth-discover a2dp_config="ldac_eqmid=hq"' >> /etc/pulse/default.pa
# echo 'load-module module-bluez5-discover a2dp_config="ldac_eqmid=sq"' >> /etc/pulse/default.pa
$ pulseaudio -k; pulseaudio --start

# Reconnect w/ blueman or bluetoothctl

$ pactl list sinks | grep -e bluez -e a2dp_codec
        Name: bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink
        Driver: module-bluez5-device.c
        Monitor Source: bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink.monitor
                bluetooth.a2dp_codec = "LDAC"
                device.api = "bluez"
                bluez.path = "/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX"
                bluez.class = "0x240404"
                bluez.alias = "WH-1000XM3"

Fonts

pacaur -S all-repository-fonts
pacaur -S nerd-fonts-git

See also: https://aur.archlinux.org/packages/ttf-google-fonts-git/ (updated too often to install)

https://github.com/ryanoasis/nerd-fonts

Printing

pacaur -S cups cups-pdf
systemctl enable org.cups.cupsd
systemctl start org.cups.cupsd

### Add user to sys to be able to lpinfo as user (vigr, vigr -s)

# https://willhaley.com/blog/printing-in-arch-linux/
# https://wiki.archlinux.org/index.php/CUPS/Troubleshooting#Bad_permissions
/etc/udev/rules.d/10-dymo.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0922", ATTRS{idProduct}=="1001", MODE="0664", GROUP="lp", OWNER="lhl"
udevadm control --reload-rules
# replug device
# to check lsusb to get device bus etc, the ls -l /dev/bus/usb/[bus] to make sure permissions are correct

Electron Apps

Dropbox Paper Papyrus

Wunderlist Wunderlistux https://github.com/edipox/wunderlistux

  • Run installer script (be sure to review it yourself) cd /usr/local/bin sudo ln -s /opt/wunderlistux/Wunderlistux

Facebook Messenger Messenger for Desktop https://github.com/aluxian/Messenger-for-Desktop

Caprine https://github.com/sindresorhus/caprine

Evernote Whatever https://github.com/CellarD0-0r/whatever


Config

  • Setup .ssh keys
  • Clone private dotfiles repo
    • Checkout onto home/local volume in case /data doesn’t mount
  • Symlink config
    • mv .config .config.local
    • ln -s dotfiles/common/config .config

Maintenance

wifi

breaks w/ every kernel update

pacaur -S broadcom-wl 
sudo modprobe wl

ncurses5-compat-libs

if you have verification issues https://aur.archlinux.org/packages/ncurses5-compat-libs/

gpg --keyserver pgp.mit.edu --recv-keys F7E48EDB

Compton not working

  • glx issue, check w/ glxinfo | grep OpenGL to see what’s up
  • no glx, bwaa, is it the nvidia drivers?
  • try nvidia-beta nvidia-libgl-beta
  • yep, that fixed it, isn’t that a bitch?

TODO

  • Clipboard Manager - function like ClipMenu
    • Clipit is not as nice as [ClipMenu for OS X](http://ClipMenu for OS X). GPaste looks good but requires a bajillion packages (and then the AUR fails to build).
      • gpaste
        • pacaur -S gobject-introspection
        • pacaur -S gpaste-git
  • SSB
    • Make it easy to launch executables
    • Better work on the favicon.ico
  • Sound
    • Smartly adjust volume and output (headphone, speaker, bluetooth speaker)

Extra Ref/WIP

ip link set enp0s25 up ip addr add 192.168.2.2/24 broadcast 192.168.2.255 dev enp0s25 ip route add default via 192.168.2.1

DNS https://wiki.archlinux.org/index.php/Resolv.conf echo 'nameserver 8.8.8.8' >> /etc/resolve.conf

1Password

USB 3 Drive Troubleshooting

Issues appear to be w/ the USB port itself…

http://blog.goodstuff.im/1password https://github.com/asianmack/1password-anywhere https://github.com/Gyran/chrome-1passwordanywhere-extension https://learn2.agilebits.com/1Password4/Security/keychain-design.html https://github.com/openpassword/blimey https://github.com/robbiev/multipass-chrome http://www.lucianofiandesio.com/1password-in-linux

Network Sharing https://wiki.archlinux.org/index.php/NetworkManager dnsmasq https://wiki.archlinux.org/index.php/Advanced_traffic_control https://www.archlinux.org/packages/community/x86_64/netbrake/ http://freecode.com/projects/pyshaper/

Wunderlist

****Evernote

  • pacaur -S nixnote-beta

http://www.geeknote.me/ geeknote-improved-git

****SSB https://aur.archlinux.org/packages/fogger-bzr/ https://github.com/rubiojr/bottles

Übersicht for Linux http://tracesof.net/uebersicht/

http://www.webupd8.org/2009/04/conky-like-desktop-info-application.html https://launchpad.net/~m-buck/+archive/ubuntu/gtk-desktop-info https://code.launchpad.net/~m-buck/+junk/gtk-desktop-info http://ubuntuforums.org/showthread.php?t=1010808 http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/

Almost works... Dead project. https://launchpad.net/screenlets https://en.wikipedia.org/wiki/Screenlets

  • screenlets
    • pacaur -S python2-feedparser python2-pillow python2-pytz python2-numpy screenlets screenlets-pack-basic
    • sudo gdk-pixbuf-query-loaders --update-cache
    • sudo gtk-update-icon-cache -t -f /usr/share/icons/hicolor

byobu++ automated terminal management and history

Power Management https://wiki.archlinux.org/index.php/Power_management#Power_management_with_systemd https://wiki.archlinux.org/index.php/Power_management#Sleep_hooks

See also: https://github.com/uncon/wiki/blob/master/arch_linux/xps13.md

Figure out https://wiki.archlinux.org/index.php/Openbox#obm-xdg

LemonBar https://www.linux.org.ru/gallery/11843658.png

http://i.imgur.com/cVPylyx.png https://wiki.archlinux.org/index.php/Lemonbar

Aliases https://www.reddit.com/r/archlinux/comments/3sh9q4/what_aliasesbash_functions_do_you_use_to_that/

Fixing Tearing this seems to work: https://bbs.archlinux.org/viewtopic.php?id=161403 see also: https://bbs.archlinux.org/viewtopic.php?id=173890 https://bbs.archlinux.org/viewtopic.php?id=199445 http://unix.stackexchange.com/questions/182801/why-is-video-tearing-such-a-problem-in-linux

Evernote w/ Wine // // winetricks wininet // https://forum.winehq.org/viewtopic.php?p=74609 pacaur -S lib32-openssl098 pacaur -S openssl098 // http://comments.gmane.org/gmane.comp.emulators.wine.bugs/396702

Time Zone switching https://wiki.archlinux.org/index.php/time

timedatectl set-timezone America/Los_Angeles

Suspend on Idle

pacaur -S xautolock

Add to .xinitrc
xautolock -time 15 -locker 'systemctl suspend' -notify [margin] -notifier [notifier] &

https://wiki.archlinux.org/index.php/Allow_users_to_shutdown

Don’t Lock if watching video:

http://stackoverflow.com/questions/17020031/how-can-i-determine-if-html5-player-is-running-in-browser

Adapt https://github.com/iye/lightsOn/blob/master/lightsOn.sh

https://aur.archlinux.org/packages/caffeine-ng https://gist.github.com/boarpig/8118854

suspend/hibernate http://blog.programmableproduction.com/2016/02/22/ArchLinux-Powermanagement-Setting-Hibernate/ https://wiki.archlinux.org/index.php/Power_management#Hybrid_sleep https://wiki.archlinux.org/index.php/Laptop#Power_management https://wiki.archlinux.org/index.php/hibernate-script https://feeding.cloud.geek.nz/posts/creating-a-modern-tiling-desktop-environment-using-i3/ https://bbs.archlinux.org/viewtopic.php?id=150867 https://wiki.archlinux.org/index.php/Power_management#Delayed_hibernation_service_file

Notifications https://github.com/sboli/twmn notify-send http://askubuntu.com/questions/65184/the-notify-send-bubble-looks-ugly-with-openbox-yellow-black-and-non-transpare http://www.knopwob.org/dunst/screenshots.html https://github.com/halhen/statnot

Moom/Resizer

  • easy commands / help/kb shortcut to resize windows, smaller, left half etc

Styling Notifications https://github.com/tatou-tatou/Themes/tree/master/Stendhal https://www.reddit.com/r/unixporn/comments/3eqxba/i3gaps_gruvbox_inspired/ http://dotshare.it/dots/1013/ https://github.com/zachbwh/bspwm_rice https://github.com/atweiden/dotfiles

https://github.com/knopwob/dunst/issues/114

knopwob/dunst#114 https://nildeala.fr/2013/02/16/dunst-notifications-minimalistes-et-elegantes.html https://www.reddit.com/r/unixporn/comments/3otrjh/i3gaps_got_bored_of_using_the_gruvbox_setup_for/ https://github.com/TomboFry/dotfiles https://plus.google.com/106152149097741431219/posts/f48dhBiRtpg https://m.reddit.com/r/unixporn/comments/46g091 http://www.gulfweb.net/rlwalker/astronomy/calendar/GoogleCalendarSearchCommandLine.htm https://github.com/magdeoz/i3-Arch-config https://github.com/casey/dotbot-user-study/blob/master/configs/jubnzv-dotfiles_install.conf.yaml

sudoers.d

  • Can’t have a ‘.’ in the filename
  • Need to be chmod a+x along path
  • need to be own by root

--- Copy and paste

Maintenance

wifi

breaks w/ every kernel update

pacaur -S broadcom-wl 

sudo modprobe wl

ncurses5-compat-libs

if you have verification issues

AUR (en) - ncurses5-compat-libs

gpg --keyserver pgp.mit.edu --recv-keys F7E48EDB

Compton not working

  • glx issue, check w/ glxinfo | grep OpenGL to see what’s up
  • no glx, bwaa, is it the nvidia drivers?
  • try nvidia-beta nvidia-libgl-beta 
  • yep, that fixed it, isn’t that a bitch?

TODO

  • Clipboard Manager - function like ClipMenu

  • Clipit is not as nice as [ClipMenu for OS X](http://ClipMenu for OS X). GPaste looks good but requires a bajillion packages (and then the AUR fails to build).

  • gpaste

  • pacaur -S gobject-introspection 

  • pacaur -S gpaste-git 

  • SSB

  • Make it easy to launch executables

  • Better work on the favicon.ico

  • Sound

  • Smartly adjust volume and output (headphone, speaker, bluetooth speaker)


Extra Ref/WIP

ip link set enp0s25 up

ip addr add 192.168.2.2/24 broadcast 192.168.2.255 dev enp0s25

ip route add default via 192.168.2.1

DNS

Domain name resolution - ArchWiki

echo 'nameserver 8.8.8.8' >> /etc/resolve.conf

1Password

USB 3 Drive Troubleshooting

Issues appear to be w/ the USB port itself…

Post: 1Password on Linux and OS X

GitHub - asianmack/1password-anywhere: Chrome Extension for 1Password Anywhere use on Chromebooks—requires Dropbox authentication

GitHub - Gyran/chrome-1passwordanywhere-extension: use 1Passwordanywhere to use your 1Passwords on any platform

1Password Support

GitHub - openpassword/blimey

GitHub - robbiev/multipass-chrome: Unofficial 1Password Chrome extension

http://www.lucianofiandesio.com/1password-in-linux

Network Sharing

NetworkManager - ArchWiki

dnsmasq

Advanced traffic control - ArchWiki

Arch Linux - netbrake 0.2-7 (x86_64)

Best Open Source Linux Software 2022

Wunderlist

Evernote

  • pacaur -S nixnote-beta 

http://www.geeknote.me/

geeknote-improved-git

SSB

https://aur.archlinux.org/packages/fogger-bzr/

GitHub - rubiojr/bottles: Turn Your Web Apps into Real Linux Apps :)

Übersicht for Linux

Übersicht

Conky-like Desktop Info Application With Html Support (gtk-desktop-info) [Ubuntu / Linux] ~ Web Upd8: Ubuntu / Linux blog

PPA named gtk-desktop-info for Kaivalagi : Kaivalagi

gtk-desktop-info : Code : Kaivalagi

[all variants] Desktop Info App With Html Support (gtk-desktop-info)

http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/

Almost works...

Dead project.

https://launchpad.net/screenlets

Screenlets - Wikipedia

  • screenlets

  • pacaur -S python2-feedparser python2-pillow python2-pytz python2-numpy screenlets screenlets-pack-basic 

  • sudo gdk-pixbuf-query-loaders --update-cache 

  • sudo gtk-update-icon-cache -t -f /usr/share/icons/hicolor 

byobu++ 

automated terminal management and history

Power Management

Power management - ArchWiki

Power management - ArchWiki

See also:

https://github.com/uncon/wiki/blob/master/arch_linux/xps13.md

Figure out

Openbox - ArchWiki

LemonBar

https://www.linux.org.ru/gallery/11843658.png 

http://i.imgur.com/cVPylyx.png 

Lemonbar - ArchWiki

Aliases

https://www.reddit.com/r/archlinux/comments/3sh9q4/what_aliasesbash_functions_do_you_use_to_that/

Fixing Tearing

this seems to work: [SOLVED] Tearless compositing. / Applications & Desktop Environments / Arch Linux Forums

see also:

[SOLVED] Nvidia tearing / Applications & Desktop Environments / Arch Linux Forums

[SOLVED] Nvidia Geforce GTX 970 Screen Tearing / Applications & Desktop Environments / Arch Linux Forums

graphics - Why is video tearing such a problem in Linux? - Unix & Linux Stack Exchange

Evernote w/ Wine

// 

// winetricks wininet

// Evernote Cannot Connect To Internet - WineHQ Forums

pacaur -S lib32-openssl098

pacaur -S openssl098

// http://comments.gmane.org/gmane.comp.emulators.wine.bugs/396702

Time Zone switching

Time - ArchWiki

timedatectl set-timezone America/Los_Angeles

Suspend on Idle

pacaur -S xautolock

Add to .xinitrc

xautolock -time 15 -locker 'systemctl suspend' -notify [margin] -notifier [notifier] &

Allow users to shutdown - ArchWiki

Don’t Lock if watching video:

cat /proc/asound/card*/pcm*/sub*/status | grep RUNNING

pacmd list-sink-inputs

-a    Will show accumulated output

-o    Will only output 

-P    Will only show processes instead of threads

html - How can I determine if HTML5 player is running in browser? - Stack Overflow

Adapt lightsOn/lightsOn.sh at master · iye/lightsOn · GitHub

AUR (en) - caffeine-ng

https://gist.github.com/boarpig/8118854

suspend/hibernate

Archlinux enabling hibernation - Programmable Production

Power management - ArchWiki

Laptop - ArchWiki

ArchWiki:Archive - ArchWiki

Creating a modern tiling desktop environment using i3

Hibernate when i press power button / Newbie Corner / Arch Linux Forums

Power management - ArchWiki

Notifications

GitHub - sboli/twmn: A notification system for tiling window managers

notify-send

11.04 - The notify-send bubble looks ugly with openbox. (yellow, black and non transparent) - Ask Ubuntu

http://www.knopwob.org/dunst/screenshots.html

GitHub - halhen/statnot: Status / Notification system for lightweight Window Managers

Moom/Resizer

  • easy commands / help/kb shortcut to resize windows, smaller, left half etc

Styling Notifications

Themes/Stendhal at master · tatou-tatou/Themes · GitHub

https://www.reddit.com/r/unixporn/comments/3eqxba/i3gaps_gruvbox_inspired/

DotShare.it

GitHub - zachbwh/bspwm_rice: My configs that I use for my bspwm environment

GitHub - atweiden/dotfiles: Dotfiles

https://github.com/knopwob/dunst/issues/114

knopwob/dunst#114

https://nildeala.fr/2013/02/16/dunst-notifications-minimalistes-et-elegantes.html

https://www.reddit.com/r/unixporn/comments/3otrjh/i3gaps_got_bored_of_using_the_gruvbox_setup_for/

GitHub - TomboFry/dotfiles: [WIP] XTerm/urxvt/st, Oh-my-Zsh, Vim

https://plus.google.com/106152149097741431219/posts/f48dhBiRtpg

https://m.reddit.com/r/unixporn/comments/46g091

insanum/gcalcli · GitHub

GitHub - magdeoz/dotfiles: dotfiles, bspwm, lemobar, ranger, X

dotbot-user-study/jubnzv-dotfiles_install.conf.yaml at master · casey/dotbot-user-study · GitHub

sudoers.d

  • Can’t have a ‘.’ in the filename
  • Need to be chmod a+x along path
  • need to be own by root

Install

Initial Setup

Apps

Create a USB Boot Stick

Initial Boot and Getting into New System

  • See Reference

  • Installation guide - ArchWiki

  • High level, bare bones

  • Installation guide - ArchWiki

  • More detailed, but lots of links

  • Arch Linux Install Guide - My Big Bad Wiki

  • A complete personal guide

  • Get a network connection

  • ip link to get device

  • systemctl restart dhcpcd.service for hardline

  • WiFi (uses iwctl)

  • device list

  • station [wlan0] scan

  • station [wlan0] get-networks

  • station [wlan0] connect [SSID]

  • See: Installation guide - ArchWiki

  • Make sure your clock is OK

  • timedatectl set-ntp true 

  • timedatectl status 

  • Figure out your storage devices

  • Blah blah blah: Installation guide - ArchWiki

  • lsblk -f 

  • fdisk -l 

  • cfdisk 

  • Make File Systems and Mount

  • Traditional swap + ext4 + swap

  • mkfs.ext4 /dev/sda2 

  • mkswap /dev/sda3 

  • swapon /dev/sda3 

  • mount /dev/sda2 /mnt 

  • mkdir -p /mnt/boot 

  • mkfs.fat -F32 /dev/sda1 (make sure partition type is set to EFI System in cfdisk)

  • mount /dev/sda1 /mnt/boot 

  • EFI partition

  • Encrypted BTRFS + encrypted swap

  • cfdisk to gpt and make volumes

  • mkfs.vfat -F32 -n "EFI" /dev/nvme0n1p1

  • mkswap -L swap /dev/nvem0n1p2

  • cryptsetup luksFormat /dev/nvme0n1p3

cryptsetup open /dev/nme0n1p3 btrfs

mkfs.btrfs -L "arch" /dev/mapper/btrfs

mount /dev/mapper/btrfs /mnt

mount /dev/mapper/btrfs /mnt

cd /mnt

In New System (chroot)

  • Select a mirror

  • pacman -S reflector rsync 

  • Reflector - ArchWiki

  • reflector --verbose --country 'United States' -l 200 -p http --sort rate --save /etc/pacman.d/mirrorlist 

  • Update

  • pacman -Syu 

  • pacman -Sy fish vim 

  • cd /usr/bin; rm vi; ln -s vim vi 

  • Locale

  • vi /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 

  • locale-gen 

  • echo LANG=en_US.UTF-8 > /etc/locale.conf 

  • Time

  • ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 

  • hwclock --systohc --utc 

  • Hostname

  • echo '{$hostname}' > /etc/hostname  

  • Root

  • passwd 

  • Boot Loader

  • systemd-boot (gummiboot)

  • bootctl —path=/boot install 

  • vi /boot/loader/entries/arch.conf 

  • title          Arch Linux

  • linux          /vmlinuz-linux

  • initrd         /initramfs-linux.img

  • options        root=/dev/sda2 rw

  • vi /boot/loader/loader.conf 

  • timeout 3

  • default arch

  • Notes

  • $esp = /boot if you’ve mounted things as I have (should be where the EFI folder is)

  • you need to boot from the boot stick as UEFI I order for UEFI to work

  • See also: ArchWiki:Archive - ArchWiki

  • You could use grub but it’s more of a PITA

  • GRUB UEFI - refuses to boot properly…

  •  pacman -S dosfstools grub os-prober efibootmgr 

  • grub-install —target=x86_64-efi —efi-directory=/boot —bootloader-id=grub —recheck 

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

  • efibootmgr -v 

  • Network Setup

  • Here’s a basic thing you could do:

  • Wired on startup

  • systemctl enable dhcpcd 

  • Wireless

  • pacman -S dialog 

  • wifi-menu 

  • To simply start up the network once

  • ip link  to get your network devices

  • ip link set {$interface_name} up  to bring it up

  • dhcpcd {$interface_name}  to get a dhcp lease

  • Lets save ourselves some trouble and set up NetworkManager now though (otherwise you will need to systemctl --type=service and systemctl disable other network services)

  • pacman -S networkmanager 

  • sudo systemctl enable NetworkManager 

  • sudo systemctl start NetworkManager 

  • Network Accessibility

  • pacman -S openssh

  • systemctl enable sshd

  • systemctl start sshd

  • pacman -S avahi nss-mdns 

  • vi /etc/nsswitch.conf and append mdns to the hosts: line

  • sudo systemctl enable avahi-daemon.service 

  • sudo systemctl start avahi-daemon.service 

  • Reference: Avahi - ArchWiki

  • Install optional Packages

  • Honestly, we can do most of the stuff we know we want or need now, or we can just reboot and do w/ it once we’re not in chroot (make a user of course)

  • Reboot

  • exit 

  • umount -R /mnt 

  • reboot

Create a Local User

Install pacaur for Package Management

wget https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz

tar xvfz cower.tar.gz

cd cower

makepkg

sudo pacman -U cower-{$version}.pkg.tar.xz 

  • No longer needed but if you need to add keys…

  • $ gpg --recv-key 1EB2638FF56C0C53

  • gpg: key F56C0C53: public key "Dave Reisner [email protected]" imported

  • gpg: no ultimately trusted keys found

  • gpg: Total number processed: 1

  • gpg:               imported: 1

  • makepkg requires /usr/bin/core_perl in the path

  • bash export PATH=/usr/bin:/usr/local/bin:/usr/bin/core_perl 

  • fish set PATH /usr/bin /usr/local/bin /usr/bin/core_perl 

  • pacaur

wget https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz

tar xvfz pacaur.tar.gz

cd pacaur

makepkg

sudo pacman -U pacaur-{$version}.pkg.tar.xz 

  • We can now use pacaur instead of pacman to install both official arch and unofficial AUR packages.

NTFS Drive Mounting

NTFS is the best choice for data drives as it is the only modern FS that has support on Linux, OSX, and Windows.

Other File Systems

  • pacaur -S btrfs-progs dosfstools exfat-utils f2fs-tools fuse-exfat gdisk gpart gparted ms-sys mtools nilfs-utils 
  • Note Linux can only mount journaled HFS+ partitions as read-only

rc.local w/ systemd

NTP

systemd-timesyncd might not work w/o systemd-networkd - this doesn’t necessarily play well with networkmanager 

Alternative

  • pacaur -S ntpdate
  • sudo ntpdate -s time.nist.gov

CPU Drivers

  • Intel

  • pacaur -S intel-ucode 

  • AMD

  • pacaur -S amd-ucode

  • Grub

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

  • gummiboot

  • Add initrd  /intel-ucode.img before other initrd in /boot/loader/entries/arch.conf

Power Management

If laptop:

Wifi Drivers

If you have weird hardware, this may be an issue…

  • Reference

  • Network configuration/Wireless - ArchWiki

  • Broadcom wireless - ArchWiki

  • Find out what HW you have

  • lspci -k for PCI, or for USB lsusb -v 

  • Broadcom

  • While there are open source drives, broadcom-wl (restricted) is supposedly the most stable. You will need to wait until setting up pacaur to install those (dkms version makes kernel upgrades less likely to break things) 

  • pacaur -S broadcom-wl-dkms 

  • If you don’t have wired ethernet or a USB wireless interface you will need to use the offline installation instructions:

  • Broadcom wireless - ArchWiki

  • modprobe wl 

  • Realtek

  • Some Realtek drivers should be in the mainline kernel. If not

  • pacaur -S dkms linux-headers 

  • Search for appropriate drivers AUR (en) - Packages

  • Kernel Upgrades

  • Regular

  • pacaur -S broadcom-wl 

  • sudo modprobe wl 

  • DKMS

  • While dkms is listed as less likely to break things, this hasn’t been the case for me. If you upgrade the kernel, you will probably want to pacuar -R broadcom-wl-dkms and pacaur -S broadcom-wl-dkms to reinstall before rebooting

  • If not you probably can do the following:

  •  dkms status 

  • sudo dkms remove broadcom-wl/6.30.233.271 --all 

  • this should be whatever version is listed

  •  sudo dkms build broadcom-wl/6.30.233.271 

  •  sudo dkms install broadcom-wl/6.30.233.271 

  • sudo systemctl restart dkms.service 

  • modprobe wl 

  • If this doesn’t work a reboot might help

  • If that doesn’t work, you’re going to need to want to either remove/install broadcom-wl-dkms from a hard line or copy the package over sneakernet. Terrible I know. 

Video Card Drivers

Basic Apps

  • pacaur -Syu 

  • pacaur -S cpio lbzip2 links lsof lzop mlocate net-tools openssh p7zip rsync sift the_silver_searcher time unace unrar unzip wireless_tools xz zip 

  • pacaur -S bind-tools 

  • pacaur -S python2 python2-setuptools 

  • sudo easy_install-2.7 pip 

  • pacaur -S python python-setuptools 

  • sudo easy_install pip 

  • CLI niceness

  • pacaur -S fish 

  • chsh -s /usr/bin/fish 

  • pacaur -S byobu 

  • sudo pip install powerline-status psutil 

  • pacaur -S python-pygit2 

  • mdns

  • pacaur -S avahi nss-mdns 

  • vi /etc/nsswitch.conf and append mdns to the hosts: line

  • sudo systemctl enable avahi-daemon.service 

  • sudo systemctl start avahi-daemon.service 

  • Reference: Avahi - ArchWiki

  • Arch feedback

  • pacaur -S pkgstats

Monitoring Tools

  • pacaur -S dstat htop nmon 

  • pacaur -S bmon iftop nbwmon nethogs nload slurm vnstat wavemon 

  • vnStat - ArchWiki

  • pacaur -S baobab 

  • sudo pip install glances 

XWindows

  • pacaur -S xorg xorg-server xorg-server-utils xorg-server-xephyr 

  • sudo nvidia-xconfig 

  • Be sure to add     Option         "NoLogo" to the /etc/X11/xorg.conf if you don't want the logo to flash w/ an Nvidia card

  • NVIDIA - ArchWiki

LightDM

  • pacaur -S lightdm lightdm-gtk-greeter accountsservice 
  • systemctl enable lightdm.service 

GUI

pacaur -S cairo

pacaur -S fontconfig

pacaur -S pkgbrowser

pacaur -Rns ibfonts-meta-extended

pacaur -S gsfonts

pacaur -S ttf-dejavu

pacaur -S cantarell-fonts

pacaur -S tt-droid

pacaur -S ttf-liberation

# Remove/replace rest of the fonts

pacaur -S fonts-meta-extended-lt

ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d

ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d

  • Powerline Fonts

  • git clone https://github.com/powerline/fonts.git 

  • cd fonts; ./install.sh; cd ..; rm -rf fonts 

  • Terminal

  • pacaur -S rxvt-unicode termite 

  • See also: Switching from urxvt to termite – random($foo)

  • File Manager (including iOS + Android support)

  • pacaur -S gvfs gvfs-afc gvfs-gphoto2 gvfs-mtp mtpfs thunar thunar-volman thunar-archive-plugin thunar-media-tags-plugin tumbler usbmuxd xarchiver 

  • Clipboard Manager

  • pacaur -S copyq clipit 

  • Notifications

  • pacaur -S dunst 

  • Launcher

  • pacaur -S bc pastebinit albert 

  •  Search (recoll may be better, will test if it ever becomes a need/problem)

  • pacaur -S tracker 

  • tracker daemon -s 

  • tracker status 

  • tracker-needle for search gui

  • pacaur -S ripgrep

  • Sound

  • pacaur -S alsa-utils pulseaudio pulseaudio-alsa pavucontrol pnmixer

Browsers

  • Chromium

  • pacuar -S chromium 

  • Google Chrome

  • pacaur -S google-chrome 

  • pacaur -S google-chrome-beta 

  • Firefox

  • pacaur -S firefox 

  • Firefox Developer (use Firefox dependencies)

  • the AUR is broken and we want regular updates anyway

wget https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US

Development

  • General

  • pacaur -S gvim 

  • make sure .vimrc is installed (see config)

  • git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 

  • vim +PluginInstall +qall 

  • pacaur -S npm 

  • sudo npm install http-server -g 

  • pacaur -S racket 

  • sudo pip install httpie 

  • sudo pip install ipython[notebook] 

  • Lensley

  • sudo easy_install-2.7 pip 

  • sudo pip2 install envoy ll-xist==3.25 pycurl pyserial python-memcached 

  • pacaur -S imagemagick openjpeg2 

  • pacaur -S mysql-workbench 

  • VR

  • pacaur -S unity-editor 

  • pacaur -S osvr-core-git osvr-libfunctionality-git osvr-oculus-rift-git osvr-steamvr-git osvr-tracker-viewer-git 

  • ARM

  • pacaur -S debootstrap qemu-user-static binfmt-support 

WINE/1Password

Multimedia

  • Images

  • pacaur -S eog gthumb qiv 

  • pacaur -S evince mcomix 

  • pacaur -S gimp

  • pacaur  -S okular

  • Music

  • pacaur -S clamz moc-svn mopidy mopidy-spotify spotify 

  • Spotify may have issues w/ the AUR (2017-04-25)

gpg --recv-keys --keyserver hkp://pgp.mit.edu D9C4D26D0E604491

gpg --recv-keys --keyserver hkp://pgp.mit.edu 5CC908FDB71E12C2

pacaur -S libopenssl-1.0-compat libcurl-openssl-1.0

cd ~/.cache/pacaur/spotify

git clean -fdx

git pull origin # cheers agm28011997

git checkout 226c803

  • Reference:

  • https://aur.archlinux.org/packages/spotify/

  • Video

  • pacaur -S atomicparsley ffmpeg rtmpdump gnome-vfs gst-libav gst-plugins-bad gst-plugins-good libva-vdpau-driver libmtp lua-socket mpv vlc youtube-dl 

  • new versions of vlc may segfault w/o intel-ucode update

Slack

  • pacaur -S slack-desktop 

Dropbox

  • pacaur -S dropbox dropbox-cli thunar-dropbox 

  • Reference: Dropbox - ArchWiki

  • MAX file watches

  • echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p 

Android Development

  • Install

  • vi /etc/pacman.conf and enable [multilib] and [multilib-testing] 

  • pacaur -S android-sdk android-sdk-platform-tools android-sdk-build-tools android-studio android-udev 

  • infinality bundles preferred but maybe not available?

  • Permissions for sdk manager updates

  • sudo chown -R :lhl /opt/android-sdk 

  • sudo chmod -R g+w /opt/android-sdk 

  • Fix Fonts

  • sudo vi /opt/android-studio/bin/studio64.vmoptions 

  • -Dawt.useSystemAAFontSettings=on 

  • Reference: Android - ArchWiki

Steam

  • pacaur -S steam 
  • requires multilib

Bluetooth

Sony MDR-1000XM3 Setup

## Requires pulseaudio-modules-bt-git (w/ libldac)

# echo 'load-module module-bluetooth-discover a2dp_config="ldac_eqmid=hq"' >> /etc/pulse/default.pa

# echo 'load-module module-bluez5-discover a2dp_config="ldac_eqmid=sq"' >> /etc/pulse/default.pa

$ pulseaudio -k; pulseaudio --start

# Reconnect w/ blueman or bluetoothctl

$ pactl list sinks | grep -e bluez -e a2dp_codec

        Name: bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink

        Driver: module-bluez5-device.c

        Monitor Source: bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink.monitor

                bluetooth.a2dp_codec = "LDAC"

                device.api = "bluez"

                bluez.path = "/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX"

                bluez.class = "0x240404"

                bluez.alias = "WH-1000XM3"

Fonts

pacaur -S all-repository-fonts

pacaur -S nerd-fonts-git

See also: https://aur.archlinux.org/packages/ttf-google-fonts-git/

(updated too often to install)

GitHub - ryanoasis/nerd-fonts: Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more

Printing

pacaur -S cups cups-pdf

systemctl enable org.cups.cupsd

systemctl start org.cups.cupsd

### Add user to sys to be able to lpinfo as user (vigr, vigr -s)

# https://willhaley.com/blog/printing-in-arch-linux/

# https://wiki.archlinux.org/index.php/CUPS/Troubleshooting#Bad_permissions

/etc/udev/rules.d/10-dymo.rules

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0922", ATTRS{idProduct}=="1001", MODE="0664", GROUP="lp", OWNER="lhl"

udevadm control --reload-rules

# replug device

# to check lsusb to get device bus etc, the ls -l /dev/bus/usb/[bus] to make sure permissions are correct

Electron Apps

Dropbox Paper

Papyrus

Wunderlist

Wunderlistux

GitHub - edipox/wunderlistux: An electron wrapper for wunderlist made with for Linux (specially for elementary OS)

  • Run installer script (be sure to review it yourself)

cd /usr/local/bin

sudo ln -s /opt/wunderlistux/Wunderlistux

Facebook Messenger

Messenger for Desktop

GitHub - aluxian/Messenger-for-Desktop: This is not an official Facebook product, and is not affiliated with, or sponsored or endorsed by, Facebook.

Caprine

GitHub - sindresorhus/caprine: Elegant Facebook Messenger desktop app

Evernote

Whatever

GitHub - sbrshk/whatever: An unofficial Evernote desktop client for Linux

Config

  • Setup .ssh keys

  • Clone private dotfiles repo

  • Checkout onto home/local volume in case /data doesn’t mount

  • Symlink config

  • mv .config .config.local 

  • ln -s dotfiles/common/config .config

⚠️ **GitHub.com Fallback** ⚠️