Posts Tagged ‘belastingen’

#!/usr/bin/env bash
# Author: Mark Rijckenberg
# Latest modification date: 2025/3/14
# Prerequisites: Rhino Linux/Ubuntu/Debian, Brave web browser, ACR38 AC1038-based Smart Card Reader
# Prerequisites: acsccid driver for ACR38 AC1038-based card reader
# This bash shell script is compatible with Rhino Linux and latest version of Brave web browser
# This script does NOT work reliably with Firefox browser, nor with the libacr38u drivers
# This script only needs to be run once, not after every reboot of the PC
# This script can also be used right BEFORE attempting to digitally sign a PDF
# okular # procedure to electronically sign PDF using Belgian eid card:
# 1) run bash shell script eid-card-reader-activation-script
# 2) go to okular::settings::configure backends::PDF::set signature backend to NSS
# and set Certificate database to custom value ~/.pki/nssdb
# 3) go to okular::Tools::Digitally sign

echo "WARNING: This script will first close all your webbrowsers to ensure a correct activation of the eid card reader"
echo "Make sure your eid card reader is connected to your PC and that your eid card is already inserted in the eid card reader"
pause

sudo apt modernize-sources
sudo DEBIAN_FRONTEND=noninteractive apt install debian-keyring
gpg --keyserver keyserver.ubuntu.com --recv-keys 0135B53B
gpg --armor --export 0135B53B | sudo apt-key add -
gpg --keyserver keyserver.ubuntu.com --recv-keys F4BA284D
gpg --armor --export F4BA284D | sudo apt-key add -
gpg --keyserver keyserver.ubuntu.com --recv-keys A87015F3DA22D980
gpg --armor --export A87015F3DA22D980 | sudo apt-key add -
# sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-snapshot-keyring.gpg
sudo DEBIAN_FRONTEND=noninteractive apt update
###############################################################################################
sudo DEBIAN_FRONTEND=noninteractive apt purge eid-*
sudo DEBIAN_FRONTEND=noninteractive apt install lsb-release
sudo DEBIAN_FRONTEND=noninteractive apt install ucf
# find correct eid-archive version number at https://eid.belgium.be/en/linux-eid-software-installation
cd /tmp
sudo rm /etc/apt/sources.list.d/volian*
sudo rm eid-archive*.deb
wget https://eid.belgium.be/sites/default/files/software/eid-archive_latest.deb
sudo dpkg -i eid-archive_latest.deb
curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg > /dev/null
echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install cackey
sudo DEBIAN_FRONTEND=noninteractive apt install eid-mw
sudo DEBIAN_FRONTEND=noninteractive apt install eid-viewer
rpk remove google-chrome-stable
rpk remove google-chrome-unstable
sudo apt purge google-chrome*
sudo DEBIAN_FRONTEND=noninteractive apt install brave-browser
sudo DEBIAN_FRONTEND=noninteractive apt install gnupg-pkcs11-scd
sudo DEBIAN_FRONTEND=noninteractive apt install google-chrome-unstable
sudo DEBIAN_FRONTEND=noninteractive apt install libacsccid1
sudo DEBIAN_FRONTEND=noninteractive apt install libccid
sudo DEBIAN_FRONTEND=noninteractive apt install libnss3-tools
sudo DEBIAN_FRONTEND=noninteractive apt install libpcsclite1
sudo DEBIAN_FRONTEND=noninteractive apt install pcscd
sudo DEBIAN_FRONTEND=noninteractive apt install pcsc-tools
sudo DEBIAN_FRONTEND=noninteractive apt install zoxide fzf
sudo DEBIAN_FRONTEND=noninteractive apt upgrade
sudo DEBIAN_FRONTEND=noninteractive dpkg --configure -a
sudo DEBIAN_FRONTEND=noninteractive apt upgrade
sudo DEBIAN_FRONTEND=noninteractive dpkg --configure -a

# See https://nixos.wiki/wiki/Web_eID
# kill all open browsers:
killall brave
killall chromium
killall firefox
killall google-chrome-unstable
killall google-chrome-stable
killall google-chrome
cd
eid-nssdb remove
modutil -dbdir sql:.pki/nssdb -remove "Belgium eID" -libfile /usr/lib/libbeidpkcs11.so
# crucial step to enable eid card reader:
eid-nssdb add # this step causes crashloop of steam client -> use firefox instead and avoid eid-nssdb add
modutil -dbdir sql:.pki/nssdb -add "Belgium eID" -libfile /usr/lib/libbeidpkcs11.so
eid-viewer
echo "Retest eid card reader on www.cm.be using brave or google-chrome web browser"
# google-chrome-stable www.cm.be
brave www.cm.be