Bill Dietrich's    Linux Post-Install Steps
------------------------------------------------------------


Add standard lines to /etc/fstab:
---------------------------------
ls -l /etc/fstab
sudo chmod 666 /etc/fstab
tmpfs  /tmp                tmpfs  noatime,nodiratime,lazytime,nodev,nosuid,mode=1777,size=3G,defaults  0  0
tmpfs  /home/user1/.cache  tmpfs  noatime,nodiratime,lazytime,nodev,nosuid,mode=1777,size=3G,defaults  0  0
/dev/disk/by-uuid/282590c8-6f42-4349-bfb7-1cc9aa36cc43   /mnt/ORANGE auto   nosuid,nodev,nosymfollow,nofail,x-gvfs-show,noauto,compress-force=zstd:3,noatime,lazytime,user,exec,x-gvfs-name=ORANGE 0 0
/dev/disk/by-uuid/2e4d4887-85a0-47d1-a378-451361e92cd4   /mnt/BLACK  auto   nosuid,nodev,nosymfollow,nofail,x-gvfs-show,noauto,compress-force=zstd:3,noatime,lazytime,user,exec,x-gvfs-name=BLACK 0 0
/dev/disk/by-uuid/6678fb40-be44-4f5f-8b69-53c4a339ffec   /mnt/BLUE   auto   nosuid,nodev,nosymfollow,nofail,x-gvfs-show,noauto,compress-force=zstd:3,noatime,lazytime,user,exec,x-gvfs-name=BLUE 0 0
/dev/disk/by-uuid/0847f98a-3b69-4e0d-98a3-0c69e0ddd809   /mnt/XNEW   auto   nosuid,nodev,nosymfollow,nofail,x-gvfs-show,noauto,compress-force=zstd:1,noatime,lazytime,user,exec,x-gvfs-name=XNEW 0 0
/dev/disk/by-uuid/de0aca8d-6740-43c0-9aa6-fddbf7c243f2   /mnt/IDOCS  auto   nosuid,nodev,nosymfollow,nofail,x-gvfs-show,noauto,compress-force=zstd:1,noatime,lazytime,user,exec,x-gvfs-name=IDOCS 0 0
If Btrfs:
	Add compress-force=zstd:1,noatime,nodiratime,lazytime to root and home
	If compress=zstd:1 is there already, replace it with compress-force=zstd:1
if Zfs:
	will be no line for root fs; see "zfs list"
	sudo zfs set atime=off rpool
	sudo zfs set relatime=off rpool
else:
	add noatime,nodiratime,lazytime to root and home
sudo chmod 644 /etc/fstab
If Fedora, then:
	systemctl daemon-reload


