Created
April 10, 2017 16:12
-
-
Save robeeeert/77f30b06305df8859dec75fe56ae5976 to your computer and use it in GitHub Desktop.
Arch Linux Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TOC] | |
--- | |
# Installation | |
- Follow https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger (german) | |
# Network | |
## Cable link | |
```bash | |
ip link | |
dhcpcd <device> | |
``` | |
## Wifi (during installation / no GUI) | |
http://linuxcommando.blogspot.de/2013/10/how-to-connect-to-wpawpa2-wifi-network.html | |
## Wifi (for production) | |
**For GUI use with KDE:** | |
- Install [NetworkManager](https://wiki.archlinux.org/index.php/NetworkManager#KDE_Plasma) | |
```bash | |
pacman -Sy plasma-nm | |
``` | |
- Enable service | |
```bash | |
systemctl enable NetworkManager.service | |
``` | |
- Reboot | |
- Configure wifi with the button in the taskbar | |
## Bluetooth | |
- Install bluetooth packages | |
```bash | |
pacman -S bluez bluez-utils bluez-firmware | |
``` | |
- Add user to `lp` group | |
```bash | |
usermod -g lp andreas | |
``` | |
- Enable service | |
```bash | |
systemctl enable bluetooth.service | |
``` | |
### GUI | |
- (KDE) Install GUI | |
```bash | |
pacman -S bluedevil | |
``` | |
### Audio | |
- Install `pulseaudio-bluetooth` | |
```bash | |
pacman -S pulseaudio-bluetooth | |
``` | |
- If connect does not work, set simple pairing mode: | |
``` | |
hciconfig hci0 sspmode 0 | |
``` | |
# Software | |
## Via Pacman | |
- google-chrome | |
- atom | |
- vlc | |
### OpenSSH | |
- Install openssh | |
```bash | |
pacman -S openssh | |
``` | |
- Choose one of the following: | |
- Use existing config | |
- Copy `.ssh` folder into `~/` | |
```bash | |
cp -R <sourcepath>/.ssh ~/.ssh | |
``` | |
- Change permissions on private key | |
```bash | |
chmod 600 ~/.ssh/id_rsa | |
``` | |
- Create new key-pair | |
```bash | |
ssh-keygen -t rsa -b 4096 -C "<email>" | |
``` | |
### Git | |
- Install git | |
```bash | |
pacman -S git | |
``` | |
- Download auto-complete script | |
```bash | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
``` | |
- Call it from inside `.bashrc`: | |
```bash | |
# Git auto-completion | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
``` | |
### Keepass | |
- Install keepass | |
```bash | |
pacman -S keepass | |
``` | |
- Download [keepasshttp plugin](https://github.com/pfn/keepasshttp/releases) | |
- Copy the file | |
```bash | |
sudo mv ~/Downloads/KeePassHttp.plgx /usr/share/keepass | |
``` | |
- Install [chromeIpass plugin](https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae?hl=de) | |
- Launch keepass | |
### docker | |
- Install docker and docker-compose | |
```bash | |
pacman -S docker docker-compose | |
``` | |
- Enable docker service | |
```bash | |
systemctl enable docker.service | |
``` | |
- Reboot | |
- Check if docker runs | |
```bash | |
docker info | |
``` | |
- Login with docker | |
```bash | |
docker login | |
``` | |
### Java | |
- Install Java 8 JDK | |
```bash | |
pacman -S jre8-openjdk | |
``` | |
- Create a desktop starter file as basis for other Java programs like smartgit or intellij | |
- Save `java.desktop` into `/usr/share/applications`: | |
``` | |
[Desktop Entry] | |
Name=OpenJDK 7 Runtime | |
Name[de]=OpenJDK 7 Laufzeitumgebung | |
Comment=open with OpenJDK Java | |
Comment[de]=mit OpenJDK Java öffnen | |
Exec=/usr/lib/jvm/java-7-openjdk-amd64/bin/java -jar %f | |
Terminal=false | |
Type=Application | |
Icon=openjdk-7 | |
MimeType=application/x-java-archive;application/java-archive;application/x-jar; | |
NoDisplay=false | |
``` | |
### Yaourt | |
According to [these instructions](https://www.ostechnix.com/install-yaourt-arch-linux/): | |
- Add to pacman config file `/etc/pacman.conf` | |
```ini | |
[archlinuxfr] | |
SigLevel = Never | |
Server = http://repo.archlinux.fr/$arch | |
``` | |
- Install yaourt | |
```bash | |
pacman -S yaourt | |
``` | |
## Special shit | |
### Google Chrome | |
- Install yaourt | |
- Install Google Chrome | |
``` | |
yaourt google-chrome | |
``` | |
### SmartGit | |
- [Download SmartGit](http://www.syntevo.com/smartgit/) (TAR archive) and extract it | |
- Create a **global java desktop starter file** as described in the Java installation section | |
- Create the desktop starter file `smartgit-starter.desktop` in `/usr/share/applications` | |
```desktop | |
[Desktop Entry] | |
Exec=/home/rob/Downloads/smartgit/bin/smartgit.sh | |
Icon=/home/rob/Downloads/smartgit/bin/smartgit.-128.png | |
Name[de]=Smartgit | |
Name=Smartgit | |
Terminal=false | |
Type=Application | |
``` | |
- Make it executable | |
- Choose an icon in the GUI properties | |
- Drag'ndrop it into the task bar | |
### nvm | |
Following the manual: https://github.com/creationix/nvm | |
- Install nvm by script | |
```bash | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash | |
``` | |
- Open new shell | |
- Install latest node | |
```bash | |
nvm install node | |
``` | |
### Arduino IDE | |
- Install `arduino` packages | |
```bash | |
pacman -S arduino arduino-avr-core | |
``` | |
- **Reboot** *(or bother with Arduinos not showing up as `ttyUSB`/`ttyACM`)* | |
- Install `ncurses5-compat` libraries for proper `libtinfo` shared lib | |
- Add key to keyring | |
```bash | |
gpg --keyserver pgp.mit.edu --recv-keys 702353E0F7E48EDB | |
``` | |
- Install the lib | |
```bash | |
yaourt ncurses5-compat-libs | |
``` | |
- For virtual devices, you need `gcc-libs-multilib` | |
``` | |
yaourt gcc-libs-multilib | |
``` | |
- Confirm to replace the conflicting `gcc-libs` package if asked to | |
- Also for virtual devices you need `glxinfo`: | |
``` | |
yaourt glxinfo | |
``` | |
### VPN | |
- Install `openconnect` and `networkmanager-openconnect` | |
- Start connection in Terminal: | |
```bash | |
sudo openconnect vpn.hs-furtwangen.de | |
``` | |
### GPG Key | |
https://fedoraproject.org/wiki/Creating_GPG_Keys#Creating_GPG_Keys_Using_the_KDE_Desktop | |
### Google Drive | |
- Install and [setup](https://github.com/dsoprea/GDriveFS#usage) `gdrivefs` | |
```bash | |
yaourt gdrivefs | |
``` | |
- Use the network-manager [dispatcher service](https://wiki.archlinux.org/index.php/NetworkManager#Network_services_with_NetworkManager_dispatcher) to mount gdrivefs after internet connection is established | |
- Enable the service | |
```bash | |
systemctl enable NetworkManager-dispatcher.service | |
``` | |
- Create the script | |
```bash | |
touch /etc/NetworkManager/dispatcher.d/54-gdfs-mount.sh | |
chown root:root /etc/NetworkManager/dispatcher.d/54-gdfs-mount.sh | |
chmod 755 /etc/NetworkManager/dispatcher.d/54-gdfs-mount.sh | |
nano /etc/NetworkManager/dispatcher.d/54-gdfs-mount.sh | |
``` | |
```bash | |
#/bin/bash | |
echo "Works" > /home/rob/GDFS-TEST | |
date >> /home/rob/GDFS-TEST | |
mkdir -p /mnt/gdfs | |
gdfs -o allow_other /var/cache/gdfs.creds /mnt/gdfs | |
``` | |
- Restart `NetworkManager` (or reboot) | |
```bash | |
systemctl restart NetworkManager.service | |
``` | |
### KDE Wallet | |
Follow [this tutorial](https://wiki.archlinux.org/index.php/KDE_Wallet) | |
### Telegram | |
- Download it from the website and run it. | |
- On first startup it creates a folder at `~/.local/share/TelegramDesktop/` | |
## Apache Kafka | |
### Local | |
- Download latest release from https://github.com/apache/storm/releases | |
- Untar it to `/opt/storm` or similar and `chown` it | |
- Add directory to path by adding those lines to `~/.bashrc`: | |
``` | |
export PATH=/opt/storm/bin/:$PATH | |
``` | |
# Customizing | |
## Taskbar | |
### Icons only | |
- Right click task bar | |
- Choose `Alternatives...` | |
- Choose `Icon-only` | |
- Click `Change` | |
## Terminal | |
### Aliases | |
- Create new file `~/.bash-aliases` with following contents: | |
```bash | |
# Linux | |
ll='ls -lh' | |
lla='ll -a' | |
``` | |
- Include it in `~/.bashrc` | |
```bash | |
if [ -f ~/.bash-aliases ]; then | |
. ~/.bash-aliases | |
fi | |
``` | |
### Prompt | |
- Extend `~/.bashrc` by the following | |
```bash | |
# Prompt | |
gitbranch () { | |
if [ "$(git branch 2>&1 | cut -c1-5)" == "fatal" ]; then | |
echo "" | |
else | |
echo "[$(git rev-parse --abbrev-ref HEAD)]" | |
fi | |
} | |
PS1='[\u@\h \W]$(gitbranch)\$ ' | |
``` | |
- More options: https://wiki.ubuntuusers.de/Bash/Prompt/ | |
# Troubleshooter | |
## "A start job is running for ..." | |
- Appears on boot | |
- Likely is related to a [wrongly configured](https://bbs.archlinux.org/viewtopic.php?id=161814) `fstab` | |
- Resolve: | |
- Show all devices and their IDs: | |
``` | |
blkid | |
``` | |
- Update the `/etc/fstab` accordingly | |
- Check `/dev/` paths | |
- Check `UUID`s | |
- Check everything! | |
- Fix it | |
- Reboot | |
## Remove unneeded packages | |
https://bbs.archlinux.org/viewtopic.php?pid=690438 | |
``` | |
pacman -Rsn $(pacman -Qdtq) | |
``` | |
## No playback with Amarok | |
- Install optional dependency `gst-libav` | |
- Configure Phonon | |
- Amarok > Settings > Configure Amarok > Playback > Configure Phonon | |
## "Not in sudoers file" | |
- Probably used `usermod -g ... ...` instead of `usermod -aG ... ...` | |
- Readd to `wheel` group | |
``` | |
usermod -aG wheel | |
``` | |
- Reboot | |
## Telegram always starts on login | |
Clear the session [(Source)](http://askubuntu.com/a/890559/520586) | |
**KDE:** | |
- Open *System Settings* | |
- Open *Startup and Shutdown* | |
- Go to the *Desktop Session* tab | |
- Select *Start with an empty session* in the *On Login* area | |
- Logout and login again | |
## Fix `sudo` autocompletion | |
Add this to `~/.bashrc`[^sudoautocompletion]: | |
[^sudoautocompletion]: https://bbs.archlinux.org/viewtopic.php?id=45613 | |
``` | |
complete -cf sudo | |
``` | |
## Arduino not detected | |
- Check cable!!!! | |
- Check `lsusb` | |
- Check `dmesg -w` | |
- Check the cable again!!!!! | |
## Windows Dual Boot | |
Follow instructions in https://wiki.archlinux.de/title/UEFI_Installation | |
### Linux boot loader not showing up | |
http://www.rodsbooks.com/efi-bootloaders/installation.html#alternative-naming | |
https://bbs.archlinux.org/viewtopic.php?id=223304 | |
As root: | |
``` | |
bootctl install | |
mv /boot/EFI/Microsoft/Boot/bootmgf4.efi /boot/EFI/Microsoft/Boot/bootmgf4.efiBAK | |
mv /boot/EFI/systemd/boot_x64.efi /boot/EFI/Microsoft/Boot/. | |
mv /boot/EFI/Microsoft/Boot/boot_x64.efi /boot/EFI/Microsoft/Boot/bootmgf4.efi | |
``` | |
### Linux boot loader not showing Windows entry | |
> Written with [StackEdit](https://stackedit.io/). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment