Software: gpm, a mouse service for Linux console

There's a nice piece of software called gpm (general purpose mouse).
It's a mouse server for Linux console. (BTW, touchpads are supported too).

In Debian (and its derivatives like Ubuntu), it's very easy to start using it by simple installation from package repositories:
# apt-get install gpm
And you should see a rectangular mouse pointer soon ;)

In case it gets stuck, you can try restarting the gpm service:
# service gpm restart
See also: HOWTO: reload mouse driver in Linux

External links:


HOWTO: force filesystem check on reboot in a Linux system

Usually, only a superficial file system check is performed automatically on boot up, and it's sufficient; but sometimes it could be handy to force a full file system check (i. e., to run the Linux fsck utility) to ensure the FS is really OK.
  1. Classic init (SysVinit): just reboot the system with a special option:
    # shutdown -rF now
  2. systemd init: much more interesting: at the boot time, you need to append a special kernel command line parameter (e. g., you can specify it at the GRUB command line):
    linux /boot/vmlinuz root=UUID=... ro fsck.mode=force

P. S. It should then check all the filesystems enabled for checking in /etc/fstab.

  1. man shutdown
  2. man systemd-fsck
  3. man fstab
  4. man fsck


HOWTO: play MIDI files with VLC in Debian

It's very easy! And should also work for Ubuntu (and other Debian derivatives).
  1. First of all, make sure you have already installed the VLC media player:
    # apt-get install vlc
  2. Install the FluidSynth plugin:
    # apt-get install vlc-plugin-fluidsynth
  3. Enjoy!
    You can open your file either with the VLC GUI, or from the CLI, e. g.:
    $ vlc ~/Music/MyFavoriteSong.midi


HOWTO: preventing aptitude from breaking the APT package setup

Initial conditions:
  • usually, you use apt-get (from the apt package) for Debian package maintenance (installing, removing, upgrading etc.);
  • sometimes you launch aptitude (aptitude package) to do some work;
  • after doing some work with apt-get, you notice that aptitude hasn't caught up with the current package state (i. e., it wants to install / remove some package(s) just from the start).
Solution: hide (or delete) the outdated package states file from aptitude (note: it'll overwrite an old backup, "/var/lib/aptitude/pkgstates.old", if present):
$ cd /var/lib/aptitude
# mv pkgstates pkgstates.old
P. S. This should also work for Debian derivatives (e. g. Ubuntu).


Hardware accident: Chinese LED lantern turned into a firework

Device brand / model: Yajia YJ-6812
Description: a Chinese lantern with 32 LEDs (quite bright really; 2 levels of brightness); rechargeable (no information on battery currently); without any external power adapters (plugged directly into AC socket by a simple 2-wire cable). Bought on a local Ukrainian (Vinnytsia city) market. The design somewhat reminds of a kind of grater.


Software: MediaInfo

Currently, MediaInfo is probably the best free & open-source utility for extracting technical info (metadata) from multimedia files (most frequently, containers with audio and video streams).
It's quite portable (runs on various Linux distributions, MS Windows, Apple Mac OS X, FreeBSD etc.; released regularly in source and compiled binary forms) and comes with CLI and GUI interfaces.

External links:


HOWTO: force filesystem check on reboot in MS Windows (NT family)

These tricks may be well-known, but still handy for busy volumes (e. g., the system one):
  1. Open a command prompt (cmd) with administrator privileges (either via "Start → Run..." menu, "<WinKey> + <R>" hotkey, or other methods you like).
  2. Two options.
    1. Marking volume "dirty":
      > fsutil dirty set C:
      Volume - C: is now marked dirty
    2. A milder option, just scheduling the volume to be checked on startup:
      > chkntfs /C C:
  3. Reboot safely.
  4. Watch the CHKDSK operation progress...
  5. DONE!
    (You can check the CHKDSK logs later in the "Event Viewer" (eventvwr.msc or simply eventvwr for short)).
Last updated: 2016-05-20

Hints: D-Link ADSL router: time to change the power adapter

Sample device: D-Link DSL-2640* (quite old combined ADSL modem / Ethernet switch / Wi-Fi router); should probably work for some other Linux-based routers with Broadcom chips.

Some trouble signs include: red power lights, not booting into the normal working mode (or booting into the recovery one) after power-on; slowing down of the operation, decrease of the performance & significant packet dropping rate; unexpected restarts etc.

Reliable internal software (firmware) symptoms — specific log strings get triggered, e. g.:
  • accessed via the web-based interface:
    System Log
    Jan 1 00:01:23userwarn
    kernel: - Power glitch detected. Duration: 5 us
  • and via Telnet / SSH:
    > sh
    # dmesg
     - Power glitch detected. Duration: 6 us
    • Note: reportedly, some users also observe another diagnostic log message:
       - Power failure detected. ADSL Link down.
What to do:
  1. check the power cabling (and fix it, if needed);
  2. check the electrolytic capacitors:
    1. inside the power adapter,
    2. and in the router itself,
    3. and replace (resolder) the blown-up ones with new ones (paying attention to the nominal values, indeed);
  3. buy a new power adapter, if needed.
Safety notes:
  • BEWARE of electric shock.
  • Disconnect the AC power before opening the cases.
  • Some technical experience needed.
Last updated: 2015-11-30


HOWTO: get rid of packed B-frames in AVI (MPEG-4 Visual) video with FFmpeg

You've probably seen some AVI (Audio Video Interleave) files with MPEG-4 video (more specifically, MPEG-4 Visual / ASP, usually encoded by DivX or Xvid codecs) inside; they are often used for DVD-rips. Such AVI video files often contain "packed B-frames", which is not an optimal frame storage way, but just a workaround for the VfW (Video for Windows) framework shortcomings.
To ensure you have a "bad-style" MPEG-4 AVI file, you can check it with a media analyzer utility like MediaInfo (in this case, it'll show you something like "Muxing mode : Packed bitstream").
Fortunately, that wrong thing is easy to "unpack" with an up-to date version of FFmpeg (v2.7+):
$ ffmpeg -i in_bad.avi -codec copy -bsf:v mpeg4_unpack_bframes out_good.avi
The conversion is lossless (neither video nor audio quality is harmed; the file should remain compatible with the hardware players), but in some cases can even reduce the resulting AVI container size.

You can download the source code and binary builds of the current FFmpeg (for MS Windows, Apple Mac OS X and Linux) freely from the official site.
Usually, you will find a compatible version in the repositories of your Linux distribution; however, in Debian, it's available only starting from the release 9 "Stretch":
# sudo apt-get install ffmpeg

  1. FFmpeg Bitstream Filters Documentation
  2. Download FFmpeg
  3. FFmpeg Changelog
  4. #2913 (Bitstream filter to fix "invalid and inefficient vfw-avi packed B frames") – FFmpeg
  5. MediaInfo
  6. Debian Package Tracker - ffmpeg
  7. Ripping - Wikipedia
  8. MPEG-4 Part 2 - Wikipedia
  9. DivX - Wikipedia
  10. Xvid - Wikipedia
  11. Audio Video Interleave - Wikipedia
  12. Video for Windows - Wikipedia
  13. Video compression picture types - Wikipedia
  14. Inter frame - Wikipedia
Last updated: 2011-11-30


Tips: where to find the photos in your Google account

You can try to find your photos in different "departments" of your Google account:

And don't forget about the trash folder(s):
Last updated: 2011-11-30