<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Linux on Cédric L'homme</title><link>https://l-homme.com/tags/linux/</link><description>Recent content in Linux on Cédric L'homme</description><generator>Hugo</generator><language>fr-fr</language><lastBuildDate>Mon, 09 Mar 2020 18:45:00 +0000</lastBuildDate><atom:link href="https://l-homme.com/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Contrôler le trafic internet sous Linux par application</title><link>https://l-homme.com/posts/controler-le-trafic-internet-sous-linux-par-application/</link><pubDate>Mon, 09 Mar 2020 18:45:00 +0000</pubDate><guid>https://l-homme.com/posts/controler-le-trafic-internet-sous-linux-par-application/</guid><description>&lt;p&gt;Vous avez des pics de trafic inexpliqué ? Vous êtes en fin de mois de votre forfait data et vous voulez voir quelle application consomme quoi lors du partage de connexion ? &lt;a href="https://github.com/raboof/nethogs"&gt;nethogs&lt;/a&gt; va vous aider.&lt;/p&gt;
&lt;p&gt;Sur une distribution de type Debian, installer l&amp;rsquo;application avec :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install nethogs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour éviter de lancer &lt;em&gt;nethogs&lt;/em&gt; avec &lt;em&gt;sudo&lt;/em&gt; et lui donner des droits trop élevés, nous allons utiliser les &lt;a href="https://wiki.archlinux.org/index.php/Capabilities"&gt;capacités&lt;/a&gt; de Linux :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo setcap &lt;span class="s2"&gt;&amp;#34;cap_net_admin,cap_net_raw+pe&amp;#34;&lt;/span&gt; /usr/sbin/nethogs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Il n&amp;rsquo;y a plus qu&amp;rsquo;à lancer la commande :&lt;/p&gt;</description></item><item><title>Supprimer les informations d'une photo sous Linux</title><link>https://l-homme.com/posts/supprimer-les-informations-dune-photo-sous-linux/</link><pubDate>Sun, 16 Feb 2020 19:26:11 +0000</pubDate><guid>https://l-homme.com/posts/supprimer-les-informations-dune-photo-sous-linux/</guid><description>&lt;p&gt;Si vous souhaitez supprimer les informations internes d&amp;rsquo;une photo (&lt;a href="https://fr.wikipedia.org/wiki/Exchangeable_image_file_format"&gt;Exif&lt;/a&gt;, &lt;a href="https://fr.wikipedia.org/wiki/IPTC_Information_Interchange_Model"&gt;IPTC&lt;/a&gt;, &lt;a href="https://fr.wikipedia.org/wiki/Extensible_Metadata_Platform"&gt;XMP&lt;/a&gt;, etc.) vous pouvez utiliser &lt;a href="https://exiftool.org/"&gt;ExifTool&lt;/a&gt; de Phil Harvey.&lt;/p&gt;
&lt;p&gt;Sous une Debian compatible (Ubuntu, Linx Mint, etc.), installez le paquet ExifTool avec :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install libimage-exiftool-perl
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Dans le répertoire contenant vos photos, lancez ExifTool avec l&amp;rsquo;extension de vos images. Exemple avec des jpeg :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;exiftool -all&lt;span class="o"&gt;=&lt;/span&gt; *.jpeg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pas de panique, tous les fichiers originaux traités sont renommés avec le suffixe &lt;em&gt;_original&lt;/em&gt; donc pas de risque de faire une fausse manip. Bon ménage !&lt;/p&gt;</description></item><item><title>Installer virtualenwrapper pour Python 3 dans un environnement Python 2</title><link>https://l-homme.com/posts/installer-virtualenwrapper-pour-python-3-dans-un-environnement-python-2/</link><pubDate>Fri, 07 Feb 2020 09:52:45 +0000</pubDate><guid>https://l-homme.com/posts/installer-virtualenwrapper-pour-python-3-dans-un-environnement-python-2/</guid><description>&lt;p&gt;Par exemple, sur une &lt;a href="https://www.linuxmint.com/"&gt;Linux Mint&lt;/a&gt; 19.3 Tricia basée sur &lt;a href="https://ubuntu.com/"&gt;Ubuntu&lt;/a&gt; 18.04.3 l&amp;rsquo;environnement de base est lié à &lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt; 2. Cela pose problème quand on veut installer et utiliser &lt;a href="https://virtualenv.pypa.io/en/latest/"&gt;virtualenv&lt;/a&gt; avec Python 3.&lt;/p&gt;
&lt;p&gt;Pour commencer, installez les setuptools spécifiques à Python 3 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install python3-setuptools
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Vous pourrez alors utiliser pip pour installer virtualenvwrapper pour Python 3 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo pip3 install virtualenvwrapper
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On teste l&amp;rsquo;import pour vérifier qu&amp;rsquo;il n&amp;rsquo;y a pas d&amp;rsquo;erreur :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ python3
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Python 3.6.9 &lt;span class="o"&gt;(&lt;/span&gt;default, Nov &lt;span class="m"&gt;7&lt;/span&gt; 2019, 10:44:02&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;GCC 8.3.0&lt;span class="o"&gt;]&lt;/span&gt; on linux
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Type &lt;span class="s2"&gt;&amp;#34;help&amp;#34;&lt;/span&gt;, &lt;span class="s2"&gt;&amp;#34;copyright&amp;#34;&lt;/span&gt;, &lt;span class="s2"&gt;&amp;#34;credits&amp;#34;&lt;/span&gt; or &lt;span class="s2"&gt;&amp;#34;license&amp;#34;&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; more information.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt;&amp;gt;&amp;gt; import virtualenvwrapper
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;La fin de votre .bashrc doit donc ressembler à ça :&lt;/p&gt;</description></item></channel></rss>