Fedora / GNOME
Decimal period instead of comma on the numpad
gsettings set org.gnome.desktop.input-sources xkb-options "['kpdl:comma']"
Source: askubuntu.com
Clean up /var/cache/PackageKit
sudo pkcon refresh force -c -1
Better font rendering in Firefox
Create ~/.fonts.conf with the configuration from this StackExchange answer.
Back up an SD card
- Insert the card.
- Find its device name:
fdisk -l,lsblk,df. - Unmount it from the terminal (not with the eject button in Nautilus):
umount /dev/sdb1 - Copy the whole card to an image file:
dd bs=4M if=/dev/sdb of=nextcloud210313.img
KVM snapshots
Inside the virsh shell:
snapshot-create-as --domain f20 --name 'f20-spice'
snapshot-list f20
snapshot-revert f20 --snapshotname f20-spice
For better integration of Windows guests: spice-guest-tools
Resize all images in a directory
With ImageMagick, to 500 px wide (overwrites the files):
for file in *.jpeg; do convert $file -resize 500x $file; done
Show the hostname in the zsh prompt
Add to ~/.zshrc, on the right side:
export RPROMPT="%m"
or at the beginning of the prompt:
PROMPT="%m $PROMPT"
Midnight Commander
Use your own editor and viewer
Set the system default editor:
sudo update-alternatives --config editor
or turn off Configuration > Builtin editor and viewer in mc and add to ~/.zshrc:
export EDITOR=nvim
export VIEWER=nvim
Open files with the default macOS application
In the mc extension file:
regex/\.(.*)$
Open=(open %f &)
Vim: replace in the whole file
:%s/foo/bar/g