I have some peculiarities for my desktop setup that I use every time I reinstall a new OS. So instead of researching how to do the setup all over every time I reinstall an OS, dual boot, or distro hop, I will throw them all in a blog post and save some keystrokes and a bit of time. On my main computer, an old Dell Optiplex, with an NVIDIA GTX1650, I am dual-booting Kubuntu 20.04 and Windows 10.
Caps Lock/Left Control Swap
It all started with 20 quid spent on Amazon. I was hooked when I saw the design but did not want to spend a fortune on it, so I bought it used and with a Japanese layout. The layout on this keyboard and the playing around with Emacs gave me an idea to make life easier for my left pinky: swap Caps Lock key with Left Control. Here’s how to do it on Windows, GNU/Linux and macOS.
Windows
There are a plethora of small apps to change the keyboard mapping. The one I use at the moment is KeyTweak. The program was created by a developer called Travis Krumsick and it works well for my purpose.
The use is straightforward: select a key and remap it. I could not find an official website to download, but there are two links below which I scanned with virus total. The scan was clean for 68 out of 69 antivirus engines. I suspect the file was found malicious on one engine because it changes the windows registry, which is needed to remap the keyboard. Windows Defender is happy with it, and so am I.
MajorGeeks: https://www.majorgeeks.com/files/details/keytweak.html
Bleeping Computer: https://www.bleepingcomputer.com/download/keytweak/
GNU/Linux
On Linux, there are just a few letters to add to a file and the mod is ready. This is done in the terminal and the file to change is the aptly named “keyboard”.
sudo nano /etc/default/keyboard
Look for the with XKOPTIONS and change it to XKOPTIONS="ctrl:swapcaps"
then press Ctrl + x, confirm changes with y and reboot.
If not happy with the result, change the row back to
XKOPTIONS=""
MacOS
The good people at Apple provided a settings option for changing keys on the macOS, and you will find it in Settings > Keyboard > Modifier Keys… On macs, Command is the Ctrl key equivalent, so this is the one replaced.
GNU/Linux-Windows 10 Dual Boot Date/Time
When dual-booting Linux and Windows there always seem to be a disconnect between the system time on the two operating systems. This is because Windows and Linux interpret the hardware clock, the CMOS/BIOS clock on the computer motherboard, differently. Windows thinks of it as local time, while Linux assume it’s UTC and applies an offset to it.
The easiest way to resolve the issue is to make Linux read the hardware time as local time.
timedatectl set-local-rtc 1 --adjust-system-clock
Other Useful Mods
Wireless USB Adapter GNU/Linux Driver Install
This no longer applies to the desktop setup as I am using a cable, but the Github repository with the modified driver was invaluable for a long while while I was using a TP Link Archer T2U Nano wireless USB adapter.
I have successfully tried this on Fedora 33 and Ubuntu 20.04. The fix requires a Github account and it is done in terminal.
Install git:
sudo apt install git dkms
Clone the repository. It will require your Github username and password or PAT (Personal Authentication Token).
git clone https://github.com/aircrack-ng/rtl8812au.git
Go to the downloaded repository folder:
cd rtl8812au
Install driver:
sudo make dkms_install
Now restart the PC and the network options in the system setting will show the available wireless networks.
Audio Issues on Bluetooth Devices
Not an issue at the moment as I don’t use bluetooth headphones, but this Arch wiki page saved me a lot of frustration.
NVIDIA Driver Install
Last but not least, the dreaded NVIDIA driver. I can’t get out of my head the image and message of Linus Torvalds to NVIDIA. Oh the memes…
On the Ubuntu distro I use at the moment, this is not a major issue, but just for documentation I will attach a tutorial on if-not-true-then-false website that I installed on my Fedora machine. The install is a bit convoluted and the people on this website do a fantastic job in explaining it.
These are some of the tweaks on my home setup and here are some extra info links:
- https://scribles.net/mapping-caps-lock-key-to-control-key/
- https://opensource.com/article/18/11/how-swap-ctrl-and-caps-lock-your-keyboard
- https://www.nickang.com/2020-03-06-how-to-setup-access-to-github-from-terminal-with-2fa/
- https://askubuntu.com/questions/1149117/tp-link-ac600-archer-t2u-nano-driver-for-ubuntu-18-04
- https://www.howtogeek.com/323390/how-to-fix-windows-and-linux-showing-different-times-when-dual-booting/
- https://itsfoss.com/wrong-time-dual-boot/
- https://askubuntu.com/questions/1149117/tp-link-ac600-archer-t2u-nano-driver-for-ubuntu-18-04
- https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling
- https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/#nvidia-install
- Featured image made by Kiranshastry from www.flaticon.com