sudo mkdir /mnt/IDOCS
sudo mkdir /mnt/ORANGE
sudo mkdir /mnt/BLACK
sudo mkdir /mnt/BLUE
sudo mkdir /mnt/XNEW
sudo chmod 777 /mnt/*
ls -l /mnt


Set in $HOME/.bashrc:
	# Don't put duplicate lines or lines starting with space in the history.
	export HISTCONTROL=ignoreboth
	export HISTFILE="$HOME"/.bash_history
	export HISTSIZE=5000
	export HISTIGNORE='reboot.*;shutdown.*'
	shopt -s histappend


Set in $HOME/.profile:
	PATH=$PATH:~/bin
	export VISUAL=/usr/bin/xed
	export TZ=:/etc/localtime
	# Re: https://blog.packagecloud.io/set-environment-variable-save-thousands-of-system-calls/


swapon --show


If using SSD and LUKS, "lsblk --discard" should show non-zero
values for DISC-GRAN and DISC-MAX values for LUKS volume.
See https://www.billdietrich.me/LinuxStorage.html?expandall=1#TRIMandLUKS

Add "discard" to end of line (4th field) in /etc/crypttab
Probably field should be "luks,discard".

If systemd:
	systemctl list-timers --all    # see if fstrim timer is enabled
	Enable Trim service for SSD.
	Enable smartd service (may have to install smartmontools first).
	sudo systemctl enable smartd
	sudo systemctl start fstrim smartd
	sudo systemctl status fstrim
	sudo systemctl status smartd
	# On Garuda, btrfs-trim instead of fstrim.
	# On Arch, install util-linux then enable fstrim.timer and fstrim then start fstrim.timer.

To see what filesystems will be trimmed by fstrim service,
"sudo fstrim -an".

Check /etc/lvm/lvm.conf or /etc/lvm/lvmlocal.conf :
want default value thin_pool_discards = "passdown".
cat /etc/lvm/lvm.conf | grep thin_pool_d


GRUB:
--------------------------------

If ext4:
	Add "fsck.mode=force fsck.repair=yes" to GRUB_CMDLINE_LINUX_DEFAULT
	in /etc/default/grub and then rebuild GRUB menu.
	Or "sudo tune2fs -c 1 /dev/mapper/data-root".
	See https://www.billdietrich.me/LinuxBootProcess.html#ForceFsckInGRUB
	See https://www.billdietrich.me/LinuxBootProcess.html#ChangeGRUBConfiguration
	sudo journalctl --since=today | grep systemd-fsck\\[


Desktop
--------------------------------

Disable keyring ?

KDE:
	Turn off Baloo (desktop File search) in Settings or in CLI:
	    balooctl status
	    balooctl suspend
		balooctl disable
	Disable keyring or KDE Wallet, or have empty password for it.

	System Settings / Appearance / Fonts: use Noto Sans 12 ?
	System Settings / Appearance / Fonts: enable Anti-Aliasing
	System Settings / Appearance / Fonts: use Sub-pixel rendering = RGB
	System Settings / Appearance / Fonts: use Hinting = Slight
	System Settings / Workspace Behavior / General Behavior: Animation Speed = Instant
	System Settings / Workspace Behavior / General Behavior: Clicking files or folders = Selects them
	System Settings / Workspace Behavior / General Behavior: Clicking in scrollbar track = one page up or down
	System Settings / Workspace Behavior / General Behavior: Middle-click: disabled.
	System Settings / Workspace Behavior / General Behavior: Touch Mode: Never enabled.
	System Settings / Workspace Behavior / Screen locking: Lock screen automatically = 10 minutes
	System Settings / Workspace Behavior / Screen locking: Dela before password required = 30 seconds
	System Settings / Startup and Shutdown / Autostart / add OpenSnitch
	System Settings / Startup and Shutdown / Autostart / add xinput ?
	System Settings / Startup and Shutdown / Desktop Session: logging in = start with empty session
	System Settings / Search / File Search: Enable File Search = disable
	System Settings / Regional settings / Formats: Time = Denmark - English (en_DK)
	System Settings / KDE Wallet: Enable subsystem = disabled
	System Settings / Connections / Wired connection 1 / IPv4 / IPv4 is required = enabled
	System Settings / Connections / Wired connection 1 / IPv6 / Method = Ignored or Disabled
	System Settings / Settings / Cookies / Policy / Default Policy = Accept until end of session
	System Settings / Input Devices / Keyboard / Hardware / Keyboard model = Generic 104-key PC
	System Settings / Input Devices / Keyboard / Layouts / us - English (us)
	System Settings / Input Devices / Mouse / Press left and right for middle-click = enabled
	System Settings / Input Devices / Touchpad / Press left and right for middle-click = enabled
	System Settings / Input Devices / Touchpad / Tapping = all disabled
	System Settings / Display and Monitor / Night Color / Activate Night Color = enabled

	Edit /etc/environment to add line ?
	FREETYPE_PROPERTIES="cff:no-stem-darkening=0"
	https://blog.vladzahorodnii.com/2021/12/31/more-consistent-font-rendering-in-plasma/

	KDE File Picker in GTK Apps including Firefox:
	Edit /etc/environment to add line:
		GTK_USE_PORTAL=1
	Also seems to fix problem with file dialogs opening in background, and with opening
	a link leaving browser in background.
	https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications#Consistent_file_dialog

GTK:
	Set ~/.config/gtk*/gtk.css files to do scrollbar widths:
		.scrollbar.vertical slider, scrollbar.vertical slider { min-width: 16px; }
	Run qt5ct, set Appearance / Standard Dialogs to "GTK2".
KDE:
	Some themes contain a setting for scrollbar width.
	???

dconf dump / >FILENAME
dconf load / <FILENAME

https://ostechnix.com/savedesktop-save-linux-desktop-configuration-settings/


Set Compose key to "Pause", for typing non-English characters.
https://opensource.com/article/22/7/linux-compose-key-cheat-sheet
In KDE: Settings / Keyboard / Advanced / Configure keyboard options / Position of Compose key / Pause
Pause = e gives Euro sign.

