Long long ago, I tried Debian and it struggled to do a lot of pretty basic things (play DVDs, hardware, graphics, laptops). I respect Debian’s enhanced wholesomeness, but the functionality was just too constrained. These days however, Debian is fine for me. In fact, it’s the only sane distribution that "doesn’t break userspace". Add your stupid new features and ways of doing things, but, jeez, don’t take away perfectly good things that people have come to depend on. I find that today (2016) Debian with MATE is 100% configurable to be exactly how I want it with minimal fuss. Here are my notes for doing that, not because it’s complicated, but because if I have a list I won’t forget anything and I will be able to set up a perfect system from scratch in about 15 minutes.

Install

Here’s a process for installing 64-bit Debian on a Pi4. I suspect this will get more obvious pretty soon.

When it asks for packages choose the MATE package and sanity will be preserved.

Or, just go with minimal Debian Desktop with no window manager and then choose the window manager. This can save time when you have to install from a lower version and dist-upgrade to a higher one after.

sudo apt-get install mate-desktop-environment-core

Or this if you want all the bells and whistles.

sudo apt-get install mate-desktop-environment \
                     mate-desktop-environment-extras

Even after doing this I still had a hard time getting it activated. Here is one plausible thing to explore.

sudo update-alternatives --config x-window-manager

For some reason that did not work at all for me. Eventually, I needed to install lightdm and then try update-alternatives. This changed the display manager and with lightdm there is a pull down at the top for choosing Mate. After doing that once, everything is fine.

Looking at an old system and curious about when it was installed? Try this.

ls -lct /|tail -n1|cut -c32-43

Remove Garbage

Debian is very wholesome and usually does the right thing, but sometimes, normal systems have some cruft which can and should be disposed of immediately. Here is a nice review of what can and should be ditched in a Linux system.

One tiny thing to also get rid of if you’re weird like me and are competent with tar and gzip is sudo apt remove engrampa. I find this cures a lot of annoyances later where the system (mostly browsers) desperately wants to save you from knowing what’s really going on with archived files.

ModemManager

This thing is nuts. For some reason it is tenaciously present on all kinds of systems and it seems to be valid only for laptops with cell phone modems. Or something like that. Come on people, why not just use a hotspot and be done with it? So I consider this very exotic and almost impossible to really truly be needed.

sudo systemctl stop ModemManager
sudo systemctl disable ModemManager
sudo apt purge --auto-remove modemmanager

People programming Arduinos or doing any kind or serial port interaction should take special note here because ModemManager will reliably break everything.

IPv6

I love IPv6 in theory but no ISPs in the real world I inhabit support it at all. So it really can only get itself into security trouble. Try something like this.

sudo bash -c 'echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf'

Or add all of this to /etc/sysctl.conf.

net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

Then reboot or reset settings with this.

sudo sysctl -p

Check with ifconfig. See if on next reboot servers are no longer listening on IPv6 with netstat | grep -i listen.

A good discussion of the futility of IPv6 and how to disable it.

Non-Graphical Server

Not using graphics? At all? This happens with servers, and embedded little computers for specific functions. How to turn off the GUI circus and get to what people in the old days of SysV called runlevel 3? In the past the inittab command was used but not today with Systemd.

First find out what the default boot target mode is.

systemctl get-default

To switch to text mode do this.

sudo systemctl set-default multi-user.target

To switch back to GUI.

sudo systemctl set-default graphical.target

If you’re repurposing a lights out server to be a workstation and you need to troubleshoot why the graphics isn’t coming up make sure you have lightdm or some other display manager installed.

Here are the old runlevels and the roughly equivalent systemd targets.

0

poweroff.target

1

rescue.target

2,3,4

multi-user.target

5

graphical.target

6

reboot.target

Rebooting is the surest way to get this to take effect — and make sure it works on a reboot! In theory, this can do it without dropping the machine just like the old init 3 could, but I didn’t test it.

sudo systemctl isolate multi-user.target

Tracker

Sometimes in the process list you’ll find tons of /usr/libexec/tracer-miner-fs. What is this? Sounds ominous. As best I can tell, this is some Gnome or maybe other GUI thing that is used to aggressively cache file (paths? don’t know) data so that it can be used for things like GUI file dialog boxes. Maybe this is how it knows you just deleted a file while the dialog was open. Don’t know for sure. But, it does seem that it has its obvious downsides in performance robbery and that if you’re not using any GUI at all (multi-user.target), well, it can’t be too useful.

This service tends to pile cruft into ~/.cache/tracker.

To stop it and clear out its (possibly huge) caches do one of these.

tracker reset --hard
tracker reset -r
tracker-control -r

Maybe edit these:

/etc/xdg/autostart/tracker-miner-fs.desktop
/etc/xdg/autostart/tracker-miner-store.desktop
/etc/xdg/autostart/tracker-miner-apps.desktop

Maybe change the X-GNOME-Autostart-enabled to false.

Hmm. This doesn’t quite work. The parent process seems to be systemd since I’m not using a GUI on this machine. Yet sudo service --status-all does not show any tracker item. Perhaps it’s a dependency of something that is active.

Ok, just resorted to this.

sudo apt remove tracker tracker-extract tracker-miner-fs

This did get rid of gnome and nautilus and a bunch of important sounding things if you are not running a non-graphical server. We’ll see if they’re important to non-graphical server use.

apt-daily

When did Debian start sneaking in updates without telling me? Well, I understand that it’s probably ok for normal people, but I want to see the updates and do them explicitly. So this stuff is kind of creepy. Also imagine if your bandwidth is very expensive and you want to do updates only when the ship is in a port, for example.

sudo systemctl mask apt-daily.service apt-daily-upgrade.service
sudo systemctl disable apt-daily.service apt-daily-upgrade.service
sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer

Exim

Do you need a MTA moving email around? No, me neither. I’m accessing all my mail on my proper server and normal people often are 100% web mail, so this large complex system can be a real mess. I’ve found it is often the top CPU consuming process on my Debian system. Here’s how to completely get rid of mail handling on Debian.

sudo apt-get --purge remove exim4 exim4-base exim4-config exim4-daemon-light

accounts-daemon

I agree with the author of the review that having some daemon do stuff with accounts that I’m not explicitly doing can only be not good. For people who want to use GUI interfaces to created accounts, sure, keep it I guess. But if you want to administer your system properly it is best to disable this for security.

sudo systemctl disable accounts-daemon.service

avahi-daemon

Avahi "enables you to plug your laptop or computer into a network and instantly be able to view other people whom you can chat with, find printers to print to or find files being shared. Compatible technology is found in Apple MacOS X (branded "Bonjour" and sometimes "Zeroconf")." Nuff said — let’s throw it overboard.

sudo systemctl disable avahi-daemon.service

wpa_supplicant

If you’re using a laptop or a computer with wifi, leave this alone. However, if you know your desktop gaming computer has no wifi, should never have wifi, and will never have wifi, it is probably reasonable to disable this. Maybe even remove it.

sudo systemctl disable wpa_supplicant

winbind

Using Samba? Or maybe you need your machine to show up on a Microsoft Network Neighborhood? Ya… me neither. Nothing wrong with Samba if you need it, but until you do…

sudo systemctl disable winbind.service

cups

Never going to print? Ever?

sudo systemctl disable cups-browsed.service
sudo systemctl disable cups.service

Wifi

By being wholesome with respect to licenses, Debian is at odds with wifi manufacturers who are notoriously unfriendly to open source efforts. This is because they worry that they’ll get on the wrong side of the FCC with respect to radio transmission regulation if they let just anybody have complete control. Tricky problem. But once your Debian is installed and not happy with the wifi, you can go get the lesser of evils.

Here’s how to see what kind of wifi device you have.

$ lspci | grep -i net
01:00.0 Ethernet controller: Qualcomm Atheros AR8151 v1.0 Gigabit Ethernet (rev c0)
02:00.0 Network controller: Broadcom Limited BCM43225 802.11b/g/n (rev 01)

Looking through the list for "43225", I find that the driver I need is brcm80211. Following to the link I find that this cures it.

$ sudo apt-get install firmware-brcm80211

Then on reboot (you could load modules manually too) the networking icon in the bar should work.

If you’re installing and you have no other network, the installer will sometimes complain that it doesn’t have the proprietary drivers and ask if you want to supply them on removable media. It will list the exact files you need. Look those files up (you’ll need some computer/telephone somewhere for this) and find out what deb package they are part of. You need that whole deb package, not just the files it explicitly mentioned. Copy the suitable deb onto a normal person USB drive and put that in and it should find it and carry on with the install.

I just had luck with this again. Here is a good place to search for the stuff you need.

https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/

I find that Realtek wifi drivers are far away the most annoying deficiency for the install process. I had to hunt down this exact one.

firmware-realtek_20210315-3_all.deb

You can imagine in the future it will be similar with some different date numbers.

I also was out of USB ports since the install drive was in one. I tried to put this stuff on the install drive itself, but didn’t have luck. I did have luck getting an SD card in a laptops built in SD reader to work.

Update/Upgrade

Dang, don’t you hate it when you start a lengthy update and walk away only to come back in an hour and find that 2 minutes into the process it stopped to ask you to read some stupid thing (ahem Debian, why don’t you guys have a look at how Gentoo does it?).

I think this generally works.

sudo apt-get -y update

But maybe you need this.

