<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Amicalement Web - Astuces et Bons plans dans le développement web &#187; terminal</title>
	<atom:link href="http://www.amicalement-web.net/tag/terminal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amicalement-web.net</link>
	<description>Astuces et bons plans d&#039;un web developpeur</description>
	<lastBuildDate>Wed, 04 Jan 2012 14:54:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quand on vous dit que Linux peut tout faire</title>
		<link>http://www.amicalement-web.net/quand-on-vous-dit-que-linux-peut-tout-faire/2009/02/28/</link>
		<comments>http://www.amicalement-web.net/quand-on-vous-dit-que-linux-peut-tout-faire/2009/02/28/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 13:57:59 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Bons plans]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=156</guid>
		<description><![CDATA[Linux c&#8217;est génial, on peut tout faire avec vous dira n&#8217;importe quel utilisateur du pingouin, moi le premier. Surtout grâce à sudo qui permet de d&#8217;exécuter des applications sous un autre compte utilisateur (généralement des choses réalisables seulement en root), sans avoir à changer de session. Ca permet d&#8217;éviter de taper par erreur rm -Rf [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.amicalement-web.net/wp-content/uploads/utilities-terminal.png" alt="utilities-terminal" title="utilities-terminal" width="48" height="48" class="alignleft size-full wp-image-41" /> <quote>Linux c&#8217;est génial, on peut tout faire avec</quote> vous dira n&#8217;importe quel utilisateur du pingouin, moi le premier. Surtout grâce à <a  href="http://doc.ubuntu-fr.org/sudo" class="extern">sudo</a> qui permet de d&#8217;exécuter des applications sous un autre compte utilisateur (généralement des choses réalisables seulement en root), sans avoir à changer de session. Ca permet d&#8217;éviter de taper par erreur <code>rm -Rf /*</code><sup>[<a  href="http://www.amicalement-web.net/quand-on-vous-dit-que-linux-peut-tout-faire/2009/02/28/#footnote_0_156" id="identifier_0_156" class="footnote-link footnote-identifier-link" title="cette commande lanc&eacute;e avec les droits root efface tous les fichiers de votre syst&egrave;me">1</a>]</sup> par erreur.<br />
Mais ca va plus loin maintenant avec les distributions modernes, la preuve en image.<br />
<span id="more-156"></span><br />
<embed src="http://blip.tv/play/gfkN7+EvgTM" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed><br />
source: <a  href="http://www.brepettis.com/blog/2009/2/27/sudo-make-me-a-sandwich-robot.html" class="extern">Brepettis.com</a></p>
<ol class="footnotes"><li id="footnote_0_156" class="footnote">cette commande lancée avec les droits root efface tous les fichiers de votre système</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/quand-on-vous-dit-que-linux-peut-tout-faire/2009/02/28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un terminal mac os x plus sexy</title>
		<link>http://www.amicalement-web.net/un-terminal-mac-os-x-plus-sexy/2009/02/05/</link>
		<comments>http://www.amicalement-web.net/un-terminal-mac-os-x-plus-sexy/2009/02/05/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 19:12:16 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=73</guid>
		<description><![CDATA[<img src="http://www.amicalement-web.net/wp-content/uploads/utilities-terminal.png" alt="utilities-terminal" title="utilities-terminal" width="48" height="48" class="alignleft size-full wp-image-41" /> Quand on vient de l'univers Linux vers le monde merveilleux de la pomme, on est vite en manque de notre cher terminal, celui qui permet de faire tout ce qu'on veut rapidement et sans se heurter à une interface peu bavarde parfois.

Mais quel choc quand on a le malheur de lancer le terminal mac dans sa configuration de base:
<a href="http://www.amicalement-web.net/wp-content/uploads/image-30.png"><img src="http://www.amicalement-web.net/wp-content/uploads/image-30-300x229.png" alt="image-30" title="image-30" width="300" height="229" class="alignnone size-medium wp-image-76" /></a>

Assez tristounet, aucune couleur et le panel de configuration est peu enclin à nous aider efficacement. Et pourtant, quand on sait que mac os x est construit sur une base unix, il serait dommage de se priver d'un terminal qui pourrait se révéler très utile, surtout pour un développeur comme moi.

On va donc se lancer dans un petit tuning de terminal. ]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.amicalement-web.net/wp-content/uploads/utilities-terminal.png" alt="utilities-terminal" title="utilities-terminal" width="48" height="48" class="alignleft size-full wp-image-41" /> Quand on vient de l&#8217;univers Linux vers le monde merveilleux de la pomme, on est vite en manque de notre cher terminal, celui qui permet de faire tout ce qu&#8217;on veut rapidement et sans se heurter à une interface peu bavarde parfois.</p>
<p>Mais quel choc quand on a le malheur de lancer le terminal mac dans sa configuration de base:<br />
<a  href="http://www.amicalement-web.net/wp-content/uploads/image-30.png"><img src="http://www.amicalement-web.net/wp-content/uploads/image-30-300x229.png" alt="image-30" title="image-30" width="300" height="229" class="alignnone size-medium wp-image-76" /></a></p>
<p>Assez tristounet, aucune couleur et le panel de configuration est peu enclin à nous aider efficacement. Et pourtant, quand on sait que mac os x est construit sur une base unix, il serait dommage de se priver d&#8217;un terminal qui pourrait se révéler très utile, surtout pour un développeur comme moi.</p>
<p>On va donc se lancer dans un petit tuning de terminal.<br />
<span id="more-73"></span></p>
<p>Première étape, si vous ne l&#8217;avez pas déjà fait, il va falloir <a  href="http://www.macports.org/install.php" class="extern">installer MacPort</a>, pour ceux qui ne connaissent pas, c&#8217;est un gestionnaire de paquet un peu comme l&#8217;est <a  href="http://doc.ubuntu-fr.org/apt" class="extern">APT</a> pour debian/ubuntu.</p>
<p>Une fois MacPort dans la place, on va justement se servir de notre cher terminal et installer le paquet coreutils grâce à la ligne suivante:</p>
<pre>
sudo port install coreutils +with_default_names
</pre>
<p>Une fois l&#8217;installation complète (attention elle peut prendre un peu de temps), on va pouvoir commencer le tuning.</p>
<p>Première chose, le fond blanc n&#8217;est pas l&#8217;idéal surtout que les autres couleurs à notre disposition seront aussi assez claires. Il suffit pour ça d&#8217;aller dans les préférences du Terminal > Réglages > Fenêtre et changer la couleur d&#8217;arrière plan. Personnellement j&#8217;ai mis noir avec une transparence à 60%, moins flashy pour les yeux.<br />
Voici un petit récap de mes autres paramètres à affiner selon vos souhaits:<br />
<a  href="http://www.amicalement-web.net/wp-content/uploads/image-32.png"><img src="http://www.amicalement-web.net/wp-content/uploads/image-32-300x239.png" alt="image-32" title="image-32" width="300" height="239" class="alignnone size-medium wp-image-88" /></a></p>
<p>On continue en éditant le profil de notre terminal grâce au fichier <code>~/.bash_profile</code>. L&#8217;idéal serait de se faire la main avec <a  href="http://fr.wikipedia.org/wiki/Vim" class="extern">VIM</a> mais n&#8217;importe quelle éditeur ira très bien. A noter que si vous n&#8217;aviez jamais mis le nez dans le terminal, il est probable que le fichier n&#8217;existe pas. Aucun souci pour le créer.</p>
<p>Je vous met ici mon fichier, rien d&#8217;énorme juste des couleurs que je trouve agréables, le listing des couleurs disponibles est plus bas:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sw<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sw<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #007800;">$PATH</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MANPATH</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span>:<span style="color: #007800;">$MANPATH</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Couleurs du préfix du terminal</span>
<span style="color: #007800;">NM</span>=<span style="color: #ff0000;">&quot;\[\033[0;38m\]&quot;</span> 
<span style="color: #007800;">HI</span>=<span style="color: #ff0000;">&quot;\[\033[0;37m\]&quot;</span> 
<span style="color: #007800;">HII</span>=<span style="color: #ff0000;">&quot;\[\033[0;36m\]&quot;</span> 
<span style="color: #007800;">SI</span>=<span style="color: #ff0000;">&quot;\[\033[0;33m\]&quot;</span>
<span style="color: #007800;">IN</span>=<span style="color: #ff0000;">&quot;\[\033[0m\]&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$NM</span>[ <span style="color: #007800;">$HI</span>\u <span style="color: #007800;">$HII</span>\h <span style="color: #007800;">$SI</span>\w<span style="color: #007800;">$NM</span> ] <span style="color: #007800;">$IN</span>&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TERM</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;dumb&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LS_OPTIONS</span>=<span style="color: #ff0000;">'--color=auto'</span>
    <span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">dircolors</span> ~<span style="color: #000000; font-weight: bold;">/</span>.dir_colors<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># alias</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ls</span>=<span style="color: #ff0000;">'ls $LS_OPTIONS -hF'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ll</span>=<span style="color: #ff0000;">'ls $LS_OPTIONS -lAhF'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> cd..=<span style="color: #ff0000;">&quot;cd ..&quot;</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">c</span>=<span style="color: #ff0000;">&quot;clear&quot;</span></pre></div></div>

<p>Puis le fichier <code>~/.dir_colors</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Below, there should be one TERM entry for each termtype that is colorizable</span>
TERM linux
TERM linux-c
TERM mach-color
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM xterm
TERM xterm-color
TERM xterm-debian      
&nbsp;
<span style="color: #666666; font-style: italic;"># Below are the color init strings for the basic file types. A color init</span>
<span style="color: #666666; font-style: italic;"># string consists of one or more of the following numeric codes:</span>
<span style="color: #666666; font-style: italic;"># Attribute codes:</span>
<span style="color: #666666; font-style: italic;"># 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed</span>
<span style="color: #666666; font-style: italic;"># Text color codes:</span>
<span style="color: #666666; font-style: italic;"># 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white</span>
<span style="color: #666666; font-style: italic;"># Background color codes:</span>
<span style="color: #666666; font-style: italic;"># 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white</span>
NORMAL 00	<span style="color: #666666; font-style: italic;"># global default, although everything should be something.</span>
FILE 00 	<span style="color: #666666; font-style: italic;"># normal file</span>
DIR 01;<span style="color: #000000;">36</span> 	<span style="color: #666666; font-style: italic;"># directory</span>
LINK 01;<span style="color: #000000;">37</span> 	<span style="color: #666666; font-style: italic;"># symbolic link.  (If you set this to 'target' instead of a</span>
           	<span style="color: #666666; font-style: italic;"># numerical value, the color is as for the file pointed to.)</span>
FIFO <span style="color: #000000;">40</span>;<span style="color: #000000;">33</span>	<span style="color: #666666; font-style: italic;"># pipe</span>
SOCK 01;<span style="color: #000000;">35</span>	<span style="color: #666666; font-style: italic;"># socket</span>
DOOR 01;<span style="color: #000000;">35</span>	<span style="color: #666666; font-style: italic;"># door</span>
BLK <span style="color: #000000;">40</span>;<span style="color: #000000;">33</span>;01	<span style="color: #666666; font-style: italic;"># block device driver</span>
CHR <span style="color: #000000;">40</span>;<span style="color: #000000;">33</span>;01 	<span style="color: #666666; font-style: italic;"># character device driver</span>
ORPHAN <span style="color: #000000;">40</span>;<span style="color: #000000;">31</span>;01 <span style="color: #666666; font-style: italic;"># symlink to nonexistent file</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This is for files with execute permission:</span>
EXEC 01;<span style="color: #000000;">35</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># List any file extensions like '.gz' or '.tar' that you would like ls</span>
<span style="color: #666666; font-style: italic;"># to colorize below. Put the extension, a space, and the color init string.</span>
<span style="color: #666666; font-style: italic;"># (and any comments you want to add after a '#')</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># If you use DOS-style suffixes, you may want to uncomment the following:</span>
<span style="color: #666666; font-style: italic;">#.cmd 01;32 # executables (bright green)</span>
<span style="color: #666666; font-style: italic;">#.exe 01;32</span>
<span style="color: #666666; font-style: italic;">#.com 01;32</span>
<span style="color: #666666; font-style: italic;">#.btm 01;32</span>
<span style="color: #666666; font-style: italic;">#.bat 01;32</span>
&nbsp;
.tar 01;<span style="color: #000000;">31</span> <span style="color: #666666; font-style: italic;"># archives or compressed (bright red)</span>
.tgz 01;<span style="color: #000000;">31</span>
.arj 01;<span style="color: #000000;">31</span>
.taz 01;<span style="color: #000000;">31</span>
.lzh 01;<span style="color: #000000;">31</span>
.zip 01;<span style="color: #000000;">31</span>
.z   01;<span style="color: #000000;">31</span>
.Z   01;<span style="color: #000000;">31</span>
.gz  01;<span style="color: #000000;">31</span>
.bz2 01;<span style="color: #000000;">31</span>
.deb 01;<span style="color: #000000;">31</span>
.rpm 01;<span style="color: #000000;">31</span>
.jar 01;<span style="color: #000000;">31</span>
.dmg 01;<span style="color: #000000;">31</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># image formats</span>
.jpg 01;<span style="color: #000000;">34</span>
.png 01;<span style="color: #000000;">34</span>
.gif 01;<span style="color: #000000;">34</span>
.bmp 01;<span style="color: #000000;">34</span>
.ppm 01;<span style="color: #000000;">34</span>
.tga 01;<span style="color: #000000;">34</span>
.xbm 01;<span style="color: #000000;">34</span>
.xpm 01;<span style="color: #000000;">34</span>
.tif 01;<span style="color: #000000;">34</span>
.png 01;<span style="color: #000000;">34</span>
.mpg 01;<span style="color: #000000;">34</span>
.avi 01;<span style="color: #000000;">34</span>
.fli 01;<span style="color: #000000;">34</span>
.gl 01;<span style="color: #000000;">35</span>
.dl 01;<span style="color: #000000;">35</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># source code files</span>
.pl 00;<span style="color: #000000;">33</span>
.PL 00;<span style="color: #000000;">33</span>
.pm 00;<span style="color: #000000;">33</span>
.tt 00;<span style="color: #000000;">33</span>
.yml 00;<span style="color: #000000;">33</span>
.sql 00;<span style="color: #000000;">33</span>
.html 00;<span style="color: #000000;">33</span>
.css 00;<span style="color: #000000;">33</span>
.js 00;<span style="color: #000000;">33</span></pre></div></div>

<p>On obtient alors ceci:<br />
<a  href="http://www.amicalement-web.net/wp-content/uploads/image-33.png"><img src="http://www.amicalement-web.net/wp-content/uploads/image-33-300x155.png" alt="image-33" title="image-33" width="300" height="155" class="alignnone size-medium wp-image-89" /></a></p>
<p>C&#8217;est déjà plus agréable mais il manque la geek touch. Pour arranger ça, on va rendre notre terminal accessible tout le temps, avec un style quake like.</p>
<p>Pour ce faire, première chose, <a  href="http://www.culater.net/software/SIMBL/SIMBL.php" class="extern">installer SIMBL</a>. Une application, qui permet ensuite de faire des plugins pour des applications cocoas (comme notre terminal). Une fois installé, <a  href="http://code.google.com/p/blacktree-visor/" class="extern">téléchargez visor</a>, un plugin SIMBL.</p>
<p>Voilà, killez votre terminal s&#8217;il est encore ouvert et quand vous le relancez, celui-ci ne s&#8217;ouvre pas mais un petit icone est apparu dans votre menubar:<br />
<img src="http://www.amicalement-web.net/wp-content/uploads/image-35-300x38.png" alt="image-35" title="image-35" width="300" height="38" class="alignnone size-medium wp-image-90" /></p>
<p>Choisissez &laquo;&nbsp;Visor Preferences&#8230;&nbsp;&raquo;, définissez le raccourci que vous souhaitez et testez! Voilà, plus besoin de fermer votre terminal, celui-ci se range dans votre menubar. Pour les sceptiques, une petite vidéo du résultat:<br />
<object width='425' height='344' type='application/x-shockwave-flash' data='http://www.screentoaster.com/swf/STPlayer.swf'><param name='movie' value='http://www.screentoaster.com/swf/STPlayer.swf'/><param name='allowFullScreen' value='true'/><param name='flashvars' value='video=stUE1TSkxIR1pcSFtYXlhbX1BR'/></object>
<div style='width: 425px; text-align: right;'><a  href="http://www.screentoaster.com/">Screencasts and videos online</a></div>
<p>Attention, un petit bonus s&#8217;est caché dans ce billet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/un-terminal-mac-os-x-plus-sexy/2009/02/05/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
