Debian + LXDE Installation

Bullseye Alpha3 Install

Debian 11 Bullseye Alpha 1 / 3

These are notes from an initial installation of Debian 11 (Bullseye) Alpha 1 from 2019-11-30, and A new reinstall using Alpha 3 from 2020-12-20.

This is meant as the daily driver on an Intel NUC6CAYH, which is a four core celeron with 8gb of ram and a 256gb ssd. This device is 2.5 years old currently (early 2021).

It is fine for general purpose / office / Internet work, and the combination of Debian testing and LXDE makes it great for the computing resources available.

Why Debian

The choice of an upstream source comes down to three options when one wants a fairly robust ecosystem of applications and community:

  • Redhat/CentOS/Fedora/Amazon/Oracle/etc.
  • Debian/Ubuntu/Linux Mint/etc.
  • Arch/Manjaro/etc.

A fourth option is SUSE (more widely used in the German-speaking market). Note that OpenSUSE is an independent distribution, but uses RPM package management

For the English-speaking market, it really comes down to an RPM vs. DEB distribution system, unless one wants a masochistic Arch-based distribution.

Another option besides the main source distributions (which come down to Debian vs. Fedora). Sticking with Vanilla Debian (stable or testing) or CentOS/Fedora makes the most sense unless there are reasons for a vendor version.

Ubuntu is another option, but the Ubuntu community has a higher noise-to-signal ratio than Debian, and as a vanilla distribution one is closer to the source project.

Why Debian Testing

There are several reasons for testing, the main two is that testing is more stable than unstable, and is more up-to-date than stable. It is a good compromise between functionality and stability (for those with the patience and enough experience dealing with Linux). There are security issues with testing, as patches are not done by the security team. Also, bugs can and do get through the vetting to testing.

Debian Stable (+backports) on servers, Debian Testing on desktops

Why Openbox and LXDE/LXQT

LXDE/LXQT is probably the most popular lean desktop, though XFCE also has adherents. Eventually LXQT will supplant LXDE, and already has on distributions like Lubuntu and Sparky Linux. LXDE/LXQT is possibly the most lightweight of mainstream desktop environments.

For those who don't cotton onto the looks or features of XFCE, then LXDE/LXQT is a decent alternative. It uses Openbox as a window manager and can be run with or without a composter. The LXDE/LXQT components use few resources and are modular. One can easily swap out the default applications including the PCManFM file manager.

Installation media

Linux Kernel Versions

  • Debian tracker for the linux kernel
  • uname -r for linux version running
  • apt-cache search linux-image for what versions are available in the repositories
  • Select additional options on Debian bootup to choose between linux kernel versions

Contents

  • Installation media
  • Installation steps
  • Accounts and security
  • Apt repositories, update, upgrade
  • Printers and scanners
  • Configuring Openbox and LXDE
  • Software to remove
  • Software to install
    • By apt repository
    • By deb installation
    • By directory unzip and move
    • By appimage
  • Volume audio sound control

Installation steps

The standard Debian installation steps need not be delineated. The main things:

  • Single partition for nearly all of the disk
  • 8gb cache partition
  • Debian desktop + LXDE
  • Create user and admin accounts on install

Grub bootloader

Can edit with:

sudo cp /etc/default/grub /etc/default/grub.bak
sudo nano /etc/default/grub
sudo update-grub

Note that to take a previous linux version, use as in quotes in the file: /boot/grub/grub.cfg and select the menu items (submenus with >).

Currently, running the latest testing, but with an earlier kernel, as in:

GRUB_DEFAULT='Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 5.3.0-2-amd64'

Accounts and security

  • Username, password, sudoers
  • Run the command to add user to sudo
    • sudo usermod -aG sudo
    • Add the following using sudo visudo username ALL=(ALL) NOPASSWD: ALL
  • Install various utilities:
su
apt install -y sudo
exit

Update and upgrade installation

These can be regularly run as a script (~/scripts/up), though it is important to inspect what will be done (sometimes valuable resources are removed inadvertantly)

sudo apt update
sudo apt upgrade
sudo apt autoremove

Note that aptitude can be better in some cases. Important to include this and learn better how to use it.

Apps to install from apt

sudo apt install -y git curl wget gdebi htop keepassxc openvpn thunar autossh inkscape filezilla calibre audacity npm nemo praat gramps pdfchain syncthing libreoffice dconf-editor fortune cowsay ttf-mscorefonts-installer scribus chromium qt5-style-plugins mpv aptitude hsetroot software-properties-common ncdu liferea shotcut firmware-linux libatk-adaptor libgail-common lxsession-default-apps task-lxde-desktop lxde hardinfo net-tools

For more about lxde apps see http://www.lxlinux.com/indexold.html it is still unclear what all should be explicitly installed.

Log files

There are a variety of basic utilities for various log file viewing. Goaccess (install with apt) is a nice utility for access file viewing. See also the goaccess github repository.

With goaccess need to know what the format is for the log file one wants to view. Also, need to use sudo.