Add Startup Application for /home/user1/myinfo/DisableTouchpadMiddleButton.sh if needed.
Make sure xinput is installed.
xinput --version
[Could put it in ~/.xinitrc or ~/.xprofile instead ?]
Add "sh -c $HOME/myinfo/DisableTouchpadMiddleButton.sh" to ~/.bashrc
[Or modify /etc/X11/xorg.conf.d/30-touchpad.conf ?]

sudo visudo
# then add ",pwfeedback" to the first "Defaults" line, to
get "*" as you type chars of a password.

Add "--maximize" or similar to Terminal's shortcut.
No such option available for konsole.
apt list | grep term | grep installed
Maybe right-click on Terminal's icon in start menu or dock, then
change settings in default profile.


------------------------------------------------------------------------

Firewall:
	See if a firewall is installed already.
	sudo systemctl status ufw
	sudo systemctl status firewalld
	Restore saved gufw config from IDOCS/config/gufw*
	or just set to Incoming=Deny Outgoing=Allow

	Turn off Samba access.



VPN:
	Create new connection of type OpenVPN:
		sudo apt install openvpn NetworkManager-openvpn
			or
		sudo apt install network-manager-openvpn
	then:
		# if Network Manager's "VPN" tab always is empty:
		sudo apt install network-manager-openvpn-gnome

	Import saved config file: use ovpn file

	Password should be "saved for all users (not encrypted)".
	Little icon in right end of password field in NM.

	Set Ipv6 to disabled.

	Set network interfaces to use VPN automatically.

	# If NM GUI doesn't work, try:
	nmcli connection import type openvpn file FILENAME



I like to turn off IPv6 completely:
ls -l /etc/sysctl.d/99-sysctl.conf
ls -l /etc/sysctl.conf
sudo chmod 666 /etc/sysctl.conf
Add lines to file:
	net.ipv6.conf.all.disable_ipv6=1
	net.ipv6.conf.default.disable_ipv6=1
	net.ipv6.conf.lo.disable_ipv6=1
sudo chmod 644 /etc/sysctl.conf
Or:
	Make new file  touch /etc/sysctl.d/99-mine.conf
	and add those two lines to it.
	echo 'net.ipv6.conf.all.disable_ipv6=1' >> /etc/sysctl.d/99-mine.conf
	echo 'net.ipv6.conf.default.disable_ipv6=1' >> /etc/sysctl.d/99-mine.conf
	echo 'net.ipv6.conf.lo.disable_ipv6=1' >> /etc/sysctl.d/99-mine.conf
Comment out any IPv6 addresses found in /etc/hosts and /etc/ntp.conf
sudo echo 'blacklist ipv6' >>/etc/modprobe.d/blacklist.conf

Reboot, or run "sudo sysctl -p", and "ip addr" should show no IPv6 address on any interface.



OpenSnitch
	Restore files to .config AND /etc/opensnitchd
	sudo pacman -Sy opensnitch
	sudo systemctl status opensnitchd
	sudo systemctl enable opensnitchd
	sudo systemctl start opensnitchd
		Add opensnitch-ui to DE's autostart-programs, if installer
		didn't do so already.
	For systems without systemd (such as MX Linux), have to reboot,
		then "pidof opensnitchd", "cat /var/log/opensnitchd.log".
	Run OpenSnitch from GUI.
		In lower-right of Rules view, set to 300 per page.
	See https://www.billdietrich.me/LinuxControls.html?expandall=1#OpenSnitch


------------------------------------------------------------------------

Look at Software Manager - hamburger icon - Show installed applications

	Remove apps you don't want.


------------------------------------------------------------------------

flatpak

	flatpak list
    sudo apt install flatpak

    flatpak remotes		# see what repos are configured

	# Could do:
	flatpak remote-delete --system fedora

	# Note: this adds them for system, not just user:
    sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
	sudo flatpak remote-add --if-not-exists flathubbeta https://flathub.org/beta-repo/flathub-beta.flatpakrepo

	On Fedora immutable systems:
		sudo rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
		sudo rpm-ostree install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
		flatpak update --appstream

    move dot-var to .var
		
	Restore saved overrides (Flatseal settings for apps, essentially)
	from dot-local-share-flatpak-overrides

	flatpak install flatseal
	#flatpak run com.github.tchx84.Flatseal
	(or in KDE: Settings / Application Permissions / Flatpak Permissions)

snap

	snap list
	sudo apt install snapd

remove Snap ?

	snap list
	for p in $(snap list | awk '{print $1}'); do
	sudo snap remove $p
	done
	sudo snap remove core
	sudo systemctl stop snapd
	sudo apt autoremove --purge snapd gnome-software-plugin-snap
	rm -fr $HOME/snap
	sudo rm -rf /snap
	sudo rm -rf /var/snap
	sudo rm -rf /var/lib/snapd
	sudo rm -rf /var/cache/snapd
	sudo apt-mark hold snapd

Note: if you want to use Firejail, it only works on native apps and
appimages, not on Flatpaks and Snaps.

On Manjaro, enable/disable Snaps and Flatpaks via:
Run "Add/Remove Software", click on three-dots icon in upper-right,
click on "Preferences", go to "Third Party" tab. 


------------------------------------------------------------------------

KeePassXC (use native, if want to use KeePassXC browser extension and passkeys)

	flatpak install org.keepassxc.KeePassXC

	with SSH agent (no)
	
	Settings:
	    - Tools / Settings:
	        - disable check for updates
	        - disable all auto-save
	        - disable Use entry URL ...
	        - clear clipboard after 45 secs
			- auto-type start delay 800 msec

	Flatseal:
		Turn off perms for Network, All Devices, All System Files.
		Turn on perms for All User Files.

	Combination of KP inside Firejail, used with WireGuard to VPN,
	causes a 10-15 second delay if you click on a link in KP.
	So, don't run KP inside Firejail.


