Category Archives: Linux

Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

You have a Linux distribution with Xorg and you have configured the keyboard layout switcher to use alt+shift to switch between languages. But once you do that, keyboard shortcuts that use alt+shift+<key> combinations cannot be used. The same could happen if you have selected ctrl+shift as a shortcut to change language which disables all ctrl+shift+<key> combinations.

Continue reading Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

Clock messed up when dual booting

The problem:

  • Linux store the time on the hardware clock as UTC by default
  • Windows store the time on the hardware clock as the local time by default

Since both operating systems access the hardware clock you may encounter problems when you dual boot between them.

A comment for the geeks:

The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets. Continue reading Clock messed up when dual booting

Mint 19 Setup Tutorial 🏅

Basic installation

1 – Preparation and installation

  1. Download rufus
  2. Download latest stable cinnamon version ISO
  3. Use Rufus to create a bootable USB
  4. Boot the system with the USB. You can try to press F10 while booting in order to activate the boot menu. If it does not work you will have to enter the BIOS (you should google for the keyboard shortcut according to the manufacturer).

⚠️ Warning ⚠️

If you have Windows already installed, Linux might not be able to detect the previous installation, You should make sure that Windows and Linux use the same mode (either BIOS or UEFI). See multiboot article for more. Always double check you are using the same mode when you multi-boot.

If windows are detected properly or you are not using Windows at all, you can install Mint and proceed to the next steps.

Continue reading Mint 19 Setup Tutorial 🏅

Restart/shutdown linux with magic (REISUB)

To restart your system, press alt + Printscreen/SysRq. Then, while holding those keys, slowly type the keys  R E I S U B (one key at a time, requires QUERTY keyboards). You can find a list of all SysRq keys here which includes key presses for other keyboard layouts.

To define the mode of SysRq you should edit the file: /etc/sysctl.d/10-magic-sysrq.conf . That file includes details of various levels of SysRq.

Here is an example of it’s contents:

# 0 - disable sysrq completely
# 1 - enable all functions of sysrq
# >1 - enable certain functions by adding up the following values:
# 2 - enable control of console logging level
# 4 - enable control of keyboard (SAK, unraw)
# 8 - enable debugging dumps of processes etc.
# 16 - enable sync command
# 32 - enable remount read-only
# 64 - enable signalling of processes (term, kill, oom-kill)
# 128 - allow reboot/poweroff
# 256 - allow nicing of all RT tasks

A recommended value is 64 because it permits you to use oom kill which is very useful.

Here is a short explanation for reboot (not all keys will work, as it depends on the value you have defined in  /etc/sysctl.d/10-magic-sysrq.conf file) :

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

Here is a short explanation for shutdown:

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • O: Immediately shutdown the system, without unmounting partitions or syncing

Here is a cool mnemonic:

  • R – Reboot
  • E – Even
  • I – If
  • S – System
  • U – Utterly
  • B – Broken

References:

http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

https://en.wikipedia.org/wiki/Magic_SysRq_key