Skip to content

Instantly share code, notes, and snippets.

@alemures
Last active September 3, 2024 15:30
Show Gist options
  • Save alemures/bb9625bb909b7ddf45c03e766359010e to your computer and use it in GitHub Desktop.
Save alemures/bb9625bb909b7ddf45c03e766359010e to your computer and use it in GitHub Desktop.
Debian installation and configuration for development

debian installation and configuration

Guide to install and configure a lightweight debian for development.

Create a bootable USB stick UEFI (from linux)

  • Download the most recent debian netinstall iso from debian.org
  • Identify your USB stick with lsblk, run sudo parted /dev/USB_DEVICE and type the following commands:
    • print free (to make sure it is your USB stick)
    • mktable gpt (recommended for UEFI)
    • quit
  • Write the iso into your USB stick sudo dd if=debian-VERSION-amd64-netinst.iso of=/dev/USB_DEVICE bs=4M && sync

Installation

Don't install any packages for installation.

Configuration

$ su root
# apt update
# apt upgrade
# apt install sudo bash-completion
# /usr/sbin/usermod -aG sudo YOUR_LOCAL_USER

Adding contrib, non-free and backports packages

Add contrib non-free at the end of every line in /etc/apt/sources.list then, create the file /etc/apt/sources.list.d/DISTRO_NAME-backports.list with the following content:

deb http://deb.debian.org/debian DISTRO_NAME-backports main contrib non-free

Finally run sudo apt update to update the list of available packages and sudo apt -t DISTRO_NAME-backports install PACKAGE_NAME.

Install firmware and cpu microcode

  • firmware-linux-free - Free linux firmware
  • firmware-linux-nonfree - Nonfree linux firmware
  • intel-microcode or amd64-microcode - Processor firmware

Install DM and DE

  • lightdm - Lightweight display manager
  • lxde-core - Basic LXDE desktop environment After that, restart the computer.

Common tools

  • lxterminal - Terminal emulator (preferred over termit)
  • gpicview - Image viewer
  • xarchiver - File archiver
  • lxappearance - LXDE GTK+ theme switcher
  • transmission - Lightweight BitTorrent client
  • gparted - Detect and manipulate devices and partition tables
    • In order to make it work from lxpanel, add gksu to the Exec command in /usr/share/applications/gparted.desktop
  • wicd - Network manager
  • blueman - Bluetooth manager
    • Requires bluetooth and pulseaudio-module-bluetooth, make sure it is loaded with pactl load-module module-bluetooth-discover

Web browser

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
>> If installation fails because of missing dependencies
$ sudo apt --fix-broken install

Theme and Font Rendering

Add to file ~/.config/fontconfig/fonts.conf the following content:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <match target="font">
    <edit mode="assign" name="rgba">
      <const>rgb</const>
    </edit>
  </match>
  <match target="font">
    <edit mode="assign" name="hinting">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit mode="assign" name="hintstyle">
      <const>hintslight</const>
    </edit>
  </match>
  <match target="font">
    <edit mode="assign" name="antialias">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>

This will enable subpixel-hinting and font-smoothing. Now just restart X.org (log out, then back in again).

Ubuntu font install:

$ sudo apt install fonts-ubuntu

Run git clone https://github.com/EliverLara/Ant-Dracula in ~/.themes, download the moka icons .deb from https://snwh.org/moka/download and install it with sudo dpkg -i <package>.deb and sudo apt install --fix-broken to install missing dependencies and finish the installation.

Open lxappearance and set the following configurations:

  • Widget Style: Ant-Dracula
  • Default font: Ubuntu Regular 10
  • Icon Theme: Moka

Open Openbox Configuration Manager and set the following configurations:

  • Theme: Nightmare
  • Appearance Fonts: Replace defaults by Ubuntu Bold and Ubuntu Regular

Install and configure lightweight compositor:

  • Run: sudo apt install compton
  • Create the configuration file ~/.config/compton/compton.conf with the following content:
# Shadow
shadow = true;
no-dock-shadow = false;
no-dnd-shadow = true;
clear-shadow = true;
shadow-radius = 4;
shadow-opacity = 0.6;
shadow-offset-x = -6;
shadow-offset-y = -6;

# Opacity
detect-rounded-corners = true;
detect-client-opacity = true;

# Fading
fading = true;
fade-delta = 3;
fade-in-step = 0.03;
fade-out-step = 0.05;

# Other
backend = "xrender";
vsync = "none";

# Reference: https://raw.githubusercontent.com/chjj/compton/master/compton.sample.conf
  • Run compton at startup in Main Menu/Preferences/Default applications for LXSession/autostart adding @compton --config /home/YOUR_LOCAL_USER/.config/compton/compton.conf

Download wallpaper from personal Google Drive and save it in home directory as .wallpaper.png.

Open Desktop Preferences then:

  • Appearance Text: Ubuntu Regular 10
  • Wallpaper: ~/.wallpaper.png

Secondary click on bottom panel (lxpanel) and select Panel Settings then:

  • Height: 30px height
  • Solid color: #000000 75 opacity
  • Remove desktops (remove them from obconf too)

Configure lxterminal adding following lines to ~/.config/lxterminal/lxterminal.conf:

fontname=Ubuntu Mono 11
scrollback=5000
bgcolor=#28282a2a3636
bgalpha=59110
fgcolor=#f8f8f8f8f2f2
palette_color_0=#000000000000
palette_color_1=#ffff55555555
palette_color_2=#5050fafa7b7b
palette_color_3=#f1f1fafa8c8c
palette_color_4=#bdbd9393f9f9
palette_color_5=#ffff7979c6c6
palette_color_6=#8b8be9e9fdfd
palette_color_7=#bfbfbfbfbfbf
palette_color_8=#4d4d4d4d4d4d
palette_color_9=#ffff6e6e6767
palette_color_10=#5a5af7f78e8e
palette_color_11=#f4f4f9f99d9d
palette_color_12=#cacaa9a9fafa
palette_color_13=#ffff9292d0d0
palette_color_14=#9a9aededfefe
palette_color_15=#e6e6e6e6e6e6
color_preset=Custom

Set bash history infinite setting the following variables in ~/.bashrc:

  • HISTSIZE=-1
  • HISTFILESIZE=-1

For any code editor set font Ubuntu Mono 11 and theme Dracula.

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