Derniers messages sur Zeste de Savoirhttps://zestedesavoir.com/forums/2019-12-17T03:27:49+01:00Les derniers messages parus sur le forum de Zeste de Savoir.Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2121822019-12-17T03:27:49+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p212182<p>Pour <code>/etc/bash.bashrc</code>:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash"><span class="hljs-comment">#</span>
<span class="hljs-comment"># /etc/bash.bashrc</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># If not running interactively, don't do anything</span>
[[ $- != *i* ]] && <span class="hljs-built_in">return</span>
[[ <span class="hljs-variable">$DISPLAY</span> ]] && <span class="hljs-built_in">shopt</span> -s checkwinsize
PS1=<span class="hljs-string">'[\u@\h \W]\$ '</span>
<span class="hljs-keyword">case</span> <span class="hljs-variable">${TERM}</span> <span class="hljs-keyword">in</span>
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=<span class="hljs-variable">${PROMPT_COMMAND:+$PROMPT_COMMAND; }</span><span class="hljs-string">'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'</span>
;;
screen*)
PROMPT_COMMAND=<span class="hljs-variable">${PROMPT_COMMAND:+$PROMPT_COMMAND; }</span><span class="hljs-string">'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'</span>
;;
<span class="hljs-keyword">esac</span>
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
</code></pre></div>
<p>Pour ce qui est du fichier <code>/etc/perlbin.sh</code>, j’ai mis ce qui touchait au <code>PATH</code> dans <a href="https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211785">ce</a> message, tous le reste du fichier, c’est des commentaires.</p>
<p>Pour le fichier <code>~/.bash_profile</code>, j’en ai bien un, mais il ne touche pas au <code>PATH</code>:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash"><span class="hljs-comment">#</span>
<span class="hljs-comment"># ~/.bash_profile</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Append our default paths</span>
<span class="hljs-function"><span class="hljs-title">appendload</span></span> () {
<span class="hljs-keyword">case</span> <span class="hljs-string">":<span class="hljs-variable">$LD_PRELOAD</span>:"</span> <span class="hljs-keyword">in</span>
*:<span class="hljs-string">"<span class="hljs-variable">$1</span>"</span>:*)
;;
*)
<span class="hljs-built_in">export</span> LD_PRELOAD=<span class="hljs-string">"<span class="hljs-variable">${LD_PRELOAD:+$LD_PRELOAD:}</span><span class="hljs-variable">$1</span>"</span>
<span class="hljs-keyword">esac</span>
}
appendload <span class="hljs-string">"<span class="hljs-variable">$HOME</span>/.local/lib/libstderred.so"</span>
<span class="hljs-built_in">unset</span> appendload
[[ -f ~/.bashrc ]] && <span class="hljs-built_in">source</span> ~/.bashrc
<span class="hljs-comment">#complete env</span>
[[ -z <span class="hljs-variable">$WINDOWID</span> ]] && setterm -blength 0 && \
[[ -f ~/.profile.d/shared_export.sh ]] && <span class="hljs-built_in">source</span> ~/.profile.d/shared_export.sh
</code></pre></div>
<p>En revanche le fichier <code>~/.profile.d/shared_export.sh</code> qu’il source, si:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash">LIBRARY_PATH=<span class="hljs-string">"<span class="hljs-variable">${HOME}</span>/.local/lib/:<span class="hljs-variable">${LD_LIBRARY_PATH}</span>"</span>
<span class="hljs-built_in">export</span> LD_LIBRARY_PATH=<span class="hljs-string">"<span class="hljs-variable">${LIBRARY_PATH%:}</span>"</span>
<span class="hljs-built_in">export</span> EDITOR=<span class="hljs-string">"vim"</span>
<span class="hljs-built_in">export</span> PATH=<span class="hljs-string">"<span class="hljs-variable">${PATH}</span>:<span class="hljs-variable">${HOME}</span>/bin"</span>
</code></pre></div>
<p>Mais mon home ne fait pas partie des dossiers duliqués dans le <code>PATH</code>.</p>
<p>En tout cas, merci pour ton aide patiente <img src="/static/smileys/smile.png" alt=":)" class="smiley"></p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2121702019-12-16T20:40:23+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p212170<figure><blockquote>
<p>Pour ce qui est du <code>/etc/profile</code>, je n’ai mis que la portion qui touchait au <code>PATH</code>(je pensais que ça suffirait, désolé pour le temps perdu :/), voici l’intégral:</p>
</blockquote><figcaption><a href="https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p212157">charlie02</a></figcaption></figure>
<p>Merci et pas de soucis. <img src="/static/smileys/clin.png" alt=";)" class="smiley"><br>
Est-ce que je peux te demander le fichier <code>/etc/bash.bashrc</code>, du coup ? ^^"</p>
<p>Et sinon, juste pour être certain :</p>
<ul>
<li>Rien d’autres qui touche au <code>PÄTH</code> dans les fichiers <code>/etc/profile.d/perlbin.sh</code> et <code>/etc/profile.d/perlbin.sh</code> ?</li>
<li>Pas de fichier <code>~/.bash_profile</code> ?</li>
</ul>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2121572019-12-16T13:38:30+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p212157<p>Désolé je n’ai pas vu la réponse….</p>
<p>Pour l’ordre de chargement, merci pour l’info, je ne savais pas (le manuel de bash est long, mais il faudrait que je prenne le temps de le lire un jour…)</p>
<p>Pour ce qui est du <code>/etc/profile</code>, je n’ai mis que la portion qui touchait au <code>PATH</code>(je pensais que ça suffirait, désolé pour le temps perdu :/), voici l’intégral:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash"><span class="hljs-comment"># /etc/profile</span>
<span class="hljs-comment"># Set our umask</span>
<span class="hljs-built_in">umask</span> 022
<span class="hljs-comment"># Append our default paths</span>
<span class="hljs-function"><span class="hljs-title">appendpath</span></span> () {
<span class="hljs-keyword">case</span> <span class="hljs-string">":<span class="hljs-variable">$PATH</span>:"</span> <span class="hljs-keyword">in</span>
*:<span class="hljs-string">"<span class="hljs-variable">$1</span>"</span>:*)
;;
*)
PATH=<span class="hljs-string">"<span class="hljs-variable">${PATH:+$PATH:}</span><span class="hljs-variable">$1</span>"</span>
<span class="hljs-keyword">esac</span>
}
appendpath <span class="hljs-string">'/usr/local/sbin'</span>
appendpath <span class="hljs-string">'/usr/local/bin'</span>
appendpath <span class="hljs-string">'/usr/bin'</span>
<span class="hljs-built_in">unset</span> appendpath
<span class="hljs-built_in">export</span> PATH
<span class="hljs-comment"># Load profiles from /etc/profile.d</span>
<span class="hljs-keyword">if</span> <span class="hljs-built_in">test</span> -d /etc/profile.d/; <span class="hljs-keyword">then</span>
<span class="hljs-keyword">for</span> profile <span class="hljs-keyword">in</span> /etc/profile.d/*.sh; <span class="hljs-keyword">do</span>
<span class="hljs-built_in">test</span> -r <span class="hljs-string">"<span class="hljs-variable">$profile</span>"</span> && . <span class="hljs-string">"<span class="hljs-variable">$profile</span>"</span>
<span class="hljs-keyword">done</span>
<span class="hljs-built_in">unset</span> profile
<span class="hljs-keyword">fi</span>
<span class="hljs-comment"># Source global bash config</span>
<span class="hljs-keyword">if</span> <span class="hljs-built_in">test</span> <span class="hljs-string">"<span class="hljs-variable">$PS1</span>"</span> && <span class="hljs-built_in">test</span> <span class="hljs-string">"<span class="hljs-variable">$BASH</span>"</span> && <span class="hljs-built_in">test</span> -z <span class="hljs-variable">${POSIXLY_CORRECT+x}</span> && <span class="hljs-built_in">test</span> -r /etc/bash.bashrc; <span class="hljs-keyword">then</span>
. /etc/bash.bashrc
<span class="hljs-keyword">fi</span>
<span class="hljs-comment"># Termcap is outdated, old, and crusty, kill it.</span>
<span class="hljs-built_in">unset</span> TERMCAP
<span class="hljs-comment"># Man is much better than us at figuring this out</span>
<span class="hljs-built_in">unset</span> MANPATH
</code></pre></div>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2120632019-12-12T14:15:18+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p212063<p>Pour l’histoire du <code>.bash_profile</code> :</p>
<figure><blockquote>
<p>When bash is invoked as an interactive login shell, or as a non-interactive shell with the —login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The —noprofile option may be used when the shell is started to inhibit this behavior.</p>
</blockquote><figcaption>man bash</figcaption></figure>
<p>Donc apparemment il lit également le <code>.profile</code>, mais après le <code>.bash_profile</code>. Sinon, est-ce que tu m’as bien fourni le fichier <code>/etc/profile</code> complet ? Parce que je me rends compte que la partie devant charger les fichiers présents dans <code>/etc/profile.d</code> n’est pas là. ^^" </p>
<p>Aussi, du coup, si tu as un fichier <code>.bash_profile</code> est-ce que tu peux également m’en montrer le contenu ?</p>
<p>Enfin, s’il ne s’agit du contenu complet des fichiers <code>perlbin.sh</code> et <code>jvm.sh</code>, tu es certain qu’il n’y a rien d’autre qui est susceptible d’influer plus tard sur la variable <code>PATH</code> ?</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2119202019-12-08T22:21:04+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211920<p>Non, ma session graphique n’est démarrée qu’une fois que j’ai exécuté <code>startx</code> (c’est pas le fichier <code>.bash_profile</code> qui est lu dans à la connexion en tty?). Avant cela, mon path est normal. J’ai tout de même fais ce que tu as dit avec le fichier <code>.profile</code>, sans résultats…</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2118662019-12-07T18:32:45+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211866<figure><blockquote>
<p>mon fichier .profile est le me que le fichier <code>.initrc</code> (l’un est un lien dur vers l’autre, dans mon souvenir, <code>.xinitrc</code> sert pour utiliser <code>startx</code> ou <code>xinit</code> alors que <code>.profile</code> sert avec un gestionnaire de connexion graphique.).</p>
</blockquote><figcaption><a href="https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211864">charlie02</a></figcaption></figure>
<p>Mmm… Juste par curiosité, vu que ton fichier <code>.profile</code> est exécuté lors d’une connexion sur un tty, j’en déduis que ta session graphique est démarrée automatiquement ? Si oui, est-ce que tu peux essayer de faire cela manuelement pour voir si cela fait une différence ? Il te suffit de remplacer ton fichier <code>.profile</code> par un fichier vide puis d’exécuter <code>startx</code> une fois sur ton tty.</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2118642019-12-07T16:58:08+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211864<p>mon fichier .profile est le me que le fichier <code>.initrc</code> (l’un est un lien dur vers l’autre, dans mon souvenir, <code>.xinitrc</code> sert pour utiliser <code>startx</code> ou <code>xinit</code> alors que <code>.profile</code> sert avec un gestionnaire de connexion graphique.).</p>
<p>voici mon .bashrc:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash"><span class="hljs-comment">#</span>
<span class="hljs-comment"># ~/.bashrc</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># If not running interactively, don't do anything</span>
[[ $- != *i* ]] && <span class="hljs-built_in">return</span>
<span class="hljs-built_in">alias</span> ls=<span class="hljs-string">'ls --color=auto'</span>
<span class="hljs-built_in">alias</span> grep=<span class="hljs-string">'grep --color=auto'</span>
<span class="hljs-comment">#i3 config env var</span>
<span class="hljs-built_in">export</span> I3C=<span class="hljs-string">"<span class="hljs-variable">$HOME</span>/.config/i3"</span>
<span class="hljs-comment">#alias for git config</span>
<span class="hljs-built_in">alias</span> wmc=<span class="hljs-string">'cd $HOME/.config/i3'</span>
<span class="hljs-comment">#dotfiles management</span>
<span class="hljs-built_in">alias</span> config=<span class="hljs-string">'/usr/bin/git --git-dir=$HOME/.cfg --work-tree=$HOME'</span>
complete -F _git config
<span class="hljs-comment">#sudo completion and editing</span>
complete -cf sudo
<span class="hljs-built_in">alias</span> visudo=<span class="hljs-string">"sudo -E visudo"</span>
<span class="hljs-function"><span class="hljs-title">git_branch</span></span>() {
git branch 2> /dev/null | sed -e <span class="hljs-string">'/^[^*]/d'</span> -e <span class="hljs-string">'s/* \(.*\)/(\1)/'</span>
}
PS1=<span class="hljs-string">"[\u@\h \W]\$(git_branch)\$ "</span>
<span class="hljs-comment">#source for auto completion:</span>
<span class="hljs-built_in">source</span> /etc/bash_completion.d/git-flow-completion.bash
<span class="hljs-built_in">source</span> /usr/share/git/completion/git-completion.bash
<span class="hljs-built_in">source</span> /usr/share/bash-completion/bash_completion
</code></pre></div>
<p> aucuns soucis, je suis désolé de ne pas pouvoir être plus utile que donner des fichiers pour l’instant <img src="/static/smileys/hihi.png" alt="^^" class="smiley"></p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2118482019-12-06T21:50:39+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211848<p>Ok, puis-je également te demander ton fichier <code>.profile</code> ainsi que ton fichier <code>.bashrc</code> ou équivalent si tu utilises un autre <em>shell</em> (désolé de te demander encore des fichiers ^^") ?</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2118432019-12-06T20:55:24+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211843<p>Voilà:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash"><span class="hljs-comment">#</span>
<span class="hljs-comment"># ~/.xinitrc</span>
<span class="hljs-comment">#</span>
[[ -f ~/.profile.d/shared_export.sh ]] && <span class="hljs-built_in">source</span> ~/.profile.d/shared_export.sh
<span class="hljs-built_in">export</span> SEARCH_ENGINE=<span class="hljs-string">"duckduckgo.com"</span>
<span class="hljs-built_in">export</span> LD_PRELOAD=
i3
</code></pre></div>
<p>Et voilà le fichier qui est sourcé:</p>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash">LIBRARY_PATH=<span class="hljs-string">"<span class="hljs-variable">${HOME}</span>/.local/lib/:<span class="hljs-variable">${LD_LIBRARY_PATH}</span>"</span>
<span class="hljs-built_in">export</span> LD_LIBRARY_PATH=<span class="hljs-string">"<span class="hljs-variable">${LIBRARY_PATH%:}</span>"</span>
<span class="hljs-built_in">export</span> EDITOR=<span class="hljs-string">"vim"</span>
<span class="hljs-built_in">export</span> PATH=<span class="hljs-string">"<span class="hljs-variable">${PATH}</span>:<span class="hljs-variable">${HOME}</span>/bin"</span>
</code></pre></div>
<p>Je le fais comme ça car ça me permet d’avoir ces variables identiques en tty et une fois en session graphique (bon sauf pour le path manifestement…)</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2118182019-12-06T14:42:12+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211818<p>Saurais-tu publier le contenu de ton fichier <code>xinitrc</code> ici ?</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2118012019-12-06T02:44:51+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211801<p>J’utilise bien une commande i3 dans mon xinitrc et je fais bien un démarrage de la session x à la main (je n’ai pas encore pris le temps d’installer un gestionnaire de connexions graphique).</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2117912019-12-05T14:54:03+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211791<p><em>Mmm</em>… Ce qui est bizarre, c’est qu’ils ne devraient pas être exécutés deux fois. Le fichier <code>/etc/profile</code> et ceux dans <code>/etc/profile.d</code> ne sont normalement exécuté que lors d’une connexion (à l’inverse des fichiers de configurations comme <code>.bashrc</code> et cie qui sont exécutés à chaque lancement d’un <em>shell</em>).</p>
<p>Si j’ai bien saisis, tu lances ta session graphique à la main avec <code>startx</code> ou <code>xinit</code> ? Si oui, tu n’utilises pas une option de <code>i3</code> ou une commande qui provoquerait un second <code>login</code> (comme l’option <code>-l</code> de <code>bash</code>) ?</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2117852019-12-05T10:31:10+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211785<p>Merci de ta réponse!</p>
<p>J’utilise i3wm.<br>
Parmi les fichiers que tu as cités, voici ceux qui touchent au path:</p>
<ul>
<li>dans <code>/etc/profile</code>:</li>
</ul>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash"><span class="hljs-comment"># Append our default paths</span>
<span class="hljs-function"><span class="hljs-title">appendpath</span></span> () {
<span class="hljs-keyword">case</span> <span class="hljs-string">":<span class="hljs-variable">$PATH</span>:"</span> <span class="hljs-keyword">in</span>
*:<span class="hljs-string">"<span class="hljs-variable">$1</span>"</span>:*)
;;
*)
PATH=<span class="hljs-string">"<span class="hljs-variable">${PATH:+$PATH:}</span><span class="hljs-variable">$1</span>"</span>
<span class="hljs-keyword">esac</span>
}
appendpath <span class="hljs-string">'/usr/local/sbin'</span>
appendpath <span class="hljs-string">'/usr/local/bin'</span>
appendpath <span class="hljs-string">'/usr/bin'</span>
<span class="hljs-built_in">unset</span> appendpath
<span class="hljs-built_in">export</span> PATH
</code></pre></div>
<ul>
<li>dans <code>/etc/profile.d/jvm.sh</code>:</li>
</ul>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span></div><pre><code class="hljs language-bash"><span class="hljs-built_in">export</span> PATH=<span class="hljs-variable">${PATH}</span>:/usr/lib/jvm/default/bin
</code></pre></div>
<ul>
<li>dans <code>/etc/proofile.d/perlbin.sh</code></li>
</ul>
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-bash">[ -d /usr/bin/site_perl ] && PATH=<span class="hljs-variable">$PATH</span>:/usr/bin/site_perl
[ -d /usr/lib/perl5/site_perl/bin ] && PATH=<span class="hljs-variable">$PATH</span>:/usr/lib/perl5/site_perl/bin
[ -d /usr/bin/vendor_perl ] && PATH=<span class="hljs-variable">$PATH</span>:/usr/bin/vendor_perl
[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=<span class="hljs-variable">$PATH</span>:/usr/lib/perl5/vendor_perl/bin
[ -d /usr/bin/core_perl ] && PATH=<span class="hljs-variable">$PATH</span>:/usr/bin/core_perl
<span class="hljs-built_in">export</span> PATH
</code></pre></div>
<p>je suppose que le problème viens du fait que <code>perlbin.sh</code> et <code>jvm.sh</code> sont appelés deux fois. Vaut-il mieux faire ne sorte que ce ne soit pas le cas (en modifiant /etc/profile) ou ajouter quelque chose comme <code>append_path</code> dans les fichiers incriminés?</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2117772019-12-05T08:30:54+01:00Taurre/@Taurrehttps://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211777<p>Salut,</p>
<p>Utilises-tu un environnement bureau type Gnome, KDE ou Xfce ?
Sinon, tu es certains de ne rien avoir dans <code>/etc/bash.bashrc</code> (si ton <em>shell</em> est <code>bash</code>), <code>/etc/profile</code>, <code>/etc/profile.d</code> ou <code>/etc/environment</code> ?</p>Duplications dans la variable d'environnement PATH après démarage du sreveur x, message #2117722019-12-04T23:25:20+01:00charlie02/@charlie02https://zestedesavoir.com/forums/sujet/13299/duplications-dans-la-variable-denvironnement-path-apres-demarage-du-sreveur-x/?page=1#p211772<p>Bonjour,<br>
Je me suis aperçu récemment que j’avais une partie des chemins de mon <code>PATH</code> se retrouvaient dupliquées une fois le serveur x lancé: </p>
<ul>
<li>à la fin du <kbd>.xinitrx</kbd>: <code>/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:~/bin</code></li>
<li>une fois la sécession graphique lancée: <code>/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:~/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl</code> </li>
</ul>
<p>J’ai essayé de retrouver dans mes scripts si ça venait d’une ligne mal faite et suis arrivé à la conclusion que non.<br>
Auriez-vous une idée de ce qui est à l’origine de ces duplications?</p>
<p>Merci de votre aide!</p>