monitor hdmi never sleeping

It’s a known bug in Linux: when a monitor is connected with an hdmi cable, there are “sleeping” problems (monitor not sleeping as expected or sleeping but with annoying error/crash messages).

While we expect an hardware solution, a scripting workaround could be this code

bash -c 'sleep 0.1 && xset dpms force off'

Linux KDE: add an app to the panel (no pin it)

To have an application (a program, such as Firefox, or Thunderbird) in your KDE desktop bottom bar, not as “pinned”, but as an icon, you can a) add to desktop that app, and then b) copy it (with the mouse) into the left part of the bottom bar (not in Icon only task manager, but at its left).

php include: no absolute path

To get include command working you should avoid an absolute path: i.g. not

http://somepath/somefile

But, i.g.:

../somepath/somefile

2) In localhost it would be possible this workaround:

$yourvariablepath = realpath($_SERVER["DOCUMENT_ROOT"] . "/a/path");

But this doesn’t work in remote.

3) Another workaround to include a content from a file in another absolute path could be the object tag:

<object data=”your-file-even-on-another-server” />

But an object in another page is an island, a stranger “guest”, without any sharing with the “host” page.

4) Another way (for short text) is to use javascript.

See TV channels from Decoder to Smartphone

With a Linux decoder such as Octagon (with Openatv e Kodi) you can see your TV on your smartphone. Provided that you have Kodi both on decoder and on smartphone.

  • Both decoder and smartphone should be under the same network (such as samba).
  • Install on your smartphone Kodi app,
  • in Kodi install a PVR client such as enigma2,
  • configure the correct IP of your decoder (something like 192.168.1.166) and your decoder Kodi credentials.
  • You should be able to see your TV, as in the following image

    kodi

Regex : an alphabetic letter

To mean one letter, such as ‘a’ or ‘G’, you can use [A-z].

I.g. if you want find any occurrence of strings such as 7956A, 5476H, 3865V, you can use

\d\d\d\d[A-z] 

clone an installation with DD

Today I managed to clone a mounted linux installation with DD. This was the code:

 dd if=/dev/sdb3  of=/dev/sdb2 

/dev/sdb2 was mounted, but I let it inactive. In this way I got a perfecft and working clone of my first operative system. Of course I had to

  • fix a problem in the new partition (with GParted: check and fix partition): I noticed that fstab was not recognized as text file, i.g..
  • change /etc/fstab according to the UUID of the new installation (UUID of /dev/sdb2 is different from UUID of /dev/sdb3, as I saw in GParted)

Maybe I was very lucky. I’m not saying that you should follow my example: the best thing is to work on unmounted partitions.

upgrade problem with chroot

If you have to re-sume an interrupted upgrade in a KDE-Neon installation, and the only possible way is to use chroot, it could happen that you cannot use pkcon update (nor apt update).

In this case you could try with apt full-upgrade

I tried it successfully (2024-08-23).