distros:ubuntu_desktop
This is an old revision of the document!
Table of Contents
Information
Download
Etcher Image Writer
Ubuntu
HOSTS
- Unified hosts + fakenews + gambling
Initial
- Only run once
ls '/etc/hosts~' || wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sudo cp --backup '/tmp/hosts-tmp' '/etc/hosts' && sync
Update
ls '/etc/hosts~' && wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sudo mv --force '/tmp/hosts-tmp' '/etc/hosts' && sync
Restore Backup
ls '/etc/hosts~' && sudo mv --force '/etc/hosts~' '/etc/hosts' && sync
Repositories
Liquorix Kernel
sudo add-apt-repository 'ppa:damentz/liquorix'
WineHQ
mantic
= 23.10
sudo dpkg --add-architecture 'i386'
wget -O '/tmp/winehq.key' 'https://dl.winehq.org/wine-builds/winehq.key' && sudo mv '/tmp/winehq.key' '/etc/apt/trusted.gpg.d/winehq.asc' && echo 'deb https://dl.winehq.org/wine-builds/ubuntu/ mantic main' | sudo tee '/etc/apt/sources.list.d/winehq.list' > '/dev/null' && sync
oibaf/graphics-drivers
sudo add-apt-repository 'ppa:oibaf/graphics-drivers'
Software
Update
System
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sync
Firmware
sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose && sync
Snaps
sudo snap refresh && sync
General
sudo apt install --install-recommends 7zip aria2 evolution filezilla gimp gnome-shell-extension-manager keepassxc libreoffice libsecret-tools lm-sensors mesa-utils mpv rhythmbox transmission-gtk unar yt-dlp
Wine
winehq-staging winbind winetricks libgl1-mesa-dri:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386 libgl1:i386 libnss-mdns:i386
Liquorix Kernel
linux-image-liquorix-amd64 linux-headers-liquorix-amd64
Intel Media Driver for VAAPI
intel-media-va-driver-non-free
Tor Browser
torbrowser-launcher
Google Chrome
wget -O '/tmp/google-chrome-stable_current_amd64.deb' 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb' && sudo apt install '/tmp/google-chrome-stable_current_amd64.deb' && rm '/tmp/google-chrome-stable_current_amd64.deb' && sync
Steam
sudo snap install 'steam'
Settings
Keyboard Shortcuts
bash -c "secret-tool lookup 'keepass' 'default' | keepassxc --pw-stdin ~/'Documents/keepass.kdbx'"
gnome-terminal --command "sudo sh -c 'apt update && apt full-upgrade -y && apt clean && apt autoremove -y && sync && snap refresh && wget -O '/tmp/sb-hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && mv --force '/tmp/sb-hosts' '/etc/hosts' && sync && fstrim --all --verbose && sync && sleep '5''"
Keys
- Listed respectively to above
- Ctrl + Alt + Z
- Menu
Printer
- Printer name can be
Ctrl + F
'd AppSocket/HP JetDirect → HP → HP Officejet Pro 8710, hpcups (en) 3)
- Color Mode: Device Gray
- Administration → Set As Server Default
socket://192.168.1.164:9100
Kole
HP Officejet Pro 8710
Info
HP Officejet Pro 8710, hpcups 3.23.5
4(en)
- With Firefox, do
Inspect
- Last one is
drv
- https://access.redhat.com/solutions/6971890 implies the
drv
path is the modern choice The IPP option sometimes print blurry documents; CUPS says old non-IPP drivers will be deprecated eventually
Network
Rhythmbox
- See Internet Radio
Terminal
- 10-notch Transparency
Fan Profile
sudo apt install 'smbios-utils' -y && sudo smbios-thermal-ctl --set-thermal-mode='performance' && sudo apt purge 'smbios-utils' -y
Kernel Options
Intel Perf Counters
i915 Early-load
echo 'i915' | sudo tee --append '/etc/modules' > '/dev/null' && cat '/etc/modules' | grep 'i915'
sudo update-initramfs -k 'all' -c
sysctl
dev.i915.perf_stream_paranoid
=0
echo 'dev.i915.perf_stream_paranoid=0' | sudo tee '/etc/sysctl.d/99-i915-perf.conf' > '/dev/null' && cat '/etc/sysctl.d/99-i915-perf.conf'
sysctl 'dev.i915.perf_stream_paranoid'
Swappiness
vm.swappiness
=0
echo 'vm.swappiness=0' | sudo tee '/etc/sysctl.d/99-swappiness.conf' > '/dev/null' && cat '/etc/sysctl.d/99-swappiness.conf'
sysctl 'vm.swappiness' && cat '/proc/sys/vm/swappiness'
GRUB
Config
- Add options in
GRUB_CMDLINE_LINUX_DEFAULT=
sudo -e '/etc/default/grub' && sudo update-grub
Spinesnap
- Last updated: 2023/12/13
GRUB_CMDLINE_LINUX=
2023/12/13: Enable Virtualization in BIOS in order to get x2apic enabled;
iommu=pt
disables IOMMU
sudo -e '/etc/default/grub' && sudo update-grub
acpi_osi='Linux' iommu='pt' pci='pcie_bus_perf,realloc,pcie_scan_all,big_root_window' reboot='pci' video='HDMI-A-1:1920x1080@74' i915.enable_guc='3'
GNOME
Extensions
External Monitor Settings
- This copies the configured monitor settings from the current user to
gdm
and also applies it to the log-in screen - Notably useful for setting a laptop's built-in screen as disabled for the log-in screen
sudo cp ~/'.config/monitors.xml' ~gdm/'.config/monitors.xml' && sudo chown 'gdm':'gdm' ~gdm/'.config/monitors.xml'
Undo
sudo rm ~gdm/'.config/monitors.xml' && sync
Tweaks
sudo -e '/etc/profile.d/99-tweaks.sh'
# Clutter export CLUTTER_PAINT='disable-dynamic-max-render-time' # Mesa export MESA_DISK_CACHE_SINGLE_FILE='1' export MESA_DISK_CACHE_DATABASE='1' export MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ='1' export VAAPI_MPEG4_ENABLED='1' # End
Settings
All-in-one
- Last updated: 2023/12/13
gsettings reset 'org.gnome.shell' 'app-picker-layout' && gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'true' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'send-events' 'disabled-on-external-mouse' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'natural-scroll' 'false' && gsettings set 'org.gnome.desktop.peripherals.mouse' 'accel-profile' 'flat' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-to-click' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-and-drag' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'disable-while-typing' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'click-method' 'areas' && gsettings set 'org.gnome.desktop.interface' 'clock-show-date' 'true' && gsettings set 'org.gnome.desktop.wm.preferences' 'focus-mode' 'click' && gsettings set 'org.gnome.desktop.wm.preferences' 'disable-workarounds' 'true' && gsettings set 'org.gnome.desktop.interface' 'clock-show-weekday' 'true'
Individual
- Last updated: 2023/12/13
gsettings reset 'org.gnome.shell' 'app-picker-layout'
gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'true'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'send-events' 'disabled-on-external-mouse'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'natural-scroll' 'false'
gsettings set 'org.gnome.desktop.peripherals.mouse' 'accel-profile' 'flat'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-to-click' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-and-drag' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'disable-while-typing' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'click-method' 'areas'
gsettings set 'org.gnome.desktop.interface' 'clock-show-date' 'true'
gsettings set 'org.gnome.desktop.wm.preferences' 'focus-mode' 'click'
gsettings set 'org.gnome.desktop.wm.preferences' 'disable-workarounds' 'true'
gsettings set 'org.gnome.desktop.interface' 'clock-show-weekday' 'true'
KeePassXC
Settings
- General → [ ] Load previous databases on startup
- Security → [x] Use DuckDuckGo service to download website icons
Add Database Password to GNOME Keyring
secret-tool store --label='KeePass' 'keepass' 'default'
lm_sensors
sudo sensors-detect --auto
sudo -e '/etc/modules'
mpv
mkdir -p ~/'.config/mpv' && nano ~/'.config/mpv/mpv.conf'
save-position-on-quit sub-auto=fuzzy force-window=yes profile=gpu-hq scale=ewa_lanczossharp cscale=ewa_lanczossharp video-sync=display-resample interpolation tscale=oversample hwdec=vaapi hwdec-codecs=all
Laptop Power Management
Secure Shell
- See Client notes to generate/restore public key
Uncomplicated Firewall
- See ufw for more notes
sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw enable && sudo systemctl enable 'ufw'
sudo ufw allow 'ssh'
Drive Maintenance
Trim
sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l
UTC
- Set RTC to UTC
Needed if Windows is installed first
Windows should also be set to UTC
sudo timedatectl set-local-rtc '0'
Verify
timedatectl | grep local
Wine
- See Wine
Wayland
Full RGB HDMI
- See proptest_full_rgb for more ports
sudo apt install 'libdrm-tests' -y && sudo -e '/etc/gdm3/PostLogin/Default' && sudo chmod +x '/etc/gdm3/PostLogin/Default' && sync
#!/bin/bash proptest -M 'i915' -D '/dev/dri/card'* '103' 'connector' '99' '1' proptest -M 'i915' -D '/dev/dri/card'* '103' 'connector' '107' '4'
Firefox
- See Firefox if old configuration is needed, otherwise use Firefox Sync
about:config
- See about:config
Extensions
gio open 'https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/' 'https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/'
uBlock Origin
Filters list
https://www.fanboy.co.nz/fanboy-problematic-sites.txt https://www.fanboy.co.nz/r/fanboy-ultimate.txt https://www.fanboy.co.nz/fanboy-cookiemonster_ubo.txt https://www.fanboy.co.nz/enhancedstats.txt
My filters
! Phoronix as a news source and not a toxic wasteland ! 2023/12/13 www.phoronix.com##.details > .comments www.phoronix.com##.author www.phoronix.com##.comments-label www.phoronix.com###sharebar www.phoronix.com###social www.phoronix.com###searchbox www.phoronix.com##div.popular-list > .comments ! Hide RuneScape Wiki clocks ! 2023/12/13 oldschool.runescape.wiki###utcdate > [href="#"] oldschool.runescape.wiki###footer-info-lastmod runescape.wiki##[href="/w/Clock_(interface)"] runescape.wiki###footer-info-lastmod ! X, toxic enough for an entire domain block ! 2023/12/13 x.com twitter.com ! End
DNS over HTTPS
- See dns_servers for other addresses
https://dns.quad9.net/dns-query
Server
- For workstations that run servers as a secondary directive
- For headless servers, use Ubuntu Server
Automatic Updates
Service
sudo -e '/etc/systemd/system/ubuntu-up.service'
[Service] Type=oneshot ExecStartPre='/usr/bin/apt' clean ExecStart='/usr/bin/apt' update ExecStart='/usr/bin/apt' full-upgrade -y ExecStart='/usr/bin/apt' autoremove -y ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/systemctl' reboot
Timer
- 03:00 Oak
sudo -e '/etc/systemd/system/ubuntu-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'ubuntu-up.timer' --now
[Unit] Description=Software Package Maintenance and Updater After=network-online.target Wants=network-online.target [Timer] OnCalendar=*-*-* 03:00:00 Persistent=true [Install] WantedBy=timers.target
Notable Folders and Commands
- See misc_linux
/srv/www/wiki/data/attic/distros/ubuntu_desktop.1702474960.txt.gz · Last modified: (external edit)