sudo apt-get -y --force-yes update

Then of course you have to do this.

sudo apt-get upgrade

No Really, Seriously, UPDATE

Debian likes its little updates, but there comes a time when all the cool people are laughing at your make version 4.0 because they’re all using 4.1. You do the update/upgrade dance and it says everything is up to date. But it is not. There may be a newer major release and the only way to know that, as far as I can tell, is to look some place like this.

For example, this page might say something like this.

  • The next release of Debian is codenamed "trixie" — "testing" — no release date has been set

  • Debian 12 ("bookworm") — current stable release

  • Debian 11 ("bullseye") — current oldstable release

  • Debian 10 ("buster") — current oldstable release under LTS support

  • Debian 9 ("stretch") — archived release under extended LTS support

  • Debian 8 ("jessie") — archived release under extended LTS support

  • Debian 7 ("wheezy") — obsolete stable release

  • Debian 6.0 ("squeeze") — obsolete stable release

  • Debian GNU/Linux 5.0 ("lenny") — obsolete stable release

  • Debian GNU/Linux 4.0 ("etch") — obsolete stable release

(I won’t inquire about why they dropped "GNU/Linux", sorry RMS!) Where do those goofy names come from? Official answers are found here.

The procedure for doing this is nicely covered here and basically entails the following.

sudo apt update          # Get current system well up to date.
sudo apt upgrade
sudo apt full-upgrade
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sudo apt clean          # Start the new system upgrading.
sudo apt update
sudo apt upgrade
sudo apt full-upgrade # Safe to "yes" for restart services - i.e. SSH/cron.
sudo apt autoremove
sudo apt clean

Now reboot. Unless precautions are taken, be ready for the IP address to be different and the SSH host keys to be different, etc.

Then do another apt update && apt upgrade. Here’s an annoying bonus annoyance that probably is only valid from 10 to 11. You may have to fix this and it can be done after the bulk of the upgrade is done.

sudo sed -i 's@security/* bullseye/updates@security/ bullseye-security@' /etc/apt/sources.list

Sometimes you might have problems like this when you try the new upgrade.

The following packages have unmet dependencies:
 inetutils-ping : Conflicts: ping
E: Broken packages

I believe this is because some packages are merged and no longer used. The way to solve it is simply get rid of the offending packages (if they are not system critical).

sudo apt remove inetutils-ping

Timezone

Did you just move several timezones away? Easily fixed.

sudo dpkg-reconfigure tzdata

It’s an ncurses thing — choose your new zone. Done.

Curing Caps Lock

Go to System→Preferences→Keyboard→Layouts→Options→Ctrl key position Check "Caps Lock as Ctrl".

Amazingly the virtual console can also be cured with minimal fuss.

sudo sed -i 's@\(XKBOPTIONS="\)@\1ctrl:nocaps@' /etc/default/keyboard
sudo dpkg-reconfigure -phigh console-setup

Takes effect after the next reboot.

Users

During installation the user setup in Debian is not as helpful as I’d like it to be. I need a UID of a specific number to match everywhere else I use it and Debian doesn’t seem to think of that. Basically I just make a throwaway account during installation.

What is weird is that this account that is made during installation is not automatically (or even by setting an option) put in the sudo group. (Could this be the one thing that is better about Ubuntu?) So you either have to log in as root (avoiding that is the whole reason the install system insists you create a non-root user, right?) or do this from your bogus user’s account.

su -
gpasswd -a bogusaccount sudo
exit

And because group changes are not especially good at taking effect in any Linux I know about, you have to log out of bogusaccount and then back in. Now bogusaccount has sudo privileges like it should have from the start. The other way is just to make your real account while you su into root.

Create the real account. (This might be in /usr/sbin/useradd on Raspbian.)

# /sbin/useradd -m -U -u 11111 -d /home/xed -s /bin/bash xed
# passwd xed
# gpasswd -a xed sudo
# apt install sudo # Might as well prevent a return trip to this account.

Exit out of the su, log out of the bogus user, and log back in as your real user which should be fine now. Get rid of the temporary account.

$ sudo /usr/sbin/deluser --remove-all-files delme

Use delgroup if the group lingers.

Groups

It can help to add your main user to groups that may help things. Here are some I’ve had to deal with.

  • dialout - to use the serial ports

  • video

  • crontab

  • wireshark

  • bluetooth

  • audio

Just add them with something like this.

gpasswd -a xed dialout

Or all in one go.

for G in dialout video crontab audio ; do sudo gpasswd -a xed $G ; done

Also if you’re ever adding your own user to groups you will very annoyingly find it does not seem to work. To get it to take effect, you either need to log out and log back in again or do this.

id xed      # The new group will often be here!
id          # But not here... WTF?
newgrp -    # In theory this helps.
id          # Not sure in practice. Wise to check.

Of course this actually doesn’t necessarily work! But it is a hint on how to research it further.

GRUB Timeout Fix

Before you reboot to let the new groups settings take effect, might as well fix grub’s time out. When I’m trying to get the full power cycle round trip down around 20s I don’t need 5 seconds spent on the grub prompt. Here’s how to shorten that.

sudo sed -i 's/TIMEOUT=5/TIMEOUT=2/'  /etc/default/grub
sudo grub-mkconfig
sudo update-grub

Remove Useless Bars

The bar at the bottom of the screen is absurdly redundant. It normally contains a Workspace Switcher which can sometimes be useful. Still, absolutely no need for two screen wasting bars.

Right click the top panel. Choose "Add To Panel" and find "Workspace Switcher" at the very bottom of the list. Feel free to add System Monitor if that makes sense. Now you can safely get rid of the bottom panel by right clicking on it and selecting "Delete this panel".

Right click on the top panel and choose "Properties". Orientation should be "Left" and check "Autohide".

Terminal

Open a terminal with Applications→System Tools→MATE Terminal

On the menubar click Edit→Profiles and select "Default" and click Edit. Choose Colors tab and uncheck "Use colors from system theme". Choose "White on black" from the pull down. Choose Scrolling tab and choose "Scrollbar is: Disabled" and give a scrollback buffer of 5000. Close.

Create a new keyboard shortcut for this command.

/usr/bin/mate-terminal --hide-menubar

Bind it to Ctrl+Shift+N.

Alt-Tab Annoyances

The new Mate shows some very misleading icons when you alt-tab. These are derived from your actual windows which sounds good in theory but in practice it is confusing and annoying. Apparently it’s a bit slower too because the setting to change to cure it is this.

gsettings set org.mate.Marco.general compositing-fast-alt-tab true

Remove Useless Desk Icons

First install dconf-editor.

apt-get install dconf-editor

Run that as a normal user since these settings are done per user. If you run it as sudo it will apply the settings to the root account.

Go to org->mate->caja->desktop and change the following by sliding the "Use default value" switch to grey/left and then choosing "False" (until it is dark gray) as your "Custom value"; click the green checkbox in the lower right and you’re good. Scrub all of these dumb icons.

  • computer-icon-visible

  • home-icon-visible

  • trash-icon-visible

I’ll leave "volumes-visible" because I want to know if that kind of automounting ever happens. See below.

One time I was cleaning dumb stuff in my $HOME directory and I got rid of the empty Desktop directory. This put stupid icons for the entire contents of $HOME on the "Desktop". I like to have a completely blank desktop so this was very bad. I cured it by making an empty directory called ~/.Desktop and then making sure this file was this way.

$ cat .config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/.Desktop"
XDG_DOWNLOAD_DIR="/tmp"
XDG_TEMPLATES_DIR="$HOME/.Desktop"
XDG_PUBLICSHARE_DIR="$HOME/.Desktop"
XDG_DOCUMENTS_DIR="$HOME/.Desktop"
XDG_MUSIC_DIR="$HOME/.Desktop"
XDG_PICTURES_DIR="$HOME/.Desktop"
XDG_VIDEOS_DIR="$HOME/.Desktop"

You can also explore the xdg-user-dirs-update script whose reason to exist seems questionable.

No Automounting

I don’t need USB flash drives doing nefarious things behind my back; I’ll mount things explicitly, thanks.

Again use dconf-editor as previously mentioned look for this.

org->gnome->desktop->media-handling
  • Uncheck automount

  • Uncheck automount-open

  • Check autorun-never

Also look at this.

org->mate->desktop->media-handling

Same deal. This seems to cure it if the first doesn’t.

After doing all this I still had automounting problems. What finally cured them was this.

systemctl mask udisks2
systemctl stop udisks2

I don’t know what is sufficient and necessary but these are good hints.

And if you’re like me and you don’t like automounting, you might like a comprehensive set of mount points.

sudo mkdir -v /mnt/sd{a..z}{1..4} /mnt/sd{a..z}

Mountpoints

Speaking of mounting, if you’re going to be handling that task personally, don’t forget to add some handy mountpoints.

$ sudo mkdir /mnt/sd{a..h} /mnt/sd{a..h}{1..4} /mnt/{windows,backup,ext,usb}

Swaps Are Usually Inappropriate

Swaps being configured and enabled are completely nonsensical today. What they do mostly for most people is take a stupid problem where you’ve stupidly asked for too much memory and it prolongs it. So instead of having your Blender job fail after burning through all memory in a minute, it will fail in 2 hours after burning through all memory in a minute and flogging your delicate write limited SSD for an hour while you sit there thinking it has hung. In the ancient days there was a rule of thumb (which I can’t quite remember because it’s irrelevant today) of something like X% of RAM should be available in a swap partition. But that was back when we had 16 MEGA bytes of RAM and a little disk help could go a long way. But once we hit gigabytes of RAM, this whole strategy became absurd. But distros didn’t really amend their install processes to reflect that. And when SSDs came along, these swaps actively murder them committing the worst sin possible for a system: data loss. Who is using a mechanical drive for (mostly read-only) OS volumes these days? No one I hope. So — swaps = mostly bad unless you really know what you’re doing.

Check for swaps.

$ cat /proc/swaps
Filename                                Type            Size            Used            Priority
/swapfile                               file            2097148         0               -2

Turn it (-a = all) off.

sudo swapoff -a

Best to comment this out or remove it.

$ grep swap /etc/fstab
/swapfile                                 none            swap    sw              0       0

Theme

System→Preferences→Appearance In the Theme tab I like "TraditionalOkTest"; you can’t miss it which is the point.

Meddling with Firefox default CSS can be fun too. Power to the client where it belongs! Check this out.

~/.mozilla/firefox/hash7c28.default/chrome/userContent-example.css

Of course this will cause many stupid forms to show up black on black or white on white since dumb web devs will set one or the other. So it’s best to make these have some color and to know how to look for this file in the Shift-F7 style profiler or Inspect Element.

Display Manager Settings

One thing I sometimes like to do, especially with portable computers, is to put my contact information on the login page. This way if someone finds my computer and wants to return it to me, they can (without leet hacker skills). I have done this by changing the default login background which is an SVG. Of course getting everything to line up on all monitors can be a pain.

If you want your own SVG image on the login screen investigate the lightdm-gtk-greeter-settings package. Once installed look under System->Control Center. Or maybe just play around with putting your own image at /usr/share/images/desktop-base/login-background.svg. Actually, that’s a nest of symlinks — I think the real one lives at /etc/alternatives/desktop-theme/login/background.svg. Don’t forget to make sure its mode is 644 or it won’t work.

Here’s one I use that can give you some ideas. Just cut and paste this to be the login-background.svg file somehow.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 480 270" version="1.1" >
  <!-- == Background == -->
  <defs> <linearGradient id="thegradient" x1="200" y1="100" x2="800" y2="800" gradientUnits="userSpaceOnUse" >
      <stop style="stop-color:#000000" offset="0" /> <stop style="stop-color:#888888" offset="1" />
  </linearGradient> </defs>
  <rect y="0" x="0" height="1080" width="1920" style="fill:url(#thegradient)" />
  <!-- == Place Features == -->
  <g transform="matrix(.35,0,0,.35,180,50)"> <!-- Xscale,rot,skew,Yscale,Xpos,Ypos -->
    <!-- == X Logo == -->
    <g transform="translate(-93.766085,42.315052)" style="fill:#9ab0c9;fill-opacity:1;stroke-width:0.5" >
      <path d="M-100,100 L-68,100 C-55,72 -35,50 -6,38 L0,60 L6,38 C38,50
      55,72 68,100 L100,100 L100,68 C72,55 50,33 38,6 L60,0 L38,-6 C50,-33
      72,-55 100,-68 L100,-100 L 68,-100 C55,-72 33,-50 6,-38 L0,-60 L-6,-38
      C-33,-50 -55,-72 -68,-100 L-100,-100 L-100,-68 C-72,-55 -50,-33 -38,-6
      L-60,0 L-38,6 C-50,33 -73,55 -100,68 z M-20,20 L-8,0 L-20,-20 L0,-8
      L20,-20 L8,0 L20,20 L0,8 L-20,20 z" fill="#ff8800" stroke="#cecece" stroke-width="3"> </path>
    </g>
    <!-- == Text == -->
    <text fill="#ff8800" font-size="24" font-family="sans-serif" x="20" y="50">Chris X Edwards</text>
    <text fill="#ff8800" font-size="16" font-family="sans-serif" x="60" y="70">chris@xed.ch</text>
  </g>
</svg>
Chris X Edwards chris@xed.ch

Displays

System→Preferences→Monitors Uncheck "Same image in all monitors".

Trackball

Out of the box, the middle buttons on my Logitech Marble Mouse are not activated. Somewhat outdated Ubuntu chatter is possibly helpful here.

Some newer information is coming to light on the Amazon answer where I complained about it.

https://www.amazon.com/ask/questions/Tx12EKTZ7XE87M5/

What worked was to put this in ${HOME}/.xsessionrc.

# Fix the marble mouse problems.
if grep "Logitech USB Trackball" /proc/bus/input/devices >/dev/null 2>&1 ; then
    xmodmap -e 'pointer = 1 8 3 4 5 6 7 2 9' >/dev/null 2>&1
