Things to do after switching from Ubuntu to Debian
Recently I have switched from Ubuntu MATE 18.04 to Debian 9.6. Whole process went smoothly as both distributions are very similar. But there are few tricks that Ubuntu does automatically for you and Debian doesn’t.
WiFi drivers
Official Debian images doesn’t include any non-free drivers, so chances are that WiFi won’t work out of the box.
First step is to add non-free
component to /etc/apt/sources.list
:
deb http://ftp.agh.edu.pl/debian/ stretch main contrib non-free
Then install driver:
# apt-get update && apt-get install firmware-iwlwifi
iwlwifi
stands for Intel WiFi driver, so change it accordingly. https://wiki.debian.org/iwlwifi#Installation
Disable MAC address randomization
By default Debian randomize MAC addresses, which is causing that WiFi isn’t auto connected on start up. To disable this feature you need to edit /etc/NetworkManager/NetworkManager.conf
file:
[device]
wifi.scan-rand-mac-address=no
Source ~/.profile on login
~/.profile
file is very convenient place for setting any environment values. In contrast to ~/.bashrc
, environment values from ~/.profile
are accessible not only to text terminals but also for GUI applications, like IDEs. By default Ubuntu source ~/.profile
file on login, but Debian doesn’t.
To enable parsing ~/.profile
file create ~/.xsessionrc
file with following content:
if [ -r ~/.profile ]; then . ~/.profile; fi
Be aware that any mistake in ~/.xsessionrc
probably make login using graphical interface impossible, in that case use text terminal Ctrl+Alt+F1
to remove/repair this file.
There is a lot more to learn why ~/.profile
isn’t sourced by default: https://wiki.debian.org/Xsession
Enable taping on touchpad
I’m used to use whole touchpad area for clicking, unfortunately in current Debian version with MATE environment it can only be enabled by creating configuration file:
# mkdir -p /etc/X11/xorg.conf.d
# echo 'Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "on"
EndSection' > /etc/X11/xorg.conf.d/40-libinput.conf
Both commands needs to be executed as root
. https://wiki.debian.org/SynapticsTouchpad#Enable_tapping_on_touchpad
Printing
During installation process, by default Debian installs Print server
. But I opt out from it, because I though that I won’t be needing it. Of course I was wrong :P
# apt install task-print-server system-config-printer
https://wiki.debian.org/SystemPrinting
Setup MariaDB admin account with password
Debian comes with MariaDB
instead of MySQL
. By default you can connect to database using unix socket authentication instead of old password method. But some legacy application may require password authentication, easiest way to set it up is to connect to the database as root
using socket:
$ sudo mysql
or
# mysql
and create new account:
GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-debian-9
Hiding MATE icons
If you want to remove Computer
, Home directory
and Trash
from the desktop there is great tutorial here: https://mydayswithlinux.wordpress.com/2015/08/12/how-to-hide-desktop-icons-in-mate/
However, in my Debian installation dconf-editor
was missing, so I needed to install it first:
$ sudo apt install dconf-editor
Adding entries to MATE menu
Sometimes I need to add shortcut to MATE menu, in Ubuntu I could easily right click on menu icon and edit menu. Unfortunately that’s not possible in Debian. But there is quick fix for that, you just need to install mozo
:
$ sudo apt install mozo
and run it:
$ mozo
https://github.com/mate-desktop/mozo
Open “Applications” menu using Windows key
By default, in order to open Applications menu you need to use Alt + F1
combination, which is not ideal for me. I prefer to use Windows key for that, it can be easily set up:
gsettings set org.mate.Marco.global-keybindings panel-main-menu 'Super_L'
Missing applications
There are few applications that Ubuntu MATE has installed by default that I miss in Debian:
# apt install redshift-gtk vlc transmission simple-scan gnome-disk-utility gnome-system-tools
vlc
and transmission
are obvious, redshift-gtk
is blue light filter. http://jonls.dk/redshift/
Enable `ll` alias
Ubuntu has very convenient shortcut ll
which alias ls -la
. Debian also has this alias, but is commented out in .bashrc
, also on Debian is only ls -l
, without -a
switch.
To enable alias add:
alias ll='ls -la'
to ~/.bashrc
file.
That’s it :)
Hope that this post may help you get you through transition process with less headache.