# My Ubuntu Configuration (Dell XPS)
WARNING: This configuration is outdated
## TODO
- Refresh rate to 120hz
- Multiscreen
- Backups
- HD audio
- google drive
- config souris
- Get icons working for eza (ls replacement): https://github.com/lsd-rs/lsd/issues/382
- Copy bash functions from Omarchy: https://github.com/basecamp/omarchy/blob/master/default/bash/functions
## Utility commands
- list installed packages
- apt list –installed
- sudo dpkg –get-selections
- cleanup unused
- sudo apt autoremove
- update sdks
- sdk upgrade
- primeselect
- switch between nvidia and intel GPU (for power saving)
- sudo prime-select intel | nvidia
- nvidia-smi: info about GPU
## Base install
Before install:
- BIOS: AHCI for HDD
During OS install:
- x64 desktop edition
- Keyboard: Belgian
- English
- Connect to WiFi
- Enable updates and third-party packages
- Enable Secure Boot
- Encrypt whole disk
## CloudStation
- download from Synology
- install (deb)
- sync /homes/Sebastien/CloudStation/Linux to /home/sebastien/ (whole home folder!)
## Once installed
- Google Chrome
- KeePassXC: `sudo snap install keepassxc`
- Settings > Accounts
- Connect Google
- Update everything: sudo apt-get update && sudo apt-get install
- Add French language
- Set regional formats to Français
- CloudStation and let sync files
## Dell XPS specific
Power management:
```
* sudo apt-get update
* sudo apt-get install tlp tlp-rdw powertop
* sudo tlp start
* sudo powertop --auto-tune
* Disable LID close detection
- sudo apt-get install gnome-tweaks
- sudo nano /etc/systemd/logind.conf
- Set HandleLidSwitch=lock
- Reboot
- Reference: <https://askubuntu.com/questions/972169/ubuntu-17-10-and-later-dont-suspend-when-lid-is-closed-just-lock-screen/972177#972177>
```
Nvidia drivers:
- nvidia drivers for GTX 1050 Ti mobile
- sudo add-apt-repository ppa:graphics-drivers/ppa
- sudo apt-get update
- sudo apt install nvidia-common
- sudo ubuntu-drivers autoinstall
- select driver through Software & Updates app
- ref: [https://askubuntu.com/questions/1078964/driver-for-ubuntu-18-04-lts-that-supports-gtx-1050-ti-graphics-card](https://askubuntu.com/questions/1078964/driver-for-ubuntu-18-04-lts-that-supports-gtx-1050-ti-graphics-card)
- display
- Resolution: 1680x1050
- Refresh rate: 120hz!
Grub config for stability and performances
- change Grub config: nano /etc/default/grub
- change the GRUB_CMDLINE_LINUX_DEFAULT line to
- GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash acpi_rev_override=1 acpi_osi=Linux scsi_mod.use_blk_mq=1 mem_sleep_default=deep”
- Bonus options to disable Spectre/Meltdown protections and boost performances
- spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier
- make the Grub changes effective: sudo update-grub2
Smart card reader
- scdaemon: smart card
- sudo apt install scdaemon
For the rest, followed:
- [https://github.com/JackHack96/dell-xps-9570-ubuntu-respin/blob/master/xps-tweaks.sh](https://github.com/JackHack96/dell-xps-9570-ubuntu-respin/blob/master/xps-tweaks.sh)
- [https://github.com/JackHack96/dell-xps-9570-ubuntu-respin](https://github.com/JackHack96/dell-xps-9570-ubuntu-respin)
High quality audio
```
* PulseAudio config listed here: <https://github.com/JackHack96/dell-xps-9570-ubuntu-respin/blob/master/xps-tweaks.sh>
* Also adapted Pulse config to have 7.1 sound
* <https://askubuntu.com/questions/491626/surround-sound-on-ubuntu-14-04-with-logitech-g430>
* default-sample-channels = 8
* default-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
```
Bose 700
- Installed Blueman: sudo apt-get install blueman
- Disabled BTLE (not well supported)
- Created /etc/bluetooth/audio.conf with following contents:
[General] Disable=Socket #Disable=Headset Enable=Media,Source,Sink,Gateway AutoConnect=true load-module module-switch-on-connect
Reference: [https://pandasauce.org/post/bluetooth-on-linux/](https://pandasauce.org/post/bluetooth-on-linux/)
Intel tweaks
- sudo su
- echo “options i915 enable_fbc=1 enable_guc_loading=1 enable_guc_submission=1 disable_power_well=0 fastboot=1” > /etc/modprobe.d/i915.conf
Let users check fan speed with lm-sensors
```
* sudo su
* echo "options dell-smm-hwmon restricted=0 force=1" > /etc/modprobe.d/dell-smm-hwmon.conf
* echo "dell-smm-hwmon" >> /etc/modules
* update-initramfs -u
```
Touchpad
- make right click normal: [https://itsfoss.com/fix-right-click-touchpad-ubuntu/](https://itsfoss.com/fix-right-click-touchpad-ubuntu/)
- sudo apt install gnome-tweaks
- launch “tweaks”
- adapt config in mouse settings
- disable three-finger middle click: [https://superuser.com/questions/1300966/touch-pad-usage-will-randomly-copy-paste-text-from-the-screen](https://superuser.com/questions/1300966/touch-pad-usage-will-randomly-copy-paste-text-from-the-screen)
RDP:
- sudo apt-get install xrdp
- sudo systemctl enable xrdp
Multi-screen
- coverflow alt-tab
- multi monitors add-on
- alt-tab switcher popup delay removal
Streaming
- Installed OBS Studio: [https://obsproject.com/wiki/install-instructions#linux](https://obsproject.com/wiki/install-instructions#linux)
## Backups
Followed: [https://silica.io/using-ssh-key-authentification-on-a-synology-nas-for-remote-rsync-backups/](https://silica.io/using-ssh-key-authentification-on-a-synology-nas-for-remote-rsync-backups/)
- Created an SSH keypair (attachment in Keepass for backups_rsync account!) on Dell XPS 15
- Added the public key to the backups_rsync authorized ssh keys (/volume1/homes/backups_rsync/.ssh/authorized_keys)
- Checked the permissions for backups_rsync home folder, .ssh and .ssh/authorized_keys
- Added backups_rsync to the admins group temporarily, connected using ssh (ssh -i ~/.ssh/…) so that the host key was added, then removed backups_rsync from the group
- The account now has rsync access over ssh and the keys are backed-up in keepass
- Created a backup script ~/scripts on Dell XPS
- should be synchronized by cloudstation
On the nas:
- /volume5/backups_5/dellxps15/system
- /volume5/backups_5/dellxps15/home
- Hyper Backup task “Backup Dell XPS files” that
- copies backups to /volume4/backups_4/dellxps15/
- takes care of files rotation there
- runs every 2 days
On the laptop: a few scripts
- ~/scripts/backup_system.sh: backup everything except /home
- ~/scripts/backup_home.sh: backup /home
- ~/scripts/backup.sh: runs the other two
- ~/scripts/backup_timeshift.sf: backup locally (to USB)
On the laptop: a few scripts to trigger backups easily
- backup: rsync system and home data to NAS
- backuplocal: timeshift to USB disk
Next to those, two text files to configure files and folders to ignore.
## DNS @ Home
Had to add NAS DNS server because resolution of “tnt.local” names would not work.
- sudo nano /etc/systemd/resolved.conf
- added FallbackDNS=192.168.0.120
- added Domains=.tnt.local
- sudo cp /etc/resolv.conf /etc/resolv.conf.backup
- sudo rm /etc/resolv.conf
- sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
- reboot
References:
- [https://jlk.fjfi.cvut.cz/arch/manpages/man/resolved.conf.5](https://jlk.fjfi.cvut.cz/arch/manpages/man/resolved.conf.5)
- [https://wiki.archlinux.org/index.php/Systemd-resolved](https://wiki.archlinux.org/index.php/Systemd-resolved)
## Swap file
- sudo fallocate -l 6G /swapfile
- sudo chmod 600 /swapfile
- sudo mkswap /swapfile
- sudo swapon /swapfile
- sudo nano /etc/fstab
- /swapfile swap swap defaults 0 0
- sudo swapon –show
- sudo sysctl vm.swappiness=10
- sudo nano /etc/sysctl.conf
- vm.swappiness=10
References:
- [https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/](https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/)
- [https://help.ubuntu.com/community/SwapFaq](https://help.ubuntu.com/community/SwapFaq)
## System tools
- increase the max number of file system watchers
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- allow apt to fetch over https
- sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
- Synaptic package manager
- net tools: to get ifconfig and the like
- sudo apt install net-tools
- Unity Tweak Tool
- sudo apt-get install notify-osd unity-tweak-tool
- puis exécuter la commande unity-tweak-tool
- homebrew
- /bin/bash -c “$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))”
- echo 'eval “$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)”' » /home/sebastien/.profile
- eval “$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)”
- Reference: [https://linux.how2shout.com/how-to-install-brew-ubuntu-20-04-lts-linux/](https://linux.how2shout.com/how-to-install-brew-ubuntu-20-04-lts-linux/)
- unrar
- unzip
- zip
- vim
- nano
- curl
- gdebi: package manager (install local deb files)
- codecs
- sudo apt install ubuntu-restricted-extras va-driver-all vainfo libva2 gstreamer1.0-libav gstreamer1.0-vaapi
- dvd playback (support for encrypted dvds)
- sudo apt-get install libdvd-pkg
- make
- sudo apt install make
- gcc and all
- sudo apt install build-essential
- autojump
- sudo apt install autojump
- gparted: partition manager
- stacer: system info
- sudo add-apt-repository ppa:oguzhaninan/stacer
- sudo apt-get update
- sudo apt install stacer
- [https://github.com/oguzhaninan/Stacer](https://github.com/oguzhaninan/Stacer)
- grsync: gui for rsync
- duplicity: for backups
- 7-zip
- sudo apt install p7zip-full
- ark: archive manager
- sudo apt install ark
- ufw: firewall
- gufw: gui for the firewall
- neofetch: system info
- sudo apt install neofetch
- [https://github.com/dylanaraps/neofetch/wiki/Installation](https://github.com/dylanaraps/neofetch/wiki/Installation)
- fslint: file system checks
- sudo snap install fslint-unofficial
- bleachbit: cleaner
- tmux
- sudo apt install tmux
- hack font
- sudo apt install fonts-hack-ttf
- firacode font ([https://github.com/tonsky/FiraCode/wiki/Linux-instructions#installing-with-a-package-manager](https://github.com/tonsky/FiraCode/wiki/Linux-instructions#installing-with-a-package-manager))
- sudo apt install fonts-firacode
- notepadqq: notepad++ clone
- sudo apt install notepadqq
- replace default text editor by notepadqq
- sudo sed -i 's/gedit/notepadqq/' /usr/share/applications/defaults.list
- Timeshift: system snapshots
- sudo apt-add-repository -y ppa:teejee2008/ppa
- sudo apt-get update
- sudo apt-get install timeshift
- [https://itsfoss.com/backup-restore-linux-timeshift/](https://itsfoss.com/backup-restore-linux-timeshift/)
- Startup applications preferences
- Software and updates: clean sources and adapt config
- dconf-editor
- sudo apt-get install dconf-editor
- useful to configure UI stuff :)
- sudo apt-get install compizconfig-settings-manager
- useful to configure UI stuff :)
- sudo apt-get install traceroute
- peco: quickly search better than grep: [https://github.com/peco/peco](https://github.com/peco/peco)
- sudo snap install peco
- hashalot: hashing algorithms on the command-line (e.g., sha512)
- sudo apt install hashalot
- thefuck: easily correct wrong commands: [https://github.com/nvbn/thefuck](https://github.com/nvbn/thefuck)
- sudo apt update
- sudo apt install python3-dev python3-pip python3-setuptools thefuck
- grc: colorizer for the console: [https://www.howtoinstall.co/en/ubuntu/trusty/grc](https://www.howtoinstall.co/en/ubuntu/trusty/grc)
- sudo apt install grc
- lazygit: [https://github.com/jesseduffield/lazygit](https://github.com/jesseduffield/lazygit)
- httpie
- sudo apt install httpie
- postgresql admin: [https://www.tecmint.com/install-postgresql-and-pgadmin-in-ubuntu/](https://www.tecmint.com/install-postgresql-and-pgadmin-in-ubuntu/)
- fd
- sudo apt install fd-find
- webp
- sudo apt install webp
- fzf
- sudo apt install fzf
- zoxide (cd replacement)
- sudo apt install zoxide
- eza (ls replacement)
- cargo install eza
- atuin (better history)
- https://github.com/atuinsh/atuin
- ripgrep
- sudo apt install ripgrep
### Small fixes
- Alt+1 … not working
- due to default modifier for mouse: [https://askubuntu.com/questions/521423/how-can-i-disable-altclick-window-dragging](https://askubuntu.com/questions/521423/how-can-i-disable-altclick-window-dragging)
- fixed with: dconf write /org/gnome/desktop/wm/preferences/mouse-button-modifier `<Shift><Control><Alt><Super>Button20`
- just sets an impossible shortcut instead of `<Alt>`
-
- Alt tab not switching between windows (not needed with Ubuntu 22.04+
- [https://askubuntu.com/questions/1036248/how-to-separate-opened-windows-in-alttab-switcher-in-ubuntu-18-04](https://askubuntu.com/questions/1036248/how-to-separate-opened-windows-in-alttab-switcher-in-ubuntu-18-04)
### ZSH Shell
- sudo apt-get install zsh zsh-syntax-highlighting zsh-autosuggestions
- sh -c "$(curl -fsSL [https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh](https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh))"
- Replace bash
## Apps
- Spotify: snap install spotify
- Terminator: cool terminal
- sudo apt install terminator
- use Hack font
- Tilda: cooler terminal
- sudo apt install tilda
- also use Hack font
- Yakuake: cool terminal
- sudo apt install yakuake
- FileZilla: ftp
- sudo apt install filezilla
- Kile: LaTeX
- sudo apt install kile
- Okular: PDF viewer
- sudo apt install okular
- Slack
- `sudo snap install slack`
- Remmina: Remote Desktop client
- sudo apt install remmina
- Wireshark: network analysis
- sudo apt install wireshark
- nmap: network mapping
- sudo apt install nmap
- VLC: videos
- sudo apt install vlc
- gimp: image editor
- sudo apt install gimp
- discord: voice chat
- sudo snap install discord
- clementine: music
- sudo apt install clementine
- kazam: screen recorder
- sudo apt install kazam
- shutter: screenshots
- sudo apt install shutter
- Florence Virtual keyboard: virtual keyboard
- ClamTk: antivirus
- sudo apt install clamtk
- added exclusions for wks and wksData directories
- audacity: audio recorder
- sudo apt install audacity
- qBittorent: torrent
- sudo apt install qbittorrent
- WinFF: video converter (gui for avconv)
- sudo apt install winff
- deluge: torrent
- sudo apt install deluge
- inkscape: vector graphics
- sudo apt install inkscape
- youtube-dl: youtube video downloader
- sudo apt install youtube-dl
- gydl: gui for youtube-dl
- sudo snap install gydl
- cheese: webcam gui
- sudo apt install cheese
- weather
- sudo apt install gnome-weather
- Telegram: instant messaging
- sudo snap install telegram
- f.lux
- [https://doc.ubuntu-fr.org/f.lux](https://doc.ubuntu-fr.org/f.lux)
- sudo snap install —edge fluxgui
- cmatrix: matrix on the shell yay!
- sudo apt-get install cmatrix
- freeplane: mind mapping (freemind replacement)
- sudo apt-get install freeplane
- autokey: program keyboard shortcuts
- sudo add-apt-repository ppa:sporkwitch/autokey
- sudo apt update
- sudo apt install autokey-gtk
- google drive
- [https://doc.ubuntu-fr.org/google_drive](https://doc.ubuntu-fr.org/google_drive)
- sudo snap install drive
- drive init ~/GDrive
- drive pull
- alternative: open drive
- fbreader: for epub
- sudo apt install fbreader
- syncthing
- [https://apt.syncthing.net/](https://apt.syncthing.net/)
## Dev
- git
- sudo apt-get install git
- go
- sudo snap install go –classic
- OR
- [https://gist.github.com/RenEvo/fad4db582b4f0edb9ecb767dec689474](https://gist.github.com/RenEvo/fad4db582b4f0edb9ecb767dec689474)
- php
- sudo apt install php php-cli composer
- ruby
- sudo apt install ruby-full rubygems autogen autoconf libtool make
- asciidoctor
- sudo apt install asciidoctor
- kdiff3
- sudo apt install kdiff3
- GitKraken: git client
- sudo snap install gitkraken —classic
- sdkman
- curl -s “[](https://get.sdkman.io/)[https://get.sdkman.io](https://get.sdkman.io)” | bash
- source “$HOME/.sdkman/bin/sdkman-init.sh”
- [https://sdkman.io/](https://sdkman.io/)
- JDK
- sdk install java 17-open (or more recent!)
- older: sudo apt install default-jdk
- maven
- sdk install maven
- gradle
- sdk install gradle
- kotlin
- sdk install kotlin
- nvm: [https://github.com/creationix/nvm](https://github.com/creationix/nvm)
- nvm install node
- nvm use node
- Added script to zsh config to automatically call nvm use when in a folder with a .npmrc file
- [https://github.com/nvm-sh/nvm#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file](https://github.com/nvm-sh/nvm#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file)
- volta (nvm alternative)
- `curl <https://get.volta.sh> | bash`
- kleopatra
- sudo apt install kleopatra
- pip
- curl -O [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py)
- sudo python3 [get-pip.py](http://get-pip.py) –user
- pyenv:
- [https://github.com/pyenv/pyenv-installer](https://github.com/pyenv/pyenv-installer)
- also requires: sudo apt-get install libssl-dev libbz2-dev libsqlite3-dev libreadline-dev
- AWS CLI
- pip install awscli –upgrade –user
- Visual Studio Code
- download from official website
- install settings sync extension
- add github token to be able to create/read gists
- IntelliJ
- sudo snap install intellij-idea-ultimate —classic
- adapt bash profile
- install libcanberra (necessary)
- sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
- hub
- sudo apt-get install hub
- [https://github.com/github/hub](https://github.com/github/hub)
- poedit: translation files
- sudo apt-get install poedit
- visual paradigm community edition
- [https://www.visual-paradigm.com/support/documents/vpuserguide/12/14/6043_linuxandunix.html](https://www.visual-paradigm.com/support/documents/vpuserguide/12/14/6043_linuxandunix.html)
- uncompress and put in ~/
- added an alias: alias visualparadigm='~/Visual_Paradim…/Visual_Paradigm'
- added another alias: alias vp='visualparadigm'
- mongo tools
- sudo apt install mongo-tools
- python conda (prefer pyenv!)
- [https://askubuntu.com/questions/615700/install-miniconda-python-2-7](https://askubuntu.com/questions/615700/install-miniconda-python-2-7)
- wget [https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh](https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh) -O ~/miniconda.sh
- bash ~/miniconda.sh -b -p ~/miniconda
- postgresql
- client
- sudo apt-get install postgresql-client-common postgresql-client-10
- pgadmin
- sudo apt-get install pgadmin4
Global NPM packages:
- yarn
- ndb: node debug with Chrome dev tools
- forever
- spoof: spoof mac
- vtop: visual top
- create-react-library
- yo
- @angular/cli
- prettier
- standard
- fkill
- branch-diff
- center-code
- http-server
- browser-sync
- cowsay
- nodemon
- node-inspector
- NOT installed on Ubuntu: node-gyp fails…
npm config (~/.npmrc)
```markdown
init-license = "MIT"
init-version = "1.0.0"
init-author-url= <https://dsebastien.net>
;================================================
; Global file
;================================================
; registry used by npm to download packages
; registry = ${NPM_REGISTRY_URL}
; heading displayed at the start of debugging log output (useful to identify if our standard configuration is used)
heading=npm_SEB
; do not try to install optional dependencies by default
omit=optional
; no SSL key validation when making requests to the registry via https.
strict-ssl=true
; do not send metrics in case of failure
send-metrics=false
; disable strict peerDependencies, needed for npm 6 compatibility
legacy-peer-deps=true
```
### Docker
Docker CE:
- follow instructions: [https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1)
- allow non-root to use docker
- sudo usermod -aG docker $USER
- run docker at startup
- sudo systemctl enable docker
- sudo nano /etc/docker/daemon.json
- follow steps here: : [https://docs.docker.com/install/linux/linux-postinstall/](https://docs.docker.com/install/linux/linux-postinstall/)
- configure DNS servers for docker
- use a tcp socket instead of a unix socket
- in bash profile, added the DOCKER_HOST environment variable
- [https://stackoverflow.com/questions/26561963/how-to-detect-a-docker-daemon-port](https://stackoverflow.com/questions/26561963/how-to-detect-a-docker-daemon-port)
Docker machine:
```
base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine
```
Adapt to use latest release: [https://github.com/docker/machine/releases/](https://github.com/docker/machine/releases/)
Kubernetes tools
```
sudo su
apt-get update && apt-get install -y apt-transport-https curl
curl -s <https://packages.cloud.google.com/apt/doc/apt-key.gpg> | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb <https://apt.kubernetes.io/> kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
```
1. > Now (2019-12-18): using minikube and not the above anymore
Kompose:
- curl -L [https://github.com/kubernetes/kompose/releases/download/v1.18.0/kompose-linux-amd64](https://github.com/kubernetes/kompose/releases/download/v1.18.0/kompose-linux-amd64) -o kompose
- chmod 777 kompose
- sudo mv kompose /usr/bin/
Helm:
- curl [https://baltocdn.com/helm/signing.asc](https://baltocdn.com/helm/signing.asc) | sudo apt-key add -
- sudo apt-get install apt-transport-https –yes
- echo “deb [https://baltocdn.com/helm/stable/debian/](https://baltocdn.com/helm/stable/debian/) all main” | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
- sudo apt-get update
- sudo apt-get install helm
Telepresence
- [https://www.telepresence.io/reference/install](https://www.telepresence.io/reference/install)
Kitematic
- download and install: [https://github.com/docker/kitematic/releases](https://github.com/docker/kitematic/releases)
UFW configuration for docker:
```
* followed <https://svenv.nl/unixandlinux/dockerufw/>
* sudo nano /etc/default/ufw
* set DEFAULT_FORWARD_POLICY="ACCEPT"
* reloaded ufw with sudo ufw reload
```
Kubernetes
- LXD (not used anymore)
- sudo apt-get install lxd
- sudo lxd init
- default settings
- creates a bridge: lxdbr0
- disabled IPv6: [https://docs.conjure-up.io/stable/en/troubleshoot#common-problems](https://docs.conjure-up.io/stable/en/troubleshoot#common-problems)
- sudo lxc network set lxdbr0 ipv6.nat false
- sudo lxc network set lxdbr0 ipv6.address none
- add my user to lxd group
- sudo usermod -a -G lxd $USER
- newgroup lxd
- Kubernetes via conjure-up
- sudo snap install conjure-up –classic
- conjure-up kubernetes
- installed microk8s
- below not used right now
- Helm: [https://github.com/helm/helm/releases](https://github.com/helm/helm/releases)
- 2.13.1
- Github token: ff6eee61d86470a02185736539c42ee56f2ff492
- gave myself access without sudo: sudo usermod -a -G microk8s sebastien
- exported the config to use kubectl
- microk8s.kubectl config view –raw > $HOME/.kube/config
- enabled microk8s plugins
- microk8s.enable dns dashboard prometheus fluentd registry
- full list: [https://microk8s.io/docs/](https://microk8s.io/docs/)
- added rule for ufw
- sudo ufw allow in on cbr0 && sudo ufw allow out on cbr0
- sudo ufw default allow routed
- oops :)
- dashboard URL
- microk8s.kubectl get all –all-namespaces |grep kubernetes-dashboard | grep ClusterIP
- go there with HTTPS
- skip for auth :)
- got admin password using
- kubectl config view
- commands
- microk8s.status
- microk8s.kubectl get nodes
- microk8s kubectl get services
- microk8s.kubectl cluster-info
- get URLs
- microk8s.stop
- microk8s.start
- microk8s.reset
- kubectl get all –all-namespaces
- microk8s.inspect
Minikube (alternative k8s):
- install virtualbox
- curl -Lo minikube [https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64](https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64) \
&& chmod +x minikube
- sudo cp minikube /usr/local/bin && rm minikube
- minikube start
Kubectl
- sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg [https://packages.cloud.google.com/apt/doc/apt-key.gpg](https://packages.cloud.google.com/apt/doc/apt-key.gpg)
- echo “deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] [https://apt.kubernetes.io/](https://apt.kubernetes.io/) kubernetes-xenial main” | sudo tee /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
Kubectx and kubens
- brew install kubectx
- OLD: installed manually: [https://github.com/ahmetb/kubectx](https://github.com/ahmetb/kubectx)
Skaffold: [https://skaffold.dev/docs/getting-started/#installing-skaffold](https://skaffold.dev/docs/getting-started/#installing-skaffold)
- brew install skaffold
Dive: [https://github.com/wagoodman/dive](https://github.com/wagoodman/dive)
- brew install dive
DigitalOcean CLI
- brew install doctl
Mkcert
- brew install mkcert
## Logitech Anywhere 2S Mouse
- to view battery etc
- sudo apt -y install solaar
- to map keys
- sudo apt -y install xautomation xbindkeys xbindkeys-config
- xev | tee mouse.log
- then in the window, click in order on the buttons of the mouse that needs to be re-mapped
- then close dans look in mouse.log for “MousePress” entries
- for each of those, take note of the state (0x…) and of the button (e.g., 6)
- then follow the article to map the keys in ~/.xbindkeysrc
- also possible to use xbindkeys-config to configure keys using a GUI
- actually can also remap to any other key/mouse action using xdotool
- sudo apt instal xdotool
- then add /usr/bin/xbindkeys to the startup programs list
- hciconfig: utility to manage bluetoothe devices
- xbindkeys -n to debug
References:
- [https://blog.onee3.org/2016/09/how-to-get-logitech-mx-anywhere-2-to-work-with-ubuntu/](https://blog.onee3.org/2016/09/how-to-get-logitech-mx-anywhere-2-to-work-with-ubuntu/)
## Second screen resolution
Was showing up with 1024×768
- first, find the modeline to add for the resolution
- cvt -r 1680 1050
- example result 1680×1050 59.88 Hz (CVT 1.76MA-R) hsync: 64.67 kHz; pclk: 119.00 MHz
Modeline “1680x1050R” 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync
- then, add the modeline
- xrandr –newmode “1680x1050_60.00” 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
- then find the output name
- xrandr
- then, add the mode to the output
- xrandr –addmode DP-1-2 1680x1050_60.00
- then change through the display settings
- reference: [https://askubuntu.com/questions/73007/cant-set-a-higher-screen-resolution-in-a-external-display-in-a-dell-mini-10v-la](https://askubuntu.com/questions/73007/cant-set-a-higher-screen-resolution-in-a-external-display-in-a-dell-mini-10v-la)
Current config:
## Center mouse button (left click) “xte 'mouseclick 2'”
```
m:0x0 + b:6
```
## Center mouse button (right click) “xte 'mouseclick 2'”
```
m:0x0 + b:7
```
## Others
- `gThumb: picture management`
- sudo apt install gthumb
## Unused
- rambox: productivity
- sudo snap install rambox
- sshpass: useful for rsync backups: pass a password if needed (better to use SSH instead)
- conky: system info
- [https://doc.ubuntu-fr.org/conky](https://doc.ubuntu-fr.org/conky)
- freefilesync
- [https://doc.ubuntu-fr.org/freefilesync](https://doc.ubuntu-fr.org/freefilesync)
- brasero: CD/DVD burner
- etcher: image writer (usb)
- [https://doc.ubuntu-fr.org/etcher](https://doc.ubuntu-fr.org/etcher)
- cloc: [https://packages.ubuntu.com/search?keywords=cloc](https://packages.ubuntu.com/search?keywords=cloc)