Skip to content

Instantly share code, notes, and snippets.

@caio2k
Last active October 1, 2022 09:58
Show Gist options
  • Save caio2k/0e9248c8f692d73c4f3f4c5abc07c060 to your computer and use it in GitHub Desktop.
Save caio2k/0e9248c8f692d73c4f3f4c5abc07c060 to your computer and use it in GitHub Desktop.
Install desktop utilities for debian 11 bullseye
echo 'Scripts for debian11 post-install'
#!/bin/bash
#designed for debian11
#dpkg --add-architecture i386
sudo apt install -y curl
#add backports repo
echo 'deb [arch=amd64] http://http.us.debian.org/debian bullseye-backports main contrib non-free' | sudo tee /etc/apt/sources.list.d/bullseye-backports.list
echo 'Package: *
Pin: release a=bullseye-backports
Pin-Priority: 400' | sudo tee /etc/apt/preferences.d/bullseye-backports
#add testing repo
echo 'deb [arch=amd64] http://http.us.debian.org/debian testing main contrib non-free' | sudo tee /etc/apt/sources.list.d/testing.list
echo 'Package: *
Pin: release a=testing
Pin-Priority: 300' | sudo tee /etc/apt/preferences.d/testing
#add spotify repo
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D1742AD60D811D58
echo 'deb http://repository.spotify.com stable non-free' | sudo tee /etc/apt/sources.list.d/spotify.list
echo 'Package: *
Pin: origin repository.spotify.com
Pin-Priority: 1
Package: spotify-client
Pin: origin repository.spotify.com
Pin-Priority: 400 ' | sudo tee /etc/apt/preferences.d/spotify
#add skype repo
#curl -L https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add -
#echo 'deb [arch=amd64] https://repo.skype.com/deb stable main' > /etc/apt/sources.list.d/skype-stable.list
#add slack repo
curl -L https://packagecloud.io/slacktechnologies/slack/gpgkey | sudo apt-key add -
echo 'deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main' | sudo tee /etc/apt/sources.list.d/slack.list
echo 'Package: *
Pin: origin packagecloud.io
Pin-Priority: 1
Package: slack-desktop
Pin: origin packagecloud.io
Pin-Priority: 400' | sudo tee /etc/apt/preferences.d/slack
#add vscodium repo
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
echo 'Package: *
Pin: origin paulcarroty.gitlab.io
Pin-Priority: 1
Package: codium
Pin: origin paulcarroty.gitlab.io
Pin-Priority: 400' | sudo tee /etc/apt/preferences.d/vscodium
#add wine repo
curl -L https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
echo 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main' | sudo tee /etc/apt/sources.list.d/winehq.list
echo 'Package: *
Pin: origin dl.winehq.org
Pin-Priority: 350' | sudo tee /etc/apt/preferences.d/winehq
sudo apt update
sudo apt -y install vim mc aptitude codium nfs-client cups pavucontrol calibre gnucash firmware-linux-nonfree xsane s-tui spotify-client curl golang chromium firmware-iwlwifi sudo xbindkeys qemu-kvm libvirt-daemon-system virt-manager gparted gparted pidgin pidgin-sipe gitk git docker.io samba net-tools wine handbrake-cli handbrake net-tools handbrake mencoder firewalld default-jre graphviz python3-pip docker.io docker-compose slack-desktop v4l2loopback-dkms python3-opencv picard intel-media-va-driver-non-free heif-thumbnailer heif-gdk-pixbuf ifuse libimobiledevice-utils libdvd-pkg mkvtoolnix ttf-mscorefonts-installer
#sudo snap install freemind
apt install --install-recommends winehq-stable
#update user permission
sudo usermod vagrant -a -G sudo,video,audio,docker,libvirt
#pulseaudio high quality configuration
echo 'default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
daemonize = no
' >> ~/.config/pulse/daemon.conf
#configure virt-manager
firewall-cmd --zone=libvirt --permanent --add-service=samba
firewall-cmd --zone=libvirt --permanent --add-service=nfs
firewall-cmd --zone=libvirt --permanent --add-service=mountd
firewall-cmd --zone=libvirt --permanent --add-service=rpc-bind
##firewall-cmd --zone=libvirt --add-port=2049/tcp
#echo 'RPCMOUNTDOPTS="--port 33333"' | sudo tee /etc/default/nfs-kernel-server
sudo sed -i 's: audit deny @{HOME}/\.: #audit deny @{HOME}/.:g' /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
sudo systemctl restart apparmor
echo "set mouse-=a" > ~/.vimrc
#webcam_blur, webcam_chroma
pip3 install tf-bodypix tensorflow==2.5.0 tfjs_graph_converter pyfakewebcam
echo 'v4l2loopback' | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo 'options v4l2loopback devices=2 exclusive_caps=1 video_nr=10,11 card_label="OBS Virtual Camera","BodyPix Camera"' | sudo tee /etc/modprobe.d/v4l2loopback.conf
echo 'alias webcam_blur="python3 -m tf_bodypix blur-background --source /dev/video0 --output /dev/video11 --threshold=0.75 --background-blur 20"' >> .bashrc
echo 'alias webcam_chroma="python3 -m tf_bodypix replace-background --source /dev/video0 --output /dev/video11 --background ~/Documents/green.png --threshold=0.5 --mask-blur 10"' >> .bashrc
#DNIe
sudo apt install pcsc-tools pcscd pinentry-gtk2 libccid
wget https://www.dnielectronico.es/descargas/distribuciones_linux/libpkcs11-dnie_1.6.8_amd64.deb && sudo dpkg -i libpkcs11-dnie_1.6.8_amd64.deb ; rm -f libpkcs11-dnie_1.6.8_amd64.deb
#configure in firefox the new security device "DNIe" using /usr/lib/libpkcs11-dnie.so
#autofirma
#get zip, install deb
#configure firefox profile using "firefox-esr -p"
#add new security device using /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so
#mount ios devices
#ifuse temp
#!/bin/bash
#designed for debian11
#dpkg --add-architecture i386
sudo apt install -y curl
#add backports repo
echo 'deb [arch=amd64] http://http.us.debian.org/debian bullseye-backports main contrib non-free' | sudo tee /etc/apt/sources.list.d/bullseye-backports.list
echo 'Package: *
Pin: release a=bullseye-backports
Pin-Priority: 400' | sudo tee /etc/apt/preferences.d/bullseye-backports
#add testing repo
echo 'deb [arch=amd64] http://http.us.debian.org/debian testing main contrib non-free' | sudo tee /etc/apt/sources.list.d/testing.list
echo 'Package: *
Pin: release a=testing
Pin-Priority: 300' | sudo tee /etc/apt/preferences.d/testing
#add spotify repo
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D1742AD60D811D58
echo 'deb http://repository.spotify.com stable non-free' | sudo tee /etc/apt/sources.list.d/spotify.list
echo 'Package: *
Pin: origin repository.spotify.com
Pin-Priority: 1
Package: spotify-client
Pin: origin repository.spotify.com
Pin-Priority: 400 ' | sudo tee /etc/apt/preferences.d/spotify
#add skype repo
#curl -L https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add -
#echo 'deb [arch=amd64] https://repo.skype.com/deb stable main' > /etc/apt/sources.list.d/skype-stable.list
#add slack repo
curl -L https://packagecloud.io/slacktechnologies/slack/gpgkey | sudo apt-key add -
echo 'deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main' | sudo tee /etc/apt/sources.list.d/slack.list
echo 'Package: *
Pin: origin packagecloud.io
Pin-Priority: 1
Package: slack-desktop
Pin: origin packagecloud.io
Pin-Priority: 400' | sudo tee /etc/apt/preferences.d/slack
#add vscodium repo
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
echo 'Package: *
Pin: origin paulcarroty.gitlab.io
Pin-Priority: 1
Package: codium
Pin: origin paulcarroty.gitlab.io
Pin-Priority: 400' | sudo tee /etc/apt/preferences.d/vscodium
sudo apt update
sudo apt -y install vim mc aptitude codium nfs-client cups pavucontrol calibre gnucash firmware-linux-nonfree xsane s-tui spotify-client curl golang chromium firmware-iwlwifi sudo xbindkeys qemu-kvm libvirt-daemon-system virt-manager gparted gparted pidgin pidgin-sipe gitk git docker.io samba net-tools wine handbrake-cli handbrake net-tools handbrake mencoder firewalld default-jre graphviz python3-pip docker.io docker-compose slack-desktop apparmor-utils apparmor-notify v4l2loopback-dkms clamav python3-pacparser heif-thumbnailer heif-gdk-pixbuf ifuse libimobiledevice-utils libdvd-pkg ttf-mscorefonts-installer
#sudo snap install freemind
#update user permission
sudo usermod vagrant -a -G sudo,video,audio,docker,libvirt,libvirt-qemu,kvm
#pulseaudio high quality configuration
echo 'default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
daemonize = no
' >> ~/.config/pulse/daemon.conf
#configure virt-manager
firewall-cmd --zone=libvirt --permanent --add-service=samba
firewall-cmd --zone=libvirt --permanent --add-service=nfs
firewall-cmd --zone=libvirt --permanent --add-service=mountd
firewall-cmd --zone=libvirt --permanent --add-service=rpc-bind
#firewall-cmd --zone=libvirt --add-port=2049/tcp
#echo 'RPCMOUNTDOPTS="--port 33333"' | sudo tee /etc/default/nfs-kernel-server
sudo sed -i 's: audit deny @{HOME}/\.: #audit deny @{HOME}/.:g' /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
sudo systemctl restart apparmor
echo "set mouse-=a" > ~/.vimrc
#webcam_blur, webcam_chroma
pip3 install tf-bodypix tensorflow==2.5.0 tfjs_graph_converter pyfakewebcam
echo 'v4l2loopback' | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo 'options v4l2loopback devices=2 exclusive_caps=1 video_nr=10,11 card_label="OBS Virtual Camera","BodyPix Camera"' | sudo tee /etc/modprobe.d/v4l2loopback.conf
echo 'alias webcam_blur="python3 -m tf_bodypix blur-background --source /dev/video0 --output /dev/video11 --threshold=0.75 --background-blur 20"' >> .bashrc
echo 'alias webcam_chroma="python3 -m tf_bodypix replace-background --source /dev/video0 --output /dev/video11 --background ~/Documents/green.png --threshold=0.5 --mask-blur 10"' >> .bashrc
#mount ios devices
#ifuse temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment