OVH Cloud OVH Cloud

comportement indeterminé du shell

9 réponses
Avatar
Rakotomandimby (R12y) Mihamina
Bonjour,

J'ai un comportement bizarre de mon système.
J'ai installé xbinkeys pour utiliser les touches "spéciales" de mon
clavier M$oft Multimédia, et je veux lancer xbinkeys à chaque login
graphique (j'utilise xfce4, la version 4.2 en release candidate).


(Shel zsh)
$ pwd
/home/mihamina

$ls *xf*
printers.xml sessions xfcalendar xfce4rc.bak xffm xinitrc
printsettings.xml settings xfce4rc xfdiffrc xfrun_history xinitrc~

$less xfce4rc
xfce4rc: No such file or directory

$ls
Desktop cours holisoa radio
Elek2003 dcc iso rajao-12-11.txt
Mail dot.xfce4-4.0 kala.txt rajaoniaina.txt
Rap_gasy_ogged downloads kalamahu_badeda signature.txt
a_graver dvd kalamahu_badeda.xcf sources
ad_tg essai lost+found test.html
audio-mp3 evolution mailing tmp-mp3
backup famille packages xzips
badede.txt fanomezana palm
combs_warez ftp plaquette
correspondance graveur programation

$ls *xf*
printers.xml sessions xfcalendar xfce4rc.bak xffm xinitrc
printsettings.xml settings xfce4rc xfdiffrc xfrun_history xinitrc~



Que font les fichiers printers*, xinitrc, settings, ... dans le listing ?

Voici mon .zshrc au cas ou il y a des options de ls que j'aurais activé
sans le savoir:

export LANG=en_GB
export PRINTER=hp3420
export LC_CTYPE=en_US
export JPILOT_HOME=/home/mihamina/palm
alias h1='ssh 195.140.140.180'
alias h13='ssh 195.140.143.13'
alias mil='ssh 192.168.0.7'

precmd () {print -Pn "\e]0;%n@%m (%l) : %~\a"}

HISTFILE=~/.zhistory
HISTSIZE=1000
SAVEHIST=1000 # Default: 200

setopt appendhistory # multiple zsh's all append to same history file (rather than last
# overwrites) SET
unsetopt banghist # Perform textual history expansion, csh-style, treating '!' specially SET
unsetopt cshjunkiehistory # A history reference without an event specifier will always refer to
# the previous command. Without this option, such a history reference
# refers to the same event as the previous history reference, defaulting
# to the previous command UNSET
setopt extendedhistory # Save each command's beginning timestamp and the duration (in seconds)
# to the history file UNSET
unsetopt histallowclobber # Add '|' to output redirections in the history. This allows history
# references to clobber files even when CLOBBER is unset UNSET
unsetopt histbeep # Beep when attempt to access a history entry which isn't there SET
setopt histexpiredupsfirst # If the internal history needs to be trimmed to add the current command
# line, setting this option will cause the oldest history event that has
# a duplicate to be lost before losing a unique event from the list UNSET
unsetopt histfindnodups # When searching for history entries in the line editor, do not display
# duplicates of a line previously found, even if the duplicates are not
# contiguous UNSET
unsetopt histignorealldups # If a new command line being added to the history list duplicates an
# older one, the older command is removed from the list (even if it is
# not the previous event) UNSET
setopt histignoredups # Do not enter command lines into the history list if they are
# duplicates of the previous event UNSET
unsetopt histignorespace # Remove command lines from the history list when the first character on
# the line is a space, or when one of the expanded aliases contains a
# leading space UNSET
unsetopt histnofunctions # Remove function definitions from the history list UNSET
unsetopt histnostore # Remove the history (fc -l) command from the history list when invoked UNSET
setopt histreduceblanks # Remove superfluous blanks from each command line being added to the
# history list UNSET
unsetopt histsavenodups # When writing out the history file, older commands that duplicate newer
# ones are omitted UNSET
setopt histverify # Don't execute a line with history expansion directly; reload the line
# into the editing buffer UNSET
setopt incappendhistory # New history lines are added to the $HISTFILE incrementally (as soon as
# they are entered), rather than waiting until the shell is killed UNSET
setopt sharehistory # Import new commands from the history file and append typed commands to
# the history file UNSET


--
ASPO Infogérance - http://aspo.rktmb.org/activites/infogerance
Unofficial FAQ fcolc - http://faq.fcolc.eu.org/
Linux User Group sur Orléans et alentours.
Tél: + 33 2 38 76 43 65 (France)

9 réponses

Avatar
Bruno Mathieu
Rakotomandimby (R12y) Mihamina a écrit:

Bonjour,


Bonjour

J'ai un comportement bizarre de mon système.
J'ai installé xbinkeys pour utiliser les touches "spéciales" de mon
clavier M$oft Multimédia, et je veux lancer xbinkeys à chaque login
graphique (j'utilise xfce4, la version 4.2 en release candidate).


(Shel zsh)
$ pwd
/home/mihamina

$ls *xf*
printers.xml sessions xfcalendar xfce4rc.bak xffm
xinitrc
printsettings.xml settings xfce4rc xfdiffrc xfrun_history
xinitrc~

$less xfce4rc
xfce4rc: No such file or directory


less dot.xfce4-4.0/xfce4rc ?

$ls
Desktop cours holisoa radio
Elek2003 dcc iso rajao-12-11.txt
Mail dot.xfce4-4.0 kala.txt rajaoniaina.txt
Rap_gasy_ogged downloads kalamahu_badeda signature.txt
a_graver dvd kalamahu_badeda.xcf sources
ad_tg essai lost+found test.html
audio-mp3 evolution mailing tmp-mp3
backup famille packages xzips
badede.txt fanomezana palm
combs_warez ftp plaquette
correspondance graveur programation

$ls *xf*
printers.xml sessions xfcalendar xfce4rc.bak xffm
xinitrc
printsettings.xml settings xfce4rc xfdiffrc xfrun_history
xinitrc~

Que font les fichiers printers*, xinitrc, settings, ... dans le listing ?

Je pense que ce sont des fichiers de configuration de xfce qui se trouvent

dans le dossier dot.xfce4-4.0 (qu'il faudrait peut être renommer .xfce ou
qc comme ça, à moins qu'il n'existe déjà...)

--
Bruno

Avatar
Nicolas George
R12y wrote in message :
$ls *xf*


Essaie « ls -f *xf* », ça devrait tout de suite être plus clair.

export LANG=en_GB
export LC_CTYPE=en_US


La seconde ligne fait double emploi. Ceci dit, je conseillerais plutôt de ne
garder que la seconde surtout si ce n'est pas pour avoir les traductions des
logiciels.

<snip le reste du .zshrc>


Même pas de « autoload -U compinit; compinit » ? Tu rates une partie
importante de ce qu'offre zsh comme avantages en interactif.

Avatar
Nicolas George
Nicolas George wrote in message <cna0nq$7l1$:
Essaie « ls -f *xf* », ça devrait tout de suite être plus clair.
^^

Grrr. ls -d, je voulais dire. Désolé.

Avatar
Rakotomandimby (R12y) Mihamina
( Mon, 15 Nov 2004 11:34:10 +0100 ) Bruno Mathieu :

$less xfce4rc
xfce4rc: No such file or directory


less dot.xfce4-4.0/xfce4rc ?


Je suis en 4.2 maintenant et le fichier rc de la 4.2 n'a pas exactement la
même syntaxe je crois.
En tout cas, la XFCE team recommande de refaire les réglages.

dot.xfce4 était .xfce4 avant, mais je ne le garde que au cas ou je dois
revenir sur une version stable, car la 4.2 est encore en developpement.

Je pense que ce sont des fichiers de configuration de xfce qui se
trouvent dans le dossier dot.xfce4-4.0 (qu'il faudrait peut être
renommer .xfce ou qc comme ça, à moins qu'il n'existe déjà...)


Non pour la raison évoquée plus haut.
--
ASPO Infogérance - http://aspo.rktmb.org/activites/infogerance
Unofficial FAQ fcolc - http://faq.fcolc.eu.org/
Linux User Group sur Orléans et alentours.
Tél: + 33 2 38 76 43 65 (France)


Avatar
Rakotomandimby (R12y) Mihamina
( Mon, 15 Nov 2004 10:36:54 +0000 ) Nicolas George :

Nicolas George wrote in message <cna0nq$7l1$:
Essaie « ls -f *xf* », ça devrait tout de suite être plus clair.
^^

Grrr. ls -d, je voulais dire. Désolé.


Bon apparemment il listait d'une maniere recursive ... je me demande
bien dans quelle option de mon shell j'ai placé l'ordre de lister
recursivement ...

--
ASPO Infogérance - http://aspo.rktmb.org/activites/infogerance
Unofficial FAQ fcolc - http://faq.fcolc.eu.org/
Linux User Group sur Orléans et alentours.
Tél: + 33 2 38 76 43 65 (France)


Avatar
Stephane Chazelas
2004-11-16, 18:31(+01), Rakotomandimby (R12y) Mihamina:
( Mon, 15 Nov 2004 10:36:54 +0000 ) Nicolas George :

Nicolas George wrote in message <cna0nq$7l1$:
Essaie « ls -f *xf* », ça devrait tout de suite être plus clair.
^^

Grrr. ls -d, je voulais dire. Désolé.


Bon apparemment il listait d'une maniere recursive ... je me demande
bien dans quelle option de mon shell j'ai placé l'ordre de lister
recursivement ...
[...]


Il ne listait pas recursivement.

ls *xf*

a ete transformé par le shell en

ls dot.xfce4-4.0

et comme dot.xfce4-4.0 se trouve etre un repertoire, ca dit a ls
de lister son contenu.

D'ou l'option "-d" que suggerait Nicolas.

--
Stephane



Avatar
Nicolas George
R12y wrote in message :
Bon apparemment il listait d'une maniere recursive ...


Non, pas du tout. Tu lui passais en argument un répertoire, il te listait le
contenu du répertoire.

Rappel : quand il y a un glob (*, ?, etc.) dans une ligne de commande, c'est
le shell qui remplace par la liste des fichiers reconnus. La commande
ensuite ne voit que la liste elle-même.

Avatar
Rakotomandimby (R12y) Mihamina
( Tue, 16 Nov 2004 17:45:01 +0000 ) Nicolas George :

R12y wrote in message :
Bon apparemment il listait d'une maniere recursive ...


Non, pas du tout. Tu lui passais en argument un répertoire, il te listait le
contenu du répertoire.


Ben voila. Oui c'est vrai.
Merci.
--
ASPO Infogérance - http://aspo.rktmb.org/activites/infogerance
Unofficial FAQ fcolc - http://faq.fcolc.eu.org/
Linux User Group sur Orléans et alentours.
Tél: + 33 2 38 76 43 65 (France)


Avatar
Stephane TOUGARD
Rakotomandimby (R12y) Mihamina wrote:

(Shel zsh)
$ pwd
/home/mihamina

$ls *xf*
printers.xml sessions xfcalendar xfce4rc.bak xffm xinitrc
printsettings.xml settings xfce4rc xfdiffrc xfrun_history xinitrc~

$less xfce4rc
xfce4rc: No such file or directory

$ls
Desktop cours holisoa radio
Elek2003 dcc iso rajao-12-11.txt
Mail dot.xfce4-4.0 kala.txt rajaoniaina.txt
Rap_gasy_ogged downloads kalamahu_badeda signature.txt
a_graver dvd kalamahu_badeda.xcf sources
ad_tg essai lost+found test.html
audio-mp3 evolution mailing tmp-mp3
backup famille packages xzips
badede.txt fanomezana palm
combs_warez ftp plaquette
correspondance graveur programation

$ls *xf*
printers.xml sessions xfcalendar xfce4rc.bak xffm xinitrc
printsettings.xml settings xfce4rc xfdiffrc xfrun_history xinitrc~

Que font les fichiers printers*, xinitrc, settings, ... dans le listing ?


Ils sont dans un sous repertoire qui repond a *xf*

Par contre, ils devraient apparaitre comme tel.



--
http://www.unices.org