Some basic commands:

  • sudo dmesg tells about boot (instead of boot log)
  • sudo journalctl -p 4 only warnings, errors, etc.
  • uname -r version of linux

KeepassXC

Available through apt or from the github repository (for the latest). Note that gtk-2 themes are not inherited by default which means KeepassXC does not adopt the system theme, until one can:

  • Install Qt5 toolkit:
    • sudo apt install qt5ct
  • Restart / relogin
  • Set preferences under Menu > Preferences > Qt5 Preferences > Appearance:
    • Style = gtk2
    • Standard dialogs = GTK2
    • Palette = Default

Also set button style: icon only to get a search bar up top and reduce some clutter.

NPM apps

Currently I only install and use a single NPM application, the fantastic command line somafm radio player:

sudo npm i npm@latest -g
sudo npm install --global somafm

I've got scripts to run groove and groove2.

Apps requiring download from elsewhere

Unfortunately not everything is available in apt repositories. I tend to prefer .deb files as they are easy to install with either gdebi (gui or command line) or apt itself. On occasion an appimage is used, but I avoid snap and flatpak which are way too heavy-duty and can consume a huge amount of drive space if one is not paying attention. I also avoid compiling myself, as that is a waste of time if a binary is available.

  • apt first,
  • deb second,
  • unzip and move directory third,
  • appimage fourth, and
  • flatpak and snap, not at all.

Visual Studio Code editor

Install Visual Studio Code .deb file.

Preferences themes

  • Color theme: Solarized dark
  • File icon theme: Material icon (see below, listed as an extension)

Settings

  • Font size: 15
  • Font family: 'Hack', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'
  • Note: ctrl+ to increase overall font size (including sidebar)
  • Tab size 4
  • Word Wrap: on
  • Line numbers: on
  • Auto Save: afterDelay, 10000ms
  • Insert Spaces: true
  • Window:Title: ${dirty}${activeEditorLong}
  • Git:Enabled: false (uncheck)

VSCode Extensions

  • pkief.material-icon-theme Material icon theme
  • ms-vscode.wordcount Word Count
  • wmaurer.change-case Change Case

Pix image editor

Pix is another Linux Mint application (the second I use, along with Nemo) that is a useful, lightweight, simple image editor, good for croping, scaling, and converting between filetypes. However, for actual editing, Inkscape is my editor of choice (I find GIMP hard to use).

The latest versions of Inkscape may not be available under testing, so use of an Inkscape appimage might be necessary for the latest bug fixes.

Or, download inkscape from sid, or from debian stable.

Note: as of Bullseye Alpha 2, the libexiv2-14 is not available via apt. Instead before installing Pix, install this file from a Kali repository.

Install Pix from the LMDE masters at releases - LMDE4 version of Pix works a charm. Unpack, and then install the pix-data...deb first, then pix...deb.

Github desktop (fork of the original)

Github desktop .deb file

Note that the link above is the most recent stable, but a new version is under development and there are now (March 2020) release candidates available. Look to the releases page for what is current.

Skype

Download and install Skype as a .deb.

Zotero

Zotero is not something I've spent the time to get working and into a workflow, though it is promising and may help with integration of the Boox Nova Pro.

Similar to Telegram, unzip the directory structure, move to /opt/zotero, symlink the .desktop file, and set the icon. See Zotero installation instructions.

See also:

Pandoc

Stable Pandoc releases are available as well as Pandoc nightly releases, if the developers have recently added functionality.

Font Forge

Font Forge is available as an appimage from the github releases page. These I rename and keep in the ~/software directory.

Balena Etcher

One of the simplest USB drive ISO burners. Etcher is an appimage.

TeX

For TeX, it is fastest to download the 5gb ISO as a torrent, and then mount and install.

For instructions see TeX Live quick install, but the main thing is to just run sudo ./install-tl.

Sometimes some paths need to be added to .bashrc.

Inkscape

Set the Menu > View > Custom, from Wide to get toolbars up top.

Telegram

Telegram needs to be downloaded, unpacked, and then moved as a directory into /opt/. This means the executable is then /opt/Telegram/Telegram. It is necessary to manually build a link and include an icon to add it to the menu. I usually copy and modify another .desktop file in /usr/share/applications

Xournal++ (aka xournalpp)

A pdf reader and overlay editor is fast and under lively development. Deb files are available under the Xournal++ releases page.

Timeshift

Timeshift is a decent backup application, and is available as a .deb file in the Timeshift releases page

Hsetroot

Use hsetroot to set the wallpaper, as follows:

  • install hsetroot application: sudo apt install hsetroot
  • wallpaper image (from somewhere, something suitable for two monitors): ~/images/wallpaper.jpg
  • script name: ~/scripts/wallpaper
  • script content: hsetroot -center "/home/jeff/images/wallpaper.jpg"
  • put script in autorun: ~/.config/lxsession/LXDE/autorun, e;.g., @/home/jeff/scripts/wallpaper