fi

Check .Xsession-errors and /var/log/lightdm/* if there are errors, especially ones that prevent you from starting a session.

Web Cam

Do you have a proper microphone? Yes? And you have a web cam? Then your problem is that the web cam mic wants to aggressively be the audio input when it should not even exist. It turns out that modern Linux lets you disable that microphone while leaving the camera functional.

Use tools like this to figure out what the "idVendor" and "idProduct" are.

udevadm info -a /dev/snd/by-id/*
lsusb -v

Then make a rule in a new file like "/etc/udev/rules.d/90-blacklist-webcam-sound.rules" containing something like this.

SUBSYSTEM=="usb", DRIVER=="snd-usb-audio", ATTRS(idVendor)=="XXXX", ATTRS(idProduct)="XXXX", ATTR{authorized}="0"

Note the last one is "ATTR" singular. Then try the new rules out.

sudo udevadm control --reload-rules

I haven’t had this actually noticeably work but it does seem like the right strategy even if the details need refinement. This technique was discovered here.

Screensaver Lock

Under System→Preferences→Screensaver, uncheck Screensaver and Locking. Click the Power Management button and from there set "Put display to sleep when inactive for:" to "Never".

Also if it’s not installed, install mate-power-manager and under System→Preferences→Power Management look for "Put display to sleep when in active for:" should be "Never" (since it takes so damn long for it to wake up).

Browser

Start browser for the first time with this.

iceweasel https://noscript.net

Go ahead and add Self-Destructing Cookies, Privacy Badger, HTTPS Everywhere, and JS free DDG.

Add this to .bashrc.

export BROWSER=/usr/bin/iceweasel
alias ff='bash -c "${BROWSER} &";exit'

Vim

sudo apt-get install vim
sudo apt-get purge nano
echo 'export EDITOR=/usr/bin/vim' >> .bashrc
sudo update-alternatives --config editor

This may also be good in .bashrc

alias visudo='sudo EDITOR=/usr/bin/vim /usr/sbin/visudo'

Display Manager Fixes

I understand not publishing a list of users at the login prompt but for a single user system, that’s just annoying. Strangely Debian seems to default to this.

The fix appears to be in the greeter-hide-users setting in /etc/lightdm/lightdm.conf. Uncomment the line that sets this to false (i.e. set it to false) and it should preserve the name of the last logged in user.

Note that in more recent Debian versions (bookworm for sure) just fixing this may not be necessary but it definitely is not sufficient. There is now a [Seat:*] section that also has these settings and it should be fixed too.

[Seat:*]
greeter-show-manual-login=true
greeter-hide-users=false

I’m not 100% sure about the greeter-show-manual-login setting but it has been recommended to cure this problem and didn’t seem to hurt.

Display Manager Icon

Newer Debian also seems very keen to put an icon in lightdm. That’s ok, but it will need to be my icon. (Though Debian’s default icon is an admirably optimized SVG at 7.5kb.) The simple approach is to use an SVG which display renders nicely (framed and bordered sensibly, etc). Simply copy this to ~/.face (n.b. no extension) and it seems to work.

Guest Account

The popular parasite distribution has a "guest" log in. That’s probably very bad for many situations. But it can make sense if you want to let trusted people use your computer. This can be accomplished in Debian by just making a new user whose home directory is in the /tmp directory.

sudo useradd -d /tmp/guest -s /bin/bash guest

No need to set a password, right? Hmm. Kind of sketchy if this host is on the real internet in any way!

Screen Blanking - NOT!

Sometimes it can be very annoying to have 10 subsystems all trying intently to get you to save the pixels on your phosphorous CRT by causing the screen to go blank after inactivity. Sometimes you have something you want to watch untouched for an hour. How to stop this madness of screen blanking?

Here are some things to check.

  • System→Preferences→Look and Feel→Screensaver (obviously)

  • System→Preferences→Hardware→Power Management

  • xset -dpms # CURED IT!!! Try ~/.xsessionrc

  • xset s off

  • xset s noblank

  • setterm -blank 0 # Cures console blanker. Try /etc/rc.local

Skeleton

Here’s my new system.

sudo apt install mercurial
mkdir /${HOME}/X && cd ${HOME}/X
hg clone ssh://${hostIP}/X/skelx
cd skelx && ./install

Or if you don’t want to type important passwords on random systems, push it out from the master copy on my server.

hg clone . ssh://192.168.1.64/X/skelx

Also don’t forget that Docker containers can clone from the Docker host

Networking

Static IPs

Do you have a demented Verizon router that won’t let you specify addresses to give for DHCP? Better take care of that stuff yourself. I’ve discovered two places where this networking stuff might be configured. And since this topic is such a mess, it may be wise to configure both.

Method 1 - systemctl

Basically you need to edit this file. Well, assuming this is where networking is being controlled from.

/etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp1s0
iface enp1s0 inet static
    address 192.168.1.9
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 1.1.1.1 8.8.8.8

I’m pretty sure that the auto enp1s0 line needs to be there for this interface to automatically come up. Once you’ve made the changes here you can restart networking with this.

sudo systemctl restart networking

Method 2 - NetworkManager

Ok, this is weird and annoying but not terribly shocking. There is a completely different way that freshly installed networking happens. Sometimes. And when you use Debian advanced options in the installer, you can set a static IP but it anti-helpfully keeps accepting random nonsense for IPv6. And it’s not in the place that Method 1 just detailed. So look in this file.

/etc/NetworkManager/system-connections/Wired\ connection\ 1

Nice file name. Anyway, it needs to look something like this.

[connection]
id=Wired connection 1
uuid=caee6a1e-74e0-45b2-b2a2-73c8b98795aa
type=802-3-ethernet

[802-3-ethernet]
mac=A0:1E:0B:0A:B4:72

[ipv4]
method=manual
dns=1.1.1.1;4.4.4.4
addresses1=192.168.1.23;24;192.168.1.1

[ipv6]
method=disabled
ip6-privacy=2

Note that I’ve seen warnings in syslog complain of the default configuration’s tendency to put trailing semicolons at the end of the dns and addresses1 fields. So I’m taking them off like a good sport; hope that’s ok.

Wifi

Need to edit access points without a bunch of GUI guff? Maybe on a Pi Zero? Look into this file.

/etc/wpa_supplicant/wpa_supplicant.conf

And make sure you’re happy with an entry like this.

network={
  ssid="FiOS-872TH"
  psk="obs0740ole7703ted"
}

If you’re using a more normal laptop system you may need to use NetworkManager which seems pretty standard. This baroque systems makes everything easier except editing details in configuration files. But even that can be done in an emergency. Check out something like this file.

/etc/NetworkManager/system-connections/SomeAirport.nmconnection

This can be useful for finding or fixing plain text passwords, etc. Normally you can do all you really need to do with nmtui.

Software

  • vim

  • rsync - It is usually present but some excessively minimal systems omit it. Which is crazy.

  • ssh

  • feh

  • htop

  • dstat

  • lftp

  • screen

  • tmux

  • inkscape

  • gimp

  • git

  • sshfs

  • make

  • gcc

  • smartmontools

  • net-tools - route, ifconfig, netstat, arp

  • dnsutils - provides nslookup, dig

  • wireshark

  • tcpdump - no, it doesn’t come with wireshark!

  • ethtool

  • mtr

  • lshw

  • mplayer

  • vlc

  • ffmpeg

  • mpg123

  • x11-xserver-utils - now includes "xrandr"

  • mercurial

  • wmctrl - for starting the idiotic firefox in the right place

  • cryptsetup - LUKS

  • system-config-printer - if you need to print and the config tools are not there.

  • nvtop

  • nvidia-smi - not found in Ubuntu, not sure why.

  • awesome

  • bsdmainutils - cal

Cut and paste this…
sudo apt install vim rsync ssh htop dstat lftp tmux net-tools sshfs make gcc smartmontools
sudo apt install feh inkscape gimp gifsicle mplayer vlc ffmpeg wmctrl x11-xserver-utils nvtop
sudo apt install mtr wireshark mpg123
sudo apt install ethtool mercurial git cryptsetup lshw dnsutils tcpdump
sudo apt install awesome nvidia-smi

Python

Sometimes updates can cause Python problems.

The traditional way was to use the update-alternatives command — maybe something like this.

sudo update-alternatives --config python

But after upgrading to Bullseye 11, I was left with no executable called python and update-alternatives didn’t seem to offer easy fixes for Python.

In the end I had to adjust my symlinks by hand and hope that doesn’t screw up any of Debian’s expectations in the future.

sudo apt install python # Creates a `python` but leaves it pointing to 2.7.
sudo ln -fs /usr/bin/python3 /etc/alternatives/python

Firmware

Sometimes Debian can be a real PITA by not having a sensible way to install required (proprietary) firmware images during the initial install. This can prevent graphics and wifi, for example, from working.

  • firmware-realtek - Have WIFI problems? Maybe the venerable Edimax USB adaptor?

  • firmware-amd-graphics - Have AMD graphics? Maybe on a laptop?

  • firmware-brcm80211 - for the Broadcom Limited BCM43225 among others.

Optional Packages That Are Sometimes Useful

  • xpdf - Seems to bring in cups so consider that carefully.

  • abcde - Need to "archive" personal music CDs? Generally not needed for work machines.

  • asciidoc - Brings in the whole TeX universe at an obese 1.2 GB!!! And seems dead.

  • asciidoctor - Needs Ruby which (a comparatively light 7MB) but is not dead like asciidoc.

  • chromium - Sometimes you need the Google Desktop Client. Sometimes you don’t.

  • xfsprogs - Only if you formatted something XFS of course. Which is worth doing!

  • wireless-tools - Only if you’re using wifi. Provides iwconfig, iwlist, etc.

  • openvpn -

If you installed from mate-desktop-environment-core as an upgrade to Mate rather than just selecting the entire Mate oriented distro you might also find use for these.

  • mate-applets (for system monitor)

  • mate-system-monitor

DVDs and libdvdcss

Does your computer have a disc hole and would you sometimes like to watch DVDs on your computer? If so, you’ll likely need to decrypt most DVDs. And Debian doesn’t want anything to do with that. But they make it reasonably easy. This worked for me.

sudo apt install libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg
vlc dvd://

You can find full instructions and the code itself on the libdvdcss website.

Nvidia

Graphics stop working after a new install on an Nvidia system? Well, those Debian folks have mixed feelings about Nvidia’s proprietary drivers. On one hand they make it so it doesn’t work, but on the other hand you can fix that. Official help is here.

Try to log in some how and install

nvidia-detect

This may require appending the lines in your /etc/apt/sources.list with main contrib non-free instead of just main.

Run that program and install what is recommended. For my NVIDIA Corporation GK104 [GeForce GTX 760] I had to install

nvidia-driver

In old times it was sometimes required to have something like this in place.

/etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
    Identifier "My GPU"
    Driver "nvidia"
EndSection

But today I’ve successfully ignored it. Simply…

Reboot.

If you’re using real Nvidia hardware don’t forget this.

sudo apt install nvidia-smi

Compiler

Need to use a computer like you’re serious about it? You’ll want a compiler. Debian has a shortcut for that kind of thing which is very helpful but I often forget it. Here it is.

apt install build-essential

Steam

Steam was pretty easy to install. First, add this to /etc/apt/sources.list. Replace jessie with the proper version (e.g. stretch) if needed. Actually just find this line and add contrib non-free to the main entry already there.

deb http://httpredir.debian.org/debian/ jessie main contrib non-free

This seems to be necessary and probably can’t hurt on a Steam box.

dpkg --add-architecture i386

Don’t forget to do this.

apt update

Then you can just do the obvious.

sudo apt install steam

If you get the error an error like this…

You are missing the following 32-bit libraries:
libGL.so.1

I used to have luck with this.

apt-get install libgl1-nvidia-glx-i386

Now on 9 (stretch) and 10 (buster), I’ve had luck with this.

apt-get install libgl1-nvidia-glx libnvidia-glcore:i386

Now on 10 I had to do this.

apt install libgl1-nvidia-glvnd-glx:i386

Needs a reboot because of the module situation.

To move the obese user directories to another volume, set up something like this.

  • .steam → /data/xed/S/.steam/

  • Steam → /data/xed/S/Steam/

  • .steampath → .steam/sdk32/steam

  • .steampid → .steam/steam.pid

How to move downloads from previous installations is an ongoing area of research, but it looks like you’ll want the manifest files as well as the directories actually containing the game.

:->[usb128][~/old_steam/.steam/steam/steamapps]$ cat appmanifest_370360.acf
"AppState"
{
    "appid"     "370360"
    "Universe"      "1"
    "name"      "TIS-100"
    "StateFlags"        "4"
    "installdir"        "TIS-100"
    "LastUpdated"       "1482809267"
    "UpdateResult"      "0"
    "SizeOnDisk"        "84036583"
    "buildid"       "717588"
    "LastOwner"     "76561198123579102"
    "BytesToDownload"       "29826000"
    "BytesDownloaded"       "29826000"
    "AutoUpdateBehavior"        "0"
    "AllowOtherDownloadsWhileRunning"       "0"
    "UserConfig"
    {
        "Language"      "english"
    }
    "MountedDepots"
    {
        "370363"        "1208369354753219700"
    }
}
:->[usb128][~/X/old_steam/.steam/steam/steamapps]$ ls -d common/TIS-100/
common/TIS-100/

This seems to work. Shut down Steam first. Copy the .acf manifest files into the steamapps directory. Then copy or move the directory containing the game (referred to in the manifest) to the steamapps/common directory. When Steam starts back up, it will find these things and assume they’re good to go. As normal, it does its update check and usually starts updating some of them.

Steam Launch Voodoo

  • /dxadapter=0 /borderless=0 /dx11 - This worked for me on one game.

  • -offline - Grasping at straws to dodge the pernicious ubi connect.