Table des matières
- 2026:
- 2025:
4 billet(s) pour juillet 2026
| Procédure simple augmentation de la SWAP | 2026/07/17 15:49 | Jean-Baptiste |
| Exemple git clone avec Ansible | 2026/07/16 14:47 | Jean-Baptiste |
| Windows exe - Comparaison de fichiers binaires | 2026/07/16 10:25 | Jean-Baptiste |
| Pb git | 2026/07/01 17:36 | Jean-Baptiste |
Notes Webdav
Voir :
Serveur
Voir :
Vérifier que votre serveur implémente implémente correctement le protocole Webdav avec Litmus
WebDAV server protocol compliance test suite
Nginx
Voir proxy_request_buffering off;
apt-get install nginx-full
/etc/nginx/sites-available/webdav
server { listen 80; server_name webdav.acme.fr; access_log /var/log/nginx/webdav-access.log; error_log /var/log/nginx/webdav-error.log; autoindex on; charset utf-8; client_max_body_size 10M; location / { root /var/www/webdav; #client_body_temp_path /var/www/webdav-tmp; dav_methods PUT DELETE MKCOL COPY MOVE; dav_ext_methods PROPFIND OPTIONS; #auth_basic_user_file $HOME/.htpasswd; #min_delete_depth 0; #auth_basic "Restricted"; #auth_basic_user_file /etc/nginx/webdav.htpasswd; create_full_put_path on; dav_access user:rw group:rw all:r; limit_except GET { allow 192.168.1.22; allow all; #deny all; } } }
davserver (python)
Voir :
#sudo apt-get install python3-webdav python3 -m pip install PyWebDAV3
config.ini
[DAV] #baseurl = baseurl = https://dav.acme.fr # Verbose? # verbose enabled is like loglevel = INFO verbose = 1 #log level : DEBUG, INFO, WARNING, ERROR, CRITICAL (Default is WARNING) #loglevel = WARNING # main directory directory = /var/www/webdav # Server address port = 8082 host = localhost # disable auth noauth = 1 # Enable mysql auth mysql_auth=0 # admin user user = test password = test00 # daemonize? daemonize = 0 daemonaction = start # instance counter counter = 0 # mimetypes support #mimecheck = 1 mimecheck = 0 # webdav level (1 = webdav level 2) lockemulation = 1 # internal features #chunked_http_response = 1 #http_request_use_iterator = 0 #http_response_use_iterator = 0
su - www-data davserver -c config.ini
Weborf - Le serveur ultra léger
https://github.com/ltworf/weborf/blob/master/examples/auth.py
apt-get install weborf
python /usr/share/doc/weborf/examples/auth.py chmod 777 /tmp/weborf_auth.socket
iptables -A INPUT -i eth0 -p tcp -m tcp --dport 8083 -j REJECT iptables-save > /etc/iptables/rules.v4
Client
Voir :
davfs2 http://doc.ubuntu-fr.org/davfs2
cadaver https://webdav.acme.fr
Pour ne pas taper le mdp à chaque fois
~/.netrc
default login myusername password P@ssw0rd machine webdav.acme.fr login myusername password P@ssw0rd
chmod 600 ~/.netrc
Voir man netrc
Exemple de fichier conf (commandes lancées automatique au démarrage de cadaver)
~/.cadaverrc
set editor vim set pager less set tolerant cd home
WDFS
Voir aussi :
Ajout de l'utilisateur “jean” au groupe “fuse” Apparement pas nécessaire si fuse est installé alors qu'il n'existe pas de compte “fuse” Est-ce lié à systemd ?
adduser jean fuse
Montage (dans un dossier vide) \ Exemples :
mkdir -p ~/mnt/wd-partage wdfs -o username=utilisateur -o password=MDP_En_Clair https://webdav.acme.fr/partage ~/mnt/wd-partage
Pour démonter
fusermount -u ~/mnt/
Protocole
Curl
Faut-il préciser le Content-Type ?
curl -XPROPFIND https://user:pass@dav.acme.fr/ -H "Depth:infinity" | xmllint --format - curl --request PROPFIND --user user:pass --header "Content-Type: text/xml" --header "Brief:t" --data "<D:propfind xmlns:D='DAV:'><D:prop><D:displayname/></D:prop></D:propfind>" https://dav.acme.fr/ curl -X PROPFIND -H "Content-Type: text/xml" http://USER:PASSWORD@HOST/owncloud/remote.php/webdav/FOLDER | xmllint --format -
Envoyer un fichier
curl -X PUT https://webdav.server/dir/file.txt -d @~/file.txt
Déplacer un fichier
curl -X MOVE -H 'Destination: https://webdav.server/dir/file2.txt' https://webdav.server/dir/file.txt
Juste un bout d'un fichier grâce à Content-Range
curl -H 'Content-Range: bytes 10-20/*' https://webdav.server/dir.file.txt
Notes web
Coloration syntaxique
La coloration syntaxique de la note précédente a été faite avec pygmentize. Par exemple:
pygmentize -f html -l cpp -o code.html code
Pour récupérer le style CSS:
pygmentize -f html -S colorful
web worker / worker API / consumers
Three parties :
- The web worker is responsible for running scripts in its own separate thread.
- The worker API exposes a consumer-to-provider communication interface.
- The consumers want to run some scripts outside the main thread, so they don’t block the main thread.
Notes Web - Client-side rendering - CSR
Exemple
MdWiki
Voir :
Markdown / Commonmark - Prise en charge des “Wiki links” / liens Interwiki / liens relatifs
index.md
[plop](tech/plop2.md)
Notes Wayland
Voir :
- slurp
- X11
- PipeWire
- seat & seatd
Voir aussi :
- Sway WM (Windows Manager)
- hyprland
Désactiver Wayland et repasser à Xorg
/etc/gdm3/daemon.conf
[daemon] WaylandEnable=false [debug] # Uncomment the line below to turn on debugging #Enable=true
Suis-je sous Xorg X11 ou sous Wayland
$ echo $XDG_SESSION_TYPE x11 $ echo $XDG_SESSION_TYPE wayland # Xorg ou Xwayland ? $ ps -e |grep X 1467 tty7 3-00:41:28 Xorg
jean@debian10:~$ loginctl
SESSION UID USER SEAT TTY
1 1000 jibe seat0
1 sessions listed.
jibe@debian10:~$ loginctl show-session 1
Id=1
User=1000
Name=jean
Timestamp=Wed 2019-12-18 15:33:31 CET
TimestampMonotonic=17592338
VTNr=7
Seat=seat0
Display=:0
Remote=no
Service=sddm-autologin
Scope=session-1.scope
Leader=589
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no
ou
$ loginctl
SESSION UID USER SEAT TTY STATE IDLE SINCE
1 1000 management - pts/1 active yes 2 weeks 1 day ago
1 sessions listed.
$ loginctl show-session 1 -p Type
Type=tty
$ echo $XDG_RUNTIME_DIR
/run/user/1000/
Faire fonctionner Synaptic en root
xhost +si:localuser:root
~/.bashrc
alias synaptic="xhost +si:localuser:root ; sudo /usr/sbin/synaptic ; xhost -si:localuser:root"
VNC
WayPipe
Le déport d'affichage X11 de ssh fonctionne sous Wayland comme auparavant pour les applications X11. Les applications Wayland natives ne fonctionnent pas en déport d'affichage.
Voir https://linuxfr.org/users/tarnyko/journaux/waypipe-affichage-distant-natif-pour-wayland
Concrètement, c’est aussi simple que de lancer waypipe ssh user@192.168.1.20 xterm entre deux machines équipées du binaire waypipe dans leur $PATH
waypipe ssh user@192.168.1.20 xterm
gnome-remote-desktop
Voir :
Install de Gnome Remote Desktop (dépend de PipeWire)
apt-get install gnome-remote-desktop
Enabling
Open Settings, select Sharing, and enable Screen sharing. This should automatically enable the service and you should immediately be able to connect via VNC.
Autres
MOZ_ENABLE_WAYLAND=1 firefox sudo flatpak override --socket=wayland org.mozilla.firefox sudo flatpak override --env MOZ_ENABLE_WAYLAND=1 org.mozilla.firefox
Pb
Err
$ kitty [066 14:06:15.666193] [glfw error 65544]: Wayland: Failed to connect to display
Solution
https://github.com/glfw/glfw/issues/1390
mv /usr/lib/kitty/kitty/glfw-wayland.so{,.orig}
