Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Voir document
- import_vm_vdi_qcow2.odt

Import VM (VDI QCOW2)
VDI vers RAW
$ VBoxManage clonehd --format RAW /home/jibe/tmp/wheezy1.vdi /home/jibe/tmp/wheezy1.img
VBoxManage: error: Cannot register the hard disk '/home/jibe/tmp/wheezy1.vdi' {16d89855-060b-4abf-a154-32b869784a26} because a hard disk '/home/jibe/VirtualBox VMs/wheezy1/wheezy1.vdi' with UUID {16d89855-060b-4abf-a154-32b869784a26} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
Cette erreur disparaît en root
$ time VBoxManage clonehd --format RAW /home/jibe/tmp/wheezy1.vdi /home/jibe/tmp/wheezy1.img 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'RAW'. UUID: 8e3b2b88-31d2-4e60-8792-f42d4e7e107e real 2m59.942s user 0m1.272s sys 0m1.084s
Le format RAW de gérant pas le <lang en>Copy-On-Write</lang> l'image générée sera de la taille maximal (Taille virtuelle)
$ ls -lh ~/tmp/wheezy1.* -rw------- 1 root root 8,0G avril 1 11:38 /home/jibe/tmp/wheezy1.img -rw------- 1 jibe jibe 1,6G mars 7 14:54 /home/jibe/tmp/wheezy1.vdi
Conversion RAW vers QCOW2
$ time qemu-img convert -f raw ~/tmp/wheezy1.img -O qcow2 wheezy1.qcow2 real 2m17.464s user 0m5.684s sys 0m26.528s
La taille de l'image disque redevient celle de l'espace vraiment consommé:
$ ls -lh wheezy1.qcow2 -rw-r--r-- 1 jibe jibe 1,5G avril 1 12:06 wheezy1.qcow2
Conversion OVA / OVF
Un OVA est une archive TAR
tar xvf plop.ova
Lister les formats pris en charge
qemu-img -h | tail -n1
Conversion du VMDK en QCOW2
qemu-img convert -O qcow2 plop-disk1.vmdk plop.qcow2
info sur l'image
qemu-img info --output json plop.qcow2
Création d'un VMDK
wget https://download.fedoraproject.org/pub/fedora/linux/releases/31/Cloud/x86_64/images/Fedora-Cloud-Base-31-1.9.x86_64.raw.xz xz --decompress Fedora-Cloud-Base-31-1.9.x86_64.raw.xz qemu-img convert -f raw -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized Fedora-Cloud-Base-31-1.9.x86_64.raw Fedora-31.vmdk printf '\x03' | dd conv=notrunc of=Fedora-31.vmdk bs=1 seek=$((0x4))
Conversion VMDK vers VMDK (VMDK2VMDK)
Par exemple suite à
openstack image save plop --file plop.vmdk
Conversion VMDK vers VMDK
qemu-img convert -O vmdk plop.vmdk plop2.vmdk
Resize VDI
VBoxManage.exe modifyhd D:\VMs\plop\plop.vdi --resize 40000
IMAP dossier partage
Brouillon
Dossier IMAP partagé
Voir :
/etc/dovecot/conf.d/10-mail.conf
mail_plugins = acl
Ajouter imap_acl à la fin de la ligne
/etc/dovecot/conf.d/20-imap.conf
mail_plugins = $mail_plugins imap_acl
Décommenter
/etc/dovecot/conf.d/90-acl.conf
plugin { acl = vfile:/etc/dovecot/global-acls:cache_secs=300 } # To let users LIST mailboxes shared by other users, Dovecot needs a # shared mailbox dictionary. For example: plugin { acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes }
service dovecot restart
/etc/letsencrypt/cli.ini
# Source : https://gist.github.com/mrothNET/cb6f313e9cbe896f3e0fdec80ad2f3fa # Manage Firewall #pre-hook = ufw allow http #post-hook = ufw deny http # Restart Postfix & Dovecot renew-hook = systemctl restart dovecot.service postfix.service
Astuce : Si rlwrap installé, préfixer votre commande par rlwrap. Il sera plus aissé de rapeller les commandes via fleche du haut
#rlwrap nc localhost 143 #telnet localhost 143 nc localhost 143
rli pour read ®, lookup (l) et insert (i)
. login user P@ssw0rd . SETACL Sent paul rli
Image - pics - Remove the background from an image with this Linux command
Install Rembg on Linux
I created a directory called PythonCoding on my Linux laptop and then made a Python virtual environment:
python3 -m venv PythonCoding cd PythonCoding source bin/activate python3 -m pip install rembg
Combine images
I ran the following rembg command to rename it with a shorter filename for convenience:
rembg i dgw_ato.jpeg dgw_noback.jpg
The first time you run rembg, it downloads an open source pattern recognition model. This can be over 100 MB and rembg saves it in your user directory as ~/.u2net/u2net.onnx. The model is the U-2-Net and uses the Apache 2.0 license. For more information about the pattern recognition models (including how to train your own), read the Rembg documentation.
Add a new background
Next, I want to add a new background to the picture. There are different ways to do that. You can, for instance, combine images with ImageMagick, but getting the frame size right can be complex. The easiest way is to use GIMP or Krita.
I used GIMP. First, open the newly created image (ato_image.jpg in my case). Now go to the File menu and select Open as layers. Choose a different image for the background. This image opens as an overlay above the existing photo.
Try Rembg
Rembg has three subcommands you can review in the --help menu:
rembg --help
They are:
rembg ifor filesrembg pfor foldersrembg sfor HTTP server
Hplip - Imprimante HP Deskjet 3630 sur Debian jessie
http://hplipopensource.com/hplip-web/models/deskjet_aio/deskjet_3630_series.html
Il faut juste une version récente de hplip.
cat > /etc/apt/sources.list.d/backports.list <<EOF deb http://ftp.debian.org/debian jessie-backports main EOF apt-get update apt-get install -t jessie-backports hplip
