Divers: Difference between revisions

From hugovil.com
Jump to navigationJump to search
New page: == Divers == '''Pour capturer les données sur le réseau:''' tcpdump -X -n -t -s 0 src 192.168.0.45 '''Pour afficher une image en arrière-plan (X-Windows):''' wmsetbg --center --w...
 
No edit summary
 
(116 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Divers ==
=Syntax highlighting MediaWiki=


Ajouter à la fin de /etc/mediawiki/LocalSettings.php:


'''Pour capturer les données sur le réseau:'''
<source lang=ini>
  tcpdump -X -n -t -s 0 src 192.168.0.45
wfLoadExtension('SyntaxHighlight_GeSHi');
</source>


'''Pour afficher une image en arrière-plan (X-Windows):'''
=RTC=
   wmsetbg --center --workspace 0 image.jpeg
 
Pour que Linux ajuste automatiquement son horloge selon le RTC au démarrage, il faut:
 
  Ne pas sélectionner "Enhanced Real-time clock Support" dans "Device Drivers  ---> Character devices  --->"
  Sélectionner (built-in ,pas modulaire) "Device Drivers  ---> Real Time Clock  ---> Set system time from RTC on startup and resume"
 
Avec ça, plus besoin du script /etc/rc.d/init.d/setclock
 
Capture d'écran=
 
  import screenshot.png
 
=Permettre d'éteindre l'appareil sans être authentifié=
 
Enlever le '-a' de la ligne shutdown dans /etc/inittab
 
=Deleting files on mounted partitions in PcManFM gives error messge=
 
Error message:
  Some files cannot be moved to trash can because the underlying file systems don't support this operation...
 
Fix by creating a trash folder on the partition root:
  mkdir .Trash-1004
  chown -R 1004:1000 .Trash-1004/
  chmod 700 .Trash-1004/
 
 
=2 moniteurs avec Debian =
 
Modifier:
 
  $>  /etc/gdm3/Init/Default
 
et ajouter la ligne:
 
<source lang=text>
  xrandr --output DVI-0 --auto --output VGA-0 --auto --left-of DVI-0
</source >
 
=Configurer Debian pour rouler les applications X remote=
 
Ajouter dans /etc/gdm3/daemon.conf:
 
<source lang=text>
  [security]
  DisallowTCP=false
</source >
 
Et faire:
 
  $> xhost +
 
=OpenWRT=
 
Luci install:
 
  $> opkg update
  $> opkg install luci
ou
  $> opkg install luci-ssl
 
Luci start:
 
  /etc/init/uhttpd start
 
Configure to start automatically:
 
  /etc/init.d/uhttpd enable
 
 
 
 
 
= Xresources =
 
Pour voir la configuration actuelle:
 
  $> xrdb -query -all
 
 
 
= .xsessionrc =
 
<source lang=bash>
#!/bin/bash
 
# Nécessaire car lightdm ne lit pas /etc/profile (not a login shell):
if [ -f /etc/profile ]; then
    . /etc/profile
fi
 
if [ -f ${HOME}/.profile ]; then
    . ${HOME}/.profile
fi
 
# Disable bell
xset -b
 
xscreensaver -no-splash &
 
# Load resources
xrdb -merge .Xresources
 
DBUS_SESSION_BUS_ADDRESS="" dropbox start &
</source >
 
 
= Bug NFS Debian =
 
Message d'erreur:
    ...blkmapd[278]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory...
 
Solution:
    $> sudo systemctl disable nfs-blkmap
 
= XTerm =
 
Pour sauvegarder le contenu du terminal dans un fichier faire:
 
   Ctrl-Clickleft et sélectionner
    "Print-All Immediately"
 
Cela va générer un fichier $HOME/XTermYYYY-MM-DD.hh.mm.ss

Latest revision as of 19:48, 2 April 2026

Syntax highlighting MediaWiki

Ajouter à la fin de /etc/mediawiki/LocalSettings.php:

wfLoadExtension('SyntaxHighlight_GeSHi');

RTC

Pour que Linux ajuste automatiquement son horloge selon le RTC au démarrage, il faut:

 Ne pas sélectionner "Enhanced Real-time clock Support" dans "Device Drivers  ---> Character devices  --->"
 Sélectionner (built-in ,pas modulaire) "Device Drivers  ---> Real Time Clock  ---> Set system time from RTC on startup and resume"

Avec ça, plus besoin du script /etc/rc.d/init.d/setclock

Capture d'écran=

 import screenshot.png

Permettre d'éteindre l'appareil sans être authentifié

Enlever le '-a' de la ligne shutdown dans /etc/inittab

Deleting files on mounted partitions in PcManFM gives error messge

Error message:

 Some files cannot be moved to trash can because the underlying file systems don't support this operation...

Fix by creating a trash folder on the partition root:

 mkdir .Trash-1004
 chown -R 1004:1000 .Trash-1004/
 chmod 700 .Trash-1004/


2 moniteurs avec Debian

Modifier:

 $>  /etc/gdm3/Init/Default

et ajouter la ligne:

  xrandr --output DVI-0 --auto --output VGA-0 --auto --left-of DVI-0

Configurer Debian pour rouler les applications X remote

Ajouter dans /etc/gdm3/daemon.conf:

  [security]
  DisallowTCP=false

Et faire:

 $> xhost +

OpenWRT

Luci install:

 $> opkg update
 $> opkg install luci

ou

 $> opkg install luci-ssl

Luci start:

 /etc/init/uhttpd start

Configure to start automatically:

 /etc/init.d/uhttpd enable



Xresources

Pour voir la configuration actuelle:

 $> xrdb -query -all


.xsessionrc

#!/bin/bash

# Nécessaire car lightdm ne lit pas /etc/profile (not a login shell):
if [ -f /etc/profile ]; then
    . /etc/profile
fi

if [ -f ${HOME}/.profile ]; then
    . ${HOME}/.profile
fi

# Disable bell
xset -b

xscreensaver -no-splash &

# Load resources
xrdb -merge .Xresources

DBUS_SESSION_BUS_ADDRESS="" dropbox start &


Bug NFS Debian

Message d'erreur:

   ...blkmapd[278]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory...

Solution:

   $> sudo systemctl disable nfs-blkmap

XTerm

Pour sauvegarder le contenu du terminal dans un fichier faire:

 Ctrl-Clickleft et sélectionner
   "Print-All Immediately"

Cela va générer un fichier $HOME/XTermYYYY-MM-DD.hh.mm.ss