Auto-Rotation on KDE Plasma ( Wayland ) – Lenovo ThinkPad X1 Tablet Gen 3

CONTEXT -------- Debian 13 (Trixie) + KDE Plasma 5.27 on Wayland.   Lenovo ThinkPad X1 Tablet Gen 3 (QHD 3000×2000, i7-8550U).   iio-sensor-proxy detects the accelerometer but doesn’t publish orientation on DBus.   Solution: use raw accelerometer values and rotate via kscreen-doctor (KDE’s Wayland tool). REQUIREMENTS ------------- sudo apt install kscreen   Accelerometer visible at /sys/bus/iio/devices/iio:device*/in_accel_x_raw FINAL SCRIPT — ~/.local/bin/autorotate-wayland.sh ------------------------------------------------- #!/usr/bin/env bash # Auto-rotate for KDE Plasma (Wayland) – ThinkPad X1 Tablet Gen 3 # Reads raw accelerometer data and rotates screen via kscreen-doctor. # Touch/pen mapping handled automatically by Wayland. # Create ~/.config/autorotate.lock to disable rotation temporarily. OUTPUT_ID="output.1"                                 # from `kscr...

Backing Up and compressing

BACKING UP

rsync source-file target:destination-path
where target can be in the form of someone@host. The someone@ part is optional and used if the remote user is different from the local user.

rsync copies the content of the file into another file.

  • Automatically checks if the destination file exists
  • If there is no change in size and modification time, it avoids the copy
  • It copy only the modified part of the file, not the whole file 
  • It can copy to a remote destination
Example:
rsync -r project-X archive-machine:archives/project-X

dd
Makes a raw copy of an hard disk to another.
Very dangerous if used inappropriately.


COMPRESSING

Efficiency compression max to min and speed compression min to max:

  1. xzip
  2. bzip2 (deprecated, no longer maintained)
  3. gzip
  4. tar (most an archiver than a compressor)

Comments