------------------------------------------------------------------------

        
ungoogled-chromium (from https://github.com/ungoogled-software/ungoogled-chromium-debian
	or https://github.com/ungoogled-software/ungoogled-chromium-fedora
	or works from Flatpak beta repo )

	Install this browser first, in hope that FF will end up as default browser.
	
	flatpak install io.github.ungoogled_software.ungoogled_chromium

	For flatpak version:
	Don't know where settings/profiles are saved; can't backup/restore them.
	App is under
	/var/lib/flatpak/app/com.github.Eloston.UngoogledChromium/current/active/files
	Config under
	~/.var/app/com.github.Eloston.UngoogledChromium/config/chromium
	Probably all of "Default" is the thing to backup/restore.

	Flatseal (or in KDE: Settings / Application Permissions / Flatpak Permissions):
		Turn on perms for everything in Filesystem.

	chrome://flags
		Encrypted ClientHello = enabled

    moarTLS
    digital certs  (but they don't get saved in Chromium settings)
    move dot-pki to .pki

	Add another shortcut for ungoogled-chromium with
	"--enable-features=WebUIDarkMode --force-dark-mode" added to end of args


Firefox (use native, so can use KeePassXC browser extension and passkeys)

	sudo apt remove --purge firefox

	# "Firefox ships as a system-wide RPM which lacks codecs and sandboxing.
	# It's better to install the Flatpak from Flathub"
	sudo rpm-ostree override remove firefox-langpacks
	sudo rpm-ostree override remove firefox

	flatpak install org.mozilla.firefox
	If use Flatpak install, have to restore both
		~/.mozilla
	and
		~/.var/app/org.mozilla.firefox/.mozilla
	Then set all profiles in both profiles.ini files to the one you want.

	Flatseal:
		Turn off perms for All System Files.
		Turn on perms for All User Files.
		Add perm to "xdg-config/fontconfig:ro".
		Add perm to access /mnt.
		# or: sudo flatpak override org.mozilla.firefox --filesystem=/mnt
		# but it doesn't show up in Flatseal.

	in about:config, set
		#image.webp.enabled = false		# wanted to stop save, but also stops display, don't want
		#privacy.resistFingerprinting = false	# true means won't start maximized
		app.normandy.enabled = false
		beacon.enabled = false
		browser.cache.disk.enable = false
		browser.cache.memory.capacity = 409600  (KB)
		browser.cache.memory.enable = true
		browser.display.use_document_fonts = 0
		browser.download.improvements_to_download_panel = false
		browser.newtabpage.activity-stream.feeds.telemetry = false
		browser.ping-centre.telemetry = false
		browser.sessionstore.interval = change from 15000 to 600000
		browser.topsites.contile.enabled = false
		dom.block_download_insecure = false
		dom.event.clipboardevents.enabled = false
		dom.push.connection.enabled = false
		dom.push.enabled = false
		extensions.formautofill.addresses.supportedCountries  add ES
		extensions.pocket.enabled = false
		extensions.quarantinedDomains.enabled = false
		geo.enabled = false
		gfx.downloadable_fonts.enabled = false
		gfx.downloadable_fonts.woff2.enabled = false
		gfx.webrender.all = true
		layout.css.scrollbar-width-thin.disabled = true
		layout.forms.reveal-password-button.enabled = true
		middlemouse.paste = false
		network.captive-portal-service.enabled = false
		network.dns.disableIPv6 = true
		network.dns.echconfig.enabled = true
		network.dns.use_https_rr_as_altsvc = true
		network.IDN_show_punycode = true
		toolkit.coverage.opt-out = true
		toolkit.telemetry.coverage.opt-out = true
		toolkit.telemetry.server = empty
		toolkit.telemetry.unified = false
		webGL.disabled = true
		widget.non-native-theme.scrollbar.size = 25
		widget.non-native-theme.scrollbar.size.override = 25
		widget.non-native-theme.win.scrollbar.use-system-size = false
		echconfig enabled
	Add-Ons:
		Absolute Enable Right Click & Copy
		Add URL to Window Title by Eric
		Behave! by Minded Security
		CanvasBlocker
		Color and Fonts Extractor (no)
		Disable WebRTC
		Don't Accept image/webp
		Form History Control by Stephan Mahieu (sometimes has (II) on end of name)
		Google Reverse Image Search by Baris Derin
		KeePassXC-Browser by KeePassXC Team (no)
		Laboratory (for setting CSP on my site)
		Location Guard by Kostas Chatzikokolakis, Marco Stronati
			(privacy level set to Medium; set fixed location to Cordoba Spain)
		Markdown Viewer Webext by Keith L Robertson
			(and see Linux mime instructions in https://github.com/KeithLRobertson/markdown-viewer/blob/master/README.md)
		moarTLS Analyzer (no)
		Netcraft Extension
		Open in VLC media player (no)
		RSSPreview by Aurelien David
		To Google Translate by Juan Escobar
		uBlock Origin by Raymond Hill
			(save/restore settings through buttons at bottom of Settings tab in dashboard)
			Import https://raw.githubusercontent.com/DandelionSprout/adfilt/master/ClearURLs%20for%20uBo/clear_urls_uboified.txt
			Enable all four settings in Privacy section.
			Enable "Block remote fonts" setting.
			Enable "Advanced" setting.
			Under "My filters" add lines:
				*$websocket
				||accounts.google.com/gsi/iframe/select$subdocument
				*$font,third-party,domain=~openbank.es|~reddit.com
		User-Agent Switcher by Linder
		Video DownloadHelper by mig (no)
		WhatFont
	Plugins:
		none
	in Tools / Options / Privacy / History, set
		Custom History and then turn off
		Third Party Cookies (but Tributaria web site doesn't allow this)
    digital certs
		get from password manager
    Bookmarks:
        Enable Right Click = javascript:void(document.onmousedown=null);void(document.onclick=null);void(document.oncontextmenu=null)
        remove element = javascript:(function(){document.styleSheets[0].addRule(%22.highlighted_to_remove%22,%22background:red%20!important%22);var%20e=function(e){if(e.keyCode==27){i()}};document.addEventListener(%22keydown%22,e);var%20t=function(e){e.stopPropagation();this.classList.add(%22highlighted_to_remove%22);return%20false};var%20n=function(e){e.stopPropagation();this.classList.remove(%22highlighted_to_remove%22);return%20false};var%20r=function(e){this.parentNode.removeChild(this);i();e.preventDefault();e.stopPropagation();return%20false};var%20i=function(){var%20i=0;var%20s=document;while(s=document.body.getElementsByTagName(%22*%22).item(i++)){s.removeEventListener(%22mouseover%22,t);s.removeEventListener(%22mouseout%22,n);s.removeEventListener(%22click%22,r);s.classList.remove(%22highlighted_to_remove%22)}document.removeEventListener(%22keydown%22,e)};var%20s=0;var%20o=document;while(o=document.body.getElementsByTagName(%22*%22).item(s++)){o.addEventListener(%22mouseover%22,t);o.addEventListener(%22mouseout%22,n);o.addEventListener(%22click%22,r)}})()
        Spell check page = javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200
        Kantu - VodafoneRouter = javascript:(function() {try {var evt = new CustomEvent('kantuRunMacro', {detail: {name: 'VodafoneRouter',from: 'bookmark',storageMode: 'browser',closeKantu: true}});window.dispatchEvent(evt);} catch (e) {alert('Kantu Bookmarklet error: ' + e.toString());}})();
	Containers:
		1- go into FMAC and go through "Get Started" steps
		2- go into "Containers settings export import" and import saved names
		3- in each container in FMAC:
			a- click on container to open a tab
			b- type appropriate URL in that tab
			c- back to FMAC and check the "always open in this tab" check-box
		4- in Temporary Containers, want Automatic Mode

    If installing backed-up profile:
        - Run FF once to get dir structure created
        - Copy backed-up profile to proper place
        - Edit profile.ini to know about new profile

	Fix Firefox huge-disk-writes problem:
		sudo dnf install profile-sync-daemon
		psd
		# edit $HOME/.config/psd/psd.conf
		# change line:
			#BROWSERS=()
		# to:
			BROWSERS=(firefox)
		# (or just leave it commented so all browsers are handled)
		# Restore /usr/share/psd/browsers files for Brave and ungoogled-chromium
		# See what the sync-daemon will do:
		psd p
		# Quit all browsers !
		# Start the daemon
		systemctl --user enable psd.service
		systemctl --user start psd.service
		systemctl --user status psd.service
		psd p
		ls -l $HOME/.mozilla/firefox


If FF shows as default browser in Settings, but in fact opening
a link does NOT open FF, reboot and try again.  When actual default
browser is listed as default in Settings GUI, then changing it
there will work.


Tor browser launcher (use flatpak)

	Try launching from GUI to see if it's installed by default.

    flatpak install org.torproject.torbrowser-launcher

    sudo apt install torbrowser-launcher     # didn't work on Unity

Tor

	Save Image in Folder
	DownloadThemAll

	Add to
	/home/user1/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc
	or
	~/.var/app/com.github.micahflee.torbrowser-launcher/data/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc
		#ExitNodes {ie},{fr},{ch},{se},{it} StrictNodes 1
		ExcludeNodes {es},{us},{ca},{ru},{cn},{ir},{iq},{il}

	Set Security level to Safest.


https://www.billdietrich.me/UsingLinux.html?expandall=1#BrowserProfileCaching


------------------------------------------------------------------------

Security certificates ?

	ls /usr/local/share/ca-certificates/


------------------------------------------------------------------------

Thunderbird beta

	https://www.thunderbird.net/en-US/thunderbird/beta/all/
	sudo tar --directory=/opt -xvjf /tmp/thunderbird-*.tar.bz2
	sudo rm -f /tmp/thunderbird-*.tar.bz2

	Move .desktop file into ~/.local/share/applications/

	in Preferences / config editor, set
        browser.cache.disk.enable = false
        browser.cache.memory.capacity = 200000  (KB)
        browser.cache.memory.enable = true
		browser.tabs.opentabfor.middleclick = false
		layout.css.scrollbar-width-thin.disabled = true
		middlemouse.openNewWindow = false
		middlemouse.paste = false
		middlemouse.scrollbarPosition = false
		widget.gtk.middle-click-enabled = false
		widget.non-native-theme.scrollbar.size = 25
		widget.non-native-theme.scrollbar.size.override = 25
		widget.non-native-theme.win.scrollbar.use-system-size = false
    add-ons:
        BrowseInTab
        DKIM Verifier
        ImportExportTools NG

    If installing backed-up profile:
        - Run TB once to get dir structure created
        - Copy backed-up profile to proper place
        - Edit profile.ini to know about new profile
        
	When installing from backup, try omitting ImapMail dir
	in profile dir.  Should be re-created automatically.

	# Quit out of Thunderbird
	mail user1        # send msg, to cause creation of /var/mail/user1
	cd "$HOME/.thunderbird/2ryii9zz.default-beta/Mail/Local Folders"
	rm -f user1
	ln -s /var/mail/user1 .


------------------------------------------------------------------------

VS Code

    use native version, don't use code-oss or vscodium
	https://linuxize.com/post/how-to-install-visual-studio-code-on-ubuntu-20-04/
	https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions

	[OLD   Use Flatpak of VSCodium.
	flatpak install com.vscodium.codium
	]
	
	[OLD   Native package of VSCodium:
	https://github.com/VSCodium/vscodium/releases
	]
    
	Extensions (most not available in VSCodium ?):
		HTMLHint by ctf0 (maybe go to
			https://marketplace.visualstudio.com/items?itemName=HTMLHint.vscode-htmlhint
			and click on Version History, download VSIX file)
		HTML / XML / RSS link checker by Bill Dietrich
		Web Accessibility
		Bookmarks by Alessandro Fragnani
		Light High Contrast Theme by Stephen Wassell
		Dart Code

	settings.json:
		{
			"editor.autoIndent": "none",
			"editor.minimap.enabled": false,
			"editor.quickSuggestions": false,
			"emmet.showAbbreviationSuggestions": false,
			"emmet.showExpandedAbbreviation": "never",
			"editor.autoClosingQuotes": "never",
			"html.hover.references": false,
			"css.hover.references": false,
			"editor.hover.enabled": false,
			"editor.matchBrackets": "never",
			"editor.stickyScroll.enabled": false,

			"editor.accessibilitySupport": "off",
			"editor.wordBasedSuggestions": false,
			"editor.parameterHints.enabled": false,
			"editor.lightbulb.enabled": false,
			"telemetry.telemetryLevel": "crash",

			"editor.acceptSuggestionOnEnter": "off",
			"editor.suggest.snippetsPreventQuickSuggestions": false,
			"editor.suggestOnTriggerCharacters": false,
			"markdown.validate.enabled": true,
		}
		https://www.datagubbe.se/vsc/


Node

	sudo apt install npm
	sudo npm install -g @vscode/vsce
	sudo npm install -g typescript
	sudo npm i --save-dev @types/node     ???

	In any project using node_modules tree, in the project directory do
		npm install


------------------------------------------------------------------------

Akregator:

	install from native repo; Flatpak crashes, also doesn't remember last-used dir

	flatpak install org.kde.akregator
	Then revert to pre-KDE-6 version:
		sudo flatpak update --commit=e2d9efda94be9f221b2e0867106473fa850aaf30ecde3ea20c7c624700807a3a org.kde.akregator
		flatpak remote-info --log flathub  org.kde.akregator | less	

	Flatseal: add access to ~/myweb and ~/Videos


------------------------------------------------------------------------

Gwenview:

	install from Flatpak
	flatpak install org.kde.gwenview

Okular

	install from Flatpak

Skype (use flatpak, also works as snap)

	flatpak install com.skype.Client
    sudo snap install --classic skype

Transmission torrent client (available as flatpak)

	flatpak install com.transmissionbt.Transmission

zoom-client (use native, flatpak, or snap)

	https://support.zoom.us/hc/en-us/articles/204206269-Installing-or-updating-Zoom-on-Linux
    flatpak install us.zoom.Zoom

Scanner app:

	If nothing installed by default:
	flatpak install org.kde.skanpage

	Maybe:
	flatpak install org.gnome.SimpleScan

	Don't use XSane, it's horrible.


------------------------------------------------------------------------

sudo apt install ffmpeg imagemagick exiv2 macchanger postfix mailutils
	(or pacman -S ...)

    Configure postfix as "local only"
    Follow instructions in UsingLinux.html#LocalCLIMail
	Mainly, start the services, set forwarding and alias files.

	Quit Thunderbird.
	cd ~/.thunderbird/2ryii9zz.default-beta/Mail/Local\ Folders
	rm user1
	ln -s /var/mail/user1 .
	Launch Thunderbird.

cryptsetup

	May not be installed if using ZFS.
	sudo apt install cryptsetup

p7zip-full (deb)

    sudo apt install p7zip-full

rclone (need 1.57.n or better; probably from https://rclone.org/downloads/ )

	rclone --version

	apt info rclone
	sudo dpkg -i rclone-v*-amd64.deb

	sudo rpm-ostree install rclone-v*-amd64.rpm

	dnf info rclone
	sudo dnf install rclone

rdiff-backup (no) (deb)

nmap (deb; snap didn't work in Kubuntu)

	sudo apt install nmap


------------------------------------------------------------------------

SSH

    move dot-ssh to .ssh
    ssh-add $HOME/.ssh/id_ed25519GitHub
    ssh-add $HOME/.ssh/id_ed25519GitLab

	sudo apt install sshpass
	sudo rpm-ostree install sshpass
	sudo dnf install sshpass
	sudo pacman -Sy sshpass

    One time, first time:
	    sftp -P 22 -o User=USERNAME nl-s2.serverpanel.com
		give cPanel username and password


------------------------------------------------------------------------

sudo apt install git-core

git config --global user.email "bill@billdietrich.me"
git config --global user.name "Bill Dietrich"


------------------------------------------------------------------------

Android Studio

	restore /etc/sysctl.d/60-jetbrains.conf
	edit .profile to add:
		export JAVA_HOME="$HOME/android-studio/jre"
		export PATH="$PATH:$JAVA_HOME/bin"
		export PATH="$PATH:$HOME/flutter/bin"

Flutter (manual, but also works as snap)

	https://www.fosslinux.com/42536/how-to-install-flutter-on-linux.htm
	https://flutter.dev/docs/get-started/install/linux


------------------------------------------------------------------------

pix

	Install from Flatpak
	NOT org.kde.pix
	see https://www.billdietrich.me/UsingLinux.html#Pix

hypnotix


------------------------------------------------------------------------


Needed for making thumbnail images and uploading images:

	imagemagick exiv2

	https://imagemagick.org/script/download.php


------------------------------------------------------------------------

Trader Workstation from IBKR:

	https://www.interactivebrokers.com/en/trading/tws.php#tws-software
	cd /tmp
	chmod u+x tws-stable-linux-x64.sh
	./tws-stable-linux-x64.sh
	Install to ~/bin/Jts


------------------------------------------------------------------------

Spain govt autofirma:

	sudo apt install libnss3-tools
	sudo dnf install nss ?

	download from
	https://firmaelectronica.gob.es/Home/Descargas.html
	extract, then:
	sudo dpkg -i AutoFirma_*.deb
	sudo dnf install autofirma-*.rpm


------------------------------------------------------------------------

If  you want to use Firejail for EVERYTHING (except snaps and flatpaks):

	sudo apt install firejail
	sudo firecfg
	which -a firefox	# check PATH


------------------------------------------------------------------------

Continue with steps at:
https://www.billdietrich.me/InstallingLinux.html?expandall=1#AfterInstalling


========================================================================

I DON'T USE ANY MORE:

------------------------------------------------------------------------

ClamAV or ClamTk (ClamTk available as deb or flatpak)

TLP

GNOME shell extensions (no)
	OpenWeather by jens
	Hide Top Bar by tuxor1337

BleachBit (no)

    sudo apt install bleachbit

OWASP ZAP  (flatpak)

Pinta

Foliate


------------------------------------------------------------------------

Brave browser

    Snap: does not allow access to container files and other dirs.

	Release version from flatpak, but use flatseal to allow access to all dirs.
	But can't install extensions.
    
    Native beta (from https://brave.com/linux/#beta-channel-installation )

	https://computingforgeeks.com/how-to-install-brave-web-browser-on-fedora-linux/
	
    Install the extension "Download Shelf Autohide" and
    un-check "open enclosing folder when downloads finish".

	Brave has a light/dark mode setting.


------------------------------------------------------------------------

VeraCrypt (not in repos or snap or flatpak ! https://sourceforge.net/projects/veracrypt/ )

	Security: disable "preserve modification times"
	Mount option: "noatime,lazytime"


------------------------------------------------------------------------

RSS:

[USE AKREGATOR INSTEAD]

Liferea + uGet (apt; snap failed)

    sudo apt install uget
    sudo apt install liferea
    Copy configs (both .config and .local !).
    Then in Liferea, set Tools/Enclosures to uGet.
    Set default download to 200.

	uget-gtk:
		Edit / Command-line works quietly
		Edit / Apply recent download settings
		test with uget-gtk https://www.billdietrich.me/index.html
		set default destination folder
		Edit / Settings:
		    - disable "show conf dialog on exit"
		    - enable always show tray icon
		    - disable close to tray on window close
		    - clipboard: turn off monitoring
		
	If installing backed-up copies of the database/settings:
	    - Install liferea and uGet
	    - Run each of them once
	    - do ps to make sure they've quit
	    - remove .cache/liferea
	    - copy backed-up copies to proper places
	    - run liferea again
	    
    Probably have to restore settings manually:
        - Tools / Preferences
        - 200 items per feed
        - feed refresh interval 1 day
        - disable "hide read items"
        - privacy: do not track
        - enclosures: download with uGet


------------------------------------------------------------------------

To disable the IDrive Tray from loading whenever your machine is rebooted,
please follow the steps mentioned below.
1- Click on windows 'start' and click on 'run' and enter the command msconfig.
2- Click on the 'startup' tab and uncheck the processes related IDrive.
3- Click on 'apply' and then 'okay'. 


------------------------------------------------------------------------