Lxsession LXDE autostart

Remove or comment out from ~/.config/lxsession/LXDE/autorun:

#@pcmanfm --desktop --profile LXDE

Configuring the Menu

The Menu is comprised of a number of text files in ... Adding a text file will create a menu item, which can then be added to an Application Launch Bar on the Panel. Painful way to do things.

Configuring the Panel

The panel is composed of widgets, and those widgets are preset or can be configured by using parts of the menu. Therefore getting applications installed and in the menu is a primary task before configuring the panel.

Digital Clock

Settings: %I:%M %p%n%a %d-%b

Screenshot with gnome-screenshot

The keys can be set using lxhotkey or by manually editing ~/.config/openbox/lxde-rc.xml.

Set the screenshot to F12, and have the shortcut be to gnome-screenshot -a for partial.

Note: also go into dconf-editor and set the default directory: /org/gnome/gnome-screenshot/auto-save-directory to a custom value of ~/Downloads

Get Calibre to open Nova Pro

  • dconf-editor
    • /org/gnome/desktop/media-handling/automount set to false
    • /org/gnome/desktop/media-handling/automount-open set to false
    • /org/gnome/desktop/media-handling/automount-never set to true

turn off automount (false), automount-open (false), and automount-never (true)

pkill nemo if needed to get this to work

Get Firefox to open Transmission

  • It works out of the box now.

Mapping volume keys for audio sound control

The Volume Control panel applet preferences allow for mouse and keyboard configuration. Set the following:

  • F11 volume up
  • F10 volume down
  • F9 mute toggle

These mirror the function keys on the Logitech K240 keyboard, without requiring holding down the function key.

Note that it should be possible to mute with right-click and invoke the mixer with middle-click but those don't seem to work currently.

See also other ways of mapping volume keys.

Keyboard layout settings (languages)

One panel item to add to the lxtaskbar is the keyboard layout handler. It allows for a variety of settings. Set Change Layout Option to grp:lwin_toggle (the Windows key) with a Panel Icon Size of 2, Show Layout as Text, and set the Keyboard Model to whatever is appropriate.

Repositories

Generally the Debian installation takes care of this, however, in the Alpha1 of Bullseye they use bullseye instead of testing. Hence, edit /etc/apt/sources.list as such:

deb http://deb.debian.org/debian/ testing main non-free contrib
deb-src http://deb.debian.org/debian/ testing main non-free contrib

deb http://security.debian.org/debian-security testing-security main contrib non-free
deb-src http://security.debian.org/debian-security testing-security main contrib non-free

Note that while this is the Bullseye Alpha1 release, the idea is to stay with testing as repository resources.

Install printer and scanner software

Note: if we can't get these working, need to question the distribution / version. For example, Buster (Debian 10) was a bust with the printer.

Printer

Scanner

The software will install both simple-scan (Document Scanner) and iscan (Image Scan! for Linux), in the Graphics menu. Both shortcuts need to be modifed to run as sudo.

Go

Install Go from download. At that site, there are instructions, such as:

sudo tar -C /usr/local -xzf go1.14.linux-amd64.tar.gz
nano hello.go

put in this content:

package main
import "fmt"
func main() {fmt.Printf("hello, world\n")}

Then build:

go build hello.go

Then run:

./hello

Hugo

Install Hugo Extended, which has SASS/LESS support, from Hugo github releases

Then test with:

hugo help

Create a new site with:

hugo new site SITENAME

Install a theme into the new site. Download into the /themes/ directory.

  • Find a theme you like
  • Get the .git location for the theme
  • Go into the hugo site with cd SITENAME
  • Git init with git init
  • Add the the

Add new content with:

hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>

Then start the local version with:

hugo server

Installed applications

Selecting Debian desktop environment and LXDE, one starts with:

Installed applications to upgrade

  • Firefox ESR
  • LibreOffice
  • galculator
  • gdisk
  • gimp
  • gnome-disk-utility
  • gnome-screenshot
  • mpv
  • various (but not all) lxde applications

Installed applications to remove

sudo apt remove lxlock light-locker gpicview deluge deluge-common deluge-gtk lxmusic xterm evince evince-common clipit pcmanfm smplayer

Startup

  • Disable ClipIt, Screen Locker
  • After installing Nemo and , then disable the @pcmanfm autostart

~/.bashrc

The important aspects are the path and command shortcuts.

File Manager pcmanfm to nemo

  • Install nemo via apt
  • Configure preferences
  • Under Edit > Preferences > Behavior > Bulk Rename add: thunar --bulk-rename
  • Create symlink from pcmanfm to nemo
  • in dconf-editor set /org/cinnamon/desktop/applications/terminal/exec/ to have the custom value of: lxterminal. do the same for /org/gnome/desktop/applications/terminal/exec

Modify default applications

  • Log in to sync Firefox (this requires access to email for a code, as well as username/password)
  • Set fonts and keyboard shortcuts in lxterminal