How to remap keys in Ubuntu
Good article that tells you how to change behavior of certain keys via xmodmap
(with the help of exv
if you need to find out the keycode).
Related cards:
How to type accented characters on keyboard layouts without dead keys
Ubuntu comes with keyboard layouts like "Germany Eliminate Dead Keys", which are practical for programming.
If you need to type accented characters with such a layout, make sure to [configure a Compose key](https://makandracards.com/makandra/1030...
Bash: How to generate a random number within given boundaries
$RANDOM
on bash returns a random integer between 0 and 32767.
echo $RANDOM
9816
echo $RANDOM
30922
If you want to limit that to a certain maximum, you can just compare against the modulus of that maximum + 1. \
For example, the fo...
How to look at hidden X screens
When you have a program running in a hidden X screen (like with Xvfb for Selenium tests) you may want to look at that hidden screen occasionally.
Fi...
How to resize your boot partition when there is an encrypted partition after it
Boot partitions from installations prior to the 16.04 era are terribly small. When you install updates and encounter errors due to a full /boot
partition, consider risizing it.
If you can't do the steps described below, ask someone experienced ...
Solve screen error "Cannot open your terminal '/dev/pts/0' - please check"
When using the screen
tool you may be unable to start a screen session but instead encounter an error:
Cannot open your terminal '/dev/pts/0' - please check.
This is because another user (you) initiated the current terminal -- you probably...
How to rotate log files explicitly
Usually, the logrotate
service takes care of renaming log files each night or so to avoid logs becoming huge. That will rename your.log
to your.log.1
, the next time to your.log.2.gz
, etc. Here is how to make that happen out of band (you sh...
How to use Ubuntu in English, but still show German formats
If you want to have an English Ubuntu UI, but still see dates, money amounts, paper formats, etc. in German formats, you can fine-tune your /etc/default/locale
like this:
LANG="en_US.UTF-8"
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.U...
How to fix: Microphone recording levels are too quiet (or get lowered automatically)
If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low. Also, Skype may be changing your mixer levels.
Set a proper recording volume
- Open your mixer software (run
pavucontrol
). - Switc...
How to send a test e-mail from shell
If you want to manually check if e-mail delivery works on a machine by sending an e-mail you can run the following:
mail -s Test someone@example.com < /dev/null
This will send an empty e-mail with "Test" as its subject to `someone@example.com...