I bought a new HP Deskjet 2621 and I tried to install it using the hp-setup which didn’t recognize it.
The problem is the hplip version (generaly 3.16.11+repack0-3 in jessie and 3.16.11+repack0-1~bpo8+1 in jessie-backports), if you have a too recent printer (like me), ppd files are not available in version 3.16.11+repack0-3.
I tried to install latest one binary (at that moment).
1
sh hplip-3.17.11.run
After the whole process a had a dependencies problems because packages:
pyqt4
pyqt4-dbus
had different names in 9.3:
python-qt4
python-qt4-dbus
So to fix it you have two options once downloaded the source code from above link.
Following the instructions from the following link (#3 message).
Compile and install it your self.
I chose the 2nd option:
1
~/src/hplip-3.17.11 $ ./configure
Here I found another dependencies issue:
1
"configure: error: cannot find net-snmp support (or --disable-network-build)"
Disabling the networking build is bad idea if you have a wireless printer, it won’t work. Then your have to install the net-snmp packages and the development packages for openssl.
Once installed above dependencies, I just executed bellow commands to install the hp-setup binary with my printer drivers.
1 2 3 4
~/src/hplip-3.17.11 $ make clean ~/src/hplip-3.17.11 $ ./configure ~/src/hplip-3.17.11 $ make ~/src/hplip-3.17.11 $ su -c "make install"
And then execute hp-setup ans install your printer:
Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates) in a stable environment so that they will run without new libraries (whenever it is possible) on a Debian stable distribution
Backports cannot be tested as extensively as Debian stable, and backports are provided on an as-is basis, with risk of incompatibilities with other components in Debian stable. Use with care!
It is therefore recommended to select single backported packages that fit your needs, and not use all available backports.
Add backports to your sources.list
For stretch (at the present moment) add this line:
1
deb http://ftp.debian.org/debian stretch-backports main
Run apt update.
Install a package from backports
All backports are deactivated by default (i.e. the packages are pinned to 100 by using ButAutomaticUpgrades: yes in the Release files. If you want to install something from backports run (you can use aptitude too):
1
sudo apt -t stretch-backports install "package"
1. Add [multimedia][deb-multimedia] repos
After you have added the necessary line in /etc/apt/sources.list (as below)
1
deb ftp://ftp.deb-multimedia.org stable main non-free
the first package to install is deb-multimedia-keyring.
Sometimes you download .ttf file (a font file) and you want to install it directly. In that case, copy the font file to one of the following directory.
The fonts can be copied in one of this directories:
If you want the fonts for everyone on the system (i.e. in a multiuser environment) then put them on /usr/share/fonts.
If you only want the fonts for yourself, then put them on ~/.fonts/ directory of your home folder.
Once you’ve copied the files in correct places, issue the following command to which will read and cache all installed fonts from these directories.
1
# fc-cache -fv
Now if you want to list all installed and cached fonts on your system, you need to use fc-list command.
Sample output below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# fc-list
usr/share/fonts/truetype/msttcorefonts/comicbd.ttf: Comic Sans MS:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia /usr/share/fonts/truetype/oxygen/OxygenMono-Regular.ttf: Oxygen Mono:style=Regular /usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf: Tlwg Typo:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold /usr/share/fonts/truetype/noto/NotoSansThai-Regular.ttf: Noto Sans Thai:style=Regular /usr/share/fonts/truetype/fonts-kalapi/Kalapi.ttf: Kalapi:style=Regular /usr/share/fonts/truetype/fonts-gujr-extra/Rekha.ttf: Rekha:style=Medium /usr/share/fonts/truetype/tlwg/TlwgTypewriter-BoldOblique.ttf: Tlwg Typewriter:style=Bold Oblique /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book /usr/share/fonts/truetype/noto/NotoSansCypriot-Regular.ttf: Noto Sans Cypriot:style=Regular /usr/share/fonts/truetype/msttcorefonts/comic.ttf: Comic Sans MS:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta /usr/share/fonts/truetype/noto/NotoSansTeluguUI-Bold.ttf: Noto Sans Telugu UI:style=Bold ...
Configuring Fonts on Linux
1
# dpkg-reconfigure fontconfig-config
5. Install the “good stuff” such as unrar, smplayer, etc
Keep in mind I am using debian based distro and KDE, for instance some packages names don’t be able to fix with your current distro.
1
sudo apt install unrar rar curl vim mesa-utils htop lm-sensors screen kde-config-touchpad sysv-rc-conf transmission subtitleeditor pavucontrol gthumb tree
Browsers
chromium - the web browser from Google
1
sudo apt install chromium chromium-l10n
Brave
Installing brave Debian 9+, Ubuntu 14.04+ and Mint 17+
If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution.
If you’re on a Debian-based distribution like Ubuntu, try apt:
1
sudo apt install -y git git-flow
And then run to setup the default email, name and editor:
Add below code into your ~/.bash before the line unset color_prompt force_color_prompt to see your current git branch into the bash prompt. Idea taken from here.
1 2 3 4 5 6 7
# Add git branch if its present to PS1. # parse_git_branch() { # git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' # } # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[0;37m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ ' PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\]$(__git_ps1)\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] ' unset color_prompt force_color_prompt
v2 27 March 2023
1 2 3 4 5 6 7 8 9 10 11 12 13
# Drop this into your .zshrc or .bashrc file: git_prompt() { local branch="$(git symbolic-ref HEAD 2> /dev/null | cut -d'/' -f3-)" local branch_truncated="${branch:0:30}"
if (( ${#branch} > ${#branch_truncated} )); then branch="${branch_truncated}..." fi
alias git_diff_commit='git whatchanged -m -n 1 -p $1' alias git_reset='git reset --hard' alias git_delete_remote_branch='git push origin --delete $1' # Change commit comment. #git commit --amend --no-verify alias git_pull_current_branch='git fetch --all --prune && git pull origin `git rev-parse --abbrev-ref HEAD`' alias git_push_current_branch='git push origin `git rev-parse --abbrev-ref HEAD`' alias git_branch_merged="git branch -r --merged | egrep -v \"master|develop\" | sed 's/origin\///'" alias git_branch_cleanup="git branch -r --merged | egrep -v \"master|develop\" | sed 's/origin\///' | xargs -n 1 git push --delete origin" alias git_patch_export_current='current=$(git branch --show-current | sed -r "s/\//-/g") ; git format-patch -k --stdout HEAD^ > ../"$current".patch' alias git_patch_import_current='git am -3 -k --ignore-whitespace "$1"'
# More aliases alias g='git' alias gs='git status ' alias ga='git add ' alias gb='git branch ' alias gc='git commit' alias gd='git diff' alias go='git checkout ' alias gl='git log ' alias glp='git log -p' alias glo='git log --pretty=oneline' alias gps='git_push_current_branch' alias gpsr='git_push_current_branch && git push --tags' alias gpl='git_pull_current_branch' alias gplr='git pull --rebase' alias gk='gitk --all&' alias gfi='git flow init -d'
# With git reflog check which commit is one prior the merge. alias gum='git reset --hard HEAD~1' alias got='git ' alias get='git '
The go abbreviation for git checkout is very useful, allowing me to type:
1
go <branch>
to checkout a particular branch. Also, I often mistype git as get or got so I created aliases for them too.
From this repository contains documentation for using the NodeSource Node.js Binary Distributions via .rpm, .deb and Snap packages as well as their setup and support scripts.
POSIX-compliant bash script to manage multiple active node.js versions
Install & Update Script
To install or update nvm, you should run the [install script][2]. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
-- \set PROMPT1 '%~%--%x ' -- Use table format (with headers across the top) by default, but switch to -- expanded table format when there's a lot of data, which makes it much easier to read. \x auto -- \set ON_ERROR_STOP on -- \set ON_ERROR_ROLLBACK interactive -- Use a separate history file per-database. --\set HISTFILE ~/.psql_history- :DBNAME -- If a command is run more than once in a row, only store it once in the history. \set HISTCONTROL ignoredups -- Autocomplete keywords (like SELECT) in upper-case, even if you started -- typing them in lower case. \set COMP_KEYWORD_CASE upper
-- Verbose error reports. \set VERBOSITY verbose
-- By default, NULL displays as an empty space. Is it actually an empty -- string, or is it null? This makes that distinction visible. --\pset null '[NULL]' \pset null'¤' \pset linestyle 'unicode'
\pset unicode_border_linestyle single \pset unicode_column_linestyle single \pset unicode_header_linestyle double
set intervalstyle to'postgres_verbose';
\setenv LESS '-iMFXSx4R' \setenv EDITOR '/usr/bin/vim'
[Lynis][Lynis]: an open source tool that performs a local security assessment and audits local services for vulnerabilities. It is light-weight and easy to use; just unzip it and run the command
Using your software in English? Then configure APT to skip downloading translations. This saves bandwidth and prevents additional load on the repository servers.
This version does not autoupdate. You’ll have to manually update the cli with apt. Use the standalone install for an autoupdating version of the CLI.
Run the following to add our apt repository and install the CLI:
Something very util is go back and see how I built/configured something, or what that nifty command was, or how some command broke something weeks ago.
To archive mencioned before, Set HISTSIZE and HISTFILESIZE in .bashrc to an empty value. Also it makes sense not enter lines which begin with a space or tab or duplicated (such as cd ..).
1 2 3
HISTSIZE= HISTFILESIZE= HISTCONTROL=ignoreboth
HISTSIZE
The number of commands to remember in the command history (see HISTORY below). If the value is 0, commands are not saved in the history list. Numeric values less than zero result in every command being saved on the history list (there is no limit). The shell sets the default value to 500 after reading any startup files.
HISTFILESIZE
The maximum number of lines contained in the history file. When this variable is assigned a value, the history file is truncated, if necessary, to contain no more than that number of lines by removing the oldest entries. The history file is also truncated to this size after writing it when a shell exits. If the value is 0, the history file is truncated to zero size. Non-numeric values and numeric values less than zero inhibit truncation. The shell sets the default value to the value of HISTSIZE after reading any startup files.
HISTCONTROL
A value of `ignorespace' means to not enter lines which begin with a space or tab into the history list. A value of `ignoredups' means to not enter lines which match the last entered line. A value of `ignoreboth' combines the two options. Unset, or set to any other value than those above, means to save all lines on the history list. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless of the value of HISTCONTROL.
xclip is a command line utility that is designed to run on any system with an X11 implementation.
It provides an interface to X selections (“the clipboard”) from the command line.
It can read data from standard in or a file and place it in an X selection for pasting into other X applications.
xclip can also print an X selection to standard out, which can then be redirected to a file or another program.
1 2 3 4 5
sudo apt install xclip # Downloads and installs xclip.
xclip -sel clip < ~/file # Copies the contents of the file file to your clipboard.
22. Code storage
Below you can find cloud storage service providers with native Linux client.
Download and install VirtualBox for Debian-based GNU/Linux hosts:
Add the following line to your /etc/apt/sources.list. According to your distribution, replace ‘‘ with ‘eoan’, ‘bionic’, ‘xenial’, ‘buster’, ‘stretch’, or ‘jessie’ (older versions of VirtualBox supported different distributions):
Finally if you need anything of the following: Support for USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe and PXE boot for Intel cards, then install the Entension Pack.
23. Miscellaneous
fortunes - Data files containing fortune cookies. Configuration here.
1
sudo apt install fortunes fortunes-es
KPatience - KPatience is a compendium of several well known patience card games, ranging from the well known Klondike and Freecell, to lesser known games such as Grandfather’s Clock and Mod3. In all there are 12 variations for you to while away time.
1
sudo apt install kpat
Update 25 March 2023
As returnning Debian 12 with the testing version, after almost two years using Fedora and being impossible to install OpenSuse. I update my new founds, new interesting stuff and forgotten things.
and then deselect: Debian desktop environment (although the installation you can select it, it’s selected :)), uninstalling a whole bunch of stuff that is seemigly important to make the system widelight and lean.
Install nala pacakage manager
An enhanced user-friendly tool for managing apt packages. Features of Nala:
Parallel downloads.
Checks for the fastest mirrors and uses the fastest 3 by default to speed up downloads.
Each command you execute will be stored as Nala history with a unique ID.
Compatible with Fish and Zsh.
Makes Apt more human-readable than ever.
1
sudo apt install -y nala
Check Fasters Mirrors
Nala
To fetch the fastest mirrors, you’d need to utilize the fetch utility. First, it will determine whether you are using Debian or Ubuntu and then list the fastest mirrors:
1
sudo nala fetch
install netselect-apt
Permit us to automatically select the fastest mirrors that are closest to us.
1
sudo nala install netselect-apt
Go to the mirror list and select the fastest mirror.
1 2 3 4 5 6 7 8 9 10 11
# -c: countery # -n: non free repositories
sudo netselect-apt -c NZ -n bookworm
... Of the hosts tested we choose the fastest valid for http: http://mirror.fsmg.org.nz/debian/
Writing sources.list. Done.
Zram compressed swap
To setup fast swap ram for SSD disk not having a swap partition.
1
sudo nala install systemd-zram-genererator
Then let the system new about the new swap service.
1
sudo systemdctl daemon-reload
and the start the systemctl service:
1
sudo systemdctl start /dev/zram0
finally check there now is swap (it’s not a partition, it’s region on RAM that’s compressed and it’s very fast and secure as it wiped in eahc reboot).
1
free -g
Virtualization
The virt-manager application is a desktop user interface for managing virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers).
1
sudo nala install virt-manager
Flatpak
Enable flatpaks for further testing for the Discover utility in the app manager.
1
sudo nala install plasma-discover-backend-flatpak
It’s very handy for installing flatpaks, then for the Discover app enable flatpaks:
Settings -> Add Flathub (on the top right corner)
Stand by until the Flatpak arises in the top left corner.
Logout and login and try it from the Discover app and search and isntall: system monitoring center.
then check already installed flatpaks:
1
flatpak list
Distrobox
For cotainer management and podman, as you can run podman as rootless container and can play aroutn with your container sandboses without affecting the rest of the system.