Skip to content

Instantly share code, notes, and snippets.

@NZX-DeSiGN
Last active October 3, 2020 21:31
Show Gist options
  • Save NZX-DeSiGN/8a319eda9ddc9afa58a99986cdc9efae to your computer and use it in GitHub Desktop.
Save NZX-DeSiGN/8a319eda9ddc9afa58a99986cdc9efae to your computer and use it in GitHub Desktop.
KDE Neon Dell XPS installation

Installation

Install KDE Neon from Live USB.

Kernel

Default kernel 5.3 installed cause unusual memory swap. To fix it use Liquorix kernel.

sudo add-apt-repository ppa:damentz/liquorix && sudo apt-get update
sudo apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64

Grub

Dell XPS 9550 generate BIOS ACPI errors, to prevent screen flashing when booting, edit Grub :

sudo nano /etc/default/grub

Add the following argument to GRUB_CMDLINE_LINUX_DEFAULT variable

loglevel=3

Update grub

sudo update-grub

Nvidia

Multi Monitors

Xsetup

Edit Xsetup

sudo nano /usr/share/sddm/scripts/Xsetup

And add the following configuration :

if xrandr | grep "HDMI-1 connected"; then
    xrandr
    xrandr --output eDP-1 --off
    xrandr --output HDMI-1 --off
    xrandr --output DP-1 --mode 2560x1440 --rate 165
    xrandr --output DP-2 --mode 2560x1440 --rate 165
fi

Grub (optionnal)

Edit Grub

sudo nano /etc/default/grub

Add the following argument to GRUB_CMDLINE_LINUX_DEFAULT variable

video=eDP-1:d

Update grub

sudo update-grub

Screen Manager

Remove KScreen configs

rm -rf ~/.local/share/kscreen/

Replace with Autorandr

Disable KScreen 2 service (in KDE services), install and configure autorandr :

sudo apt install autorandr
autorandr --save configName1
autorandr --save configName2

Numlock at startup

Edit sddm.conf

sudo nano /etc/sddm.conf

Add the following configuration

[General]
Numlock=on

Snapshots

Install Snapper

sudo apt install snapper

Create Snapper config for root subvolume

sudo snapper create-config /

Create a fresh install snapshot

sudo snapper create -d "Fresh install"

Install Snapper GUI

sudo apt-get install python3 libgtksourceview-3.0-1 gir1.2-gtksource-3.0 python3-dbus python3-setuptools
git clone https://github.com/ricardo-vieira/snapper-gui/
cd snapper-gui/
python3 setup.py install

Install Apt snapshot

sudo apt-get install apt-btrfs-snapshot python3-distutils

SSH key

Copy SSH key and check permissions

chmod 700 ~/.ssh && chmod 644 ~/.ssh/known_hosts && chmod 600 ~/.ssh/id_rsa && chmod 644 ~/.ssh/id_rsa.pub

Install softwares

  • Chromium (store)
  • VS Code (store)
  • Docker (below instructions)
  • Devilbox (below instructions)

Docker installation

! CHECK : moby/moby#27653 (comment)

! CHECK : https://gist.github.com/hopeseekr/cd2058e71d01deca5bae9f4e5a555440

sudo apt-get install curl apt-transport-https ca-certificates software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt update

apt-cache policy docker-ce

sudo apt install docker-ce docker-compose

sudo usermod -aG docker ${USER}

su - ${USER}

Devilbox

Installation

git clone https://github.com/cytopia/devilbox

cd devilbox

cp env-example .env

docker-compose up
docker-compose up -d

Configuration

Environnement (.env)

HTTPD_SERVER=apache-2.4
HOST_PORT_BIND=53
TLD_SUFFIX=test

Setup Auto DNS

Edit network manager config

sudo nano /etc/NetworkManager/NetworkManager.conf

Add following configuration variable

[main]
dns=none

Generate new resolv.conf and add Devilbox resolver

sudo rm /etc/resolv.conf
sudo service network-manager restart
sudo nano /etc/resolv.conf

Add the following content

# Devilbox Auto DNS
nameserver 127.0.0.1
# Router DNS
nameserver 192.168.2.1

Setup Mailhog

cp compose/docker-compose.override.yml-mailhog docker-compose.override.yml
cd cfg/php-ini-7.3
nano mailhog.ini

Put below configuration in mailhog.ini

[mail function]
sendmail_path = '/usr/local/bin/mhsendmail --smtp-addr="mailhog:1025"'

Setup SSL

To setup valid ssl certificats, you only need to import the Certificate Authority into your browser (here the instructions)

Start

# Run in foreground
docker-compose up bind httpd php mysql mailhog
# Run in background
docker-compose up -d bind httpd php mysql mailhog

Stop

docker-compose stop

Reset

docker-compose kill
docker-compose rm -f

KDE launcher shortcuts

To add start and stop KDE launcher shortcut, right click on KDE launche, click on edit applications and add the following shortcuts to start and stop Devilbox.

# Start command
cd ~/DEV/Devilbox && docker-compose up bind httpd php mysql mailhog
# Stop command
cd ~/DEV/Devilbox && docker-compose stop

VS Code

Installation

Install VS Code via your distro software manager.

Download cloud configuration

Use the Settings Sync extension to restore your VS Code configuration

PHP setup

Git setup

Wine

Install theme

sudo apt-get install wine-stable
download "Portable executable" from https://winscp.net/eng/download.php
wine WinSCP.exe
winecfg

Cli Tools

Validated

  • fasd : Quick access to recents files and directories
  • thefuck : Correct wrong previous command line
  • kmdr : Explain command lines
  • cheat.sh : Examples of command line tools
  • tldr : Examples of command line tools
  • pet : Simple command-line snippet manager
  • lnav : An advanced log file viewer
  • peco : Interactive filtering tool
  • exa : A modern replacement for ls
  • micro : Best cli text editor ever
  • ncdu : disk usage analyzer (find big folders)
  • bat : Modern cat command line with syntax colorization

Pending

  • ulauncher / Cerebro
  • snipline / cacher / cacher-cli / boostnote / Notion
  • restic (backup)
  • tig / lazygit
  • localtunnel
  • Mailspring
  • bleachbit / Stacer
  • Tilix / Guake / Yakuake
  • wine / playonlinux
  • sequeler
  • glances
  • z
  • rg
  • fkill :
  • zsh / zplug / zsh-completions / zsh-you-should-use
  • realpath
  • fpp
  • fd
  • drawio
  • grub-customizer

Check this :

https://hackernoon.com/macbook-my-command-line-utilities-f8a121c3b019

https://github.com/brpaz/my-linux-setup

https://dev.to/_darrenburns/10-tools-to-power-up-your-command-line-4id4

https://gist.github.com/s41m0n/323513c95290c85f7054384ac34c41c5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment