<?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>Pogoplug &#8211; Obihörnchen&#039;s Blog</title>
	<atom:link href="https://obihoernchen.net/category/tutorials/pogoplug-projects/feed/" rel="self" type="application/rss+xml" />
	<link>https://obihoernchen.net</link>
	<description>Beyond Reality</description>
	<lastBuildDate>Sat, 11 Mar 2023 00:42:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://obihoernchen.net/wordpress/wp-content/uploads/2016/10/cropped-1476646398_36-android-32x32.png</url>
	<title>Pogoplug &#8211; Obihörnchen&#039;s Blog</title>
	<link>https://obihoernchen.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Daily Newspaper on E-Book Reader via Arch Linux</title>
		<link>https://obihoernchen.net/933/newspaper-on-kindle-linux/</link>
					<comments>https://obihoernchen.net/933/newspaper-on-kindle-linux/#comments</comments>
		
		<dc:creator><![CDATA[Obihoernchen]]></dc:creator>
		<pubDate>Mon, 25 Mar 2013 13:43:51 +0000</pubDate>
				<category><![CDATA[Pogoplug]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://obihoernchen.net/wordpress/?p=933</guid>

					<description><![CDATA[My friend x23b5 has an Amazon Kindle and wants to read daily newspapers each morning. Time for a cron job on my Pogoplug to send some newspapers to this Kindle 🙂 There is a pretty cool package called calibre. It can convert online newspapers to ebook specific files and send it via email to your &#8230; <a href="https://obihoernchen.net/933/newspaper-on-kindle-linux/" class="more-link">Continue reading <span class="screen-reader-text">Daily Newspaper on E-Book Reader via Arch Linux</span></a>]]></description>
										<content:encoded><![CDATA[<p>My friend <span class="removed_link" title="http://icetea-planet.de/zeitungen-auf-den-kindle/">x23b5</span> has an Amazon Kindle and wants to read daily newspapers each morning.</p>
<p>Time for a cron job on my Pogoplug to send some newspapers to this Kindle <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>There is a pretty cool package called <a title="calibre" href="http://calibre-ebook.com/" target="_blank">calibre</a>.<br />
It can convert online newspapers to ebook specific files and send it via email to your eBook Reader.</p>
<p>Install calibre</p>
<pre class="EnlighterJSRAW" data-enlighter-language="default" data-enlighter-title="">pacman -Sy calibre</pre>
<p>Calibre uses recipes to fetch news and convert those to ebook files like <strong><em>.mobi</em></strong> or <strong><em>.epub</em></strong>.<br />
You can list all available recipes with the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="default" data-enlighter-title="">ebook-convert --list-recipes</pre>
<p><em>Note: It&#8217;s a good idea to create a new email for this task because your password will be saved in plain text. Use a freemailer or create a new user on your own mailserver.<br />
</em>Create the following file in <strong>/usr/local/bin/calibre-cron</strong> and replace all variables and recipes with yours.<br />
I used another usb stick (cacheStick) to save the temp files because I want to protect my arch linux stick.<br />
To change the output format just change the file extension.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="default" data-enlighter-title="">nano /usr/local/bin/calibre-cron</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">#!/bin/bash

TEMPPATH=/media/cacheStick/calibre/
SERVER_ADDRESS=smtp.mailserver.com
USERNAME=myusername
PASSWORD=mypassword
FROM_EMAIL=ebook@mailserver.com
TO_EMAIL=testuser@kindle.com

# Netzpolitik
ebook-convert &quot;Netzpolitik.recipe&quot; ${TEMPPATH}netzpolitik.mobi
calibre-smtp -a ${TEMPPATH}netzpolitik.mobi -s &quot;Netzpolitik&quot; -r $SERVER_ADDRESS -u $USERNAME -p $PASSWORD $FROM_EMAIL $TO_EMAIL &quot;Netzpolitik&quot;

# Heise
ebook-convert &quot;Heise-online.recipe&quot; ${TEMPPATH}heise.mobi
calibre-smtp -a ${TEMPPATH}heise.mobi -s &quot;Heise&quot; -r $SERVER_ADDRESS -u $USERNAME -p $PASSWORD $FROM_EMAIL $TO_EMAIL &quot;Heise&quot;

# Berliner Zeitung
ebook-convert &quot;Berliner Zeitung.recipe&quot; ${TEMPPATH}bz.mobi
calibre-smtp -a ${TEMPPATH}bz.mobi -s &quot;Berliner Zeitung&quot; -r $SERVER_ADDRESS -u $USERNAME -p $PASSWORD $FROM_EMAIL $TO_EMAIL &quot;Berliner Zeitung&quot;</pre>
<p>Make it executable:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">chmod u+x /usr/local/bin/calibre-cron</pre>
<p>Execute it and check whether it works.</p>
<p>Now we have to create a cron job to execute this script each morning.<br />
Execute this command before you edit your crontab file.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">export EDITOR=&quot;/usr/bin/nano&quot;</pre>
<p>Edit your crontab file:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">crontab -e</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title=""># daily at 5:00
0 5 * * *       /usr/local/bin/calibre-cron &gt; /dev/null 2&gt;&amp;1</pre>
<p>&#8220;<em>&gt; /dev/null 2&gt;&amp;1</em>&#8221; because I don&#8217;t need any email or log output.</p>
<p>Now enable cron service:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">systemctl enable cronie
systemctl start cronie</pre>
<p><strong>Calibre is pretty memory and cpu intensive and takes pretty long! You should run it overnight otherwise your plug pc will be very slow.</strong></p>
<p>How it looks like:</p>
<p><a href="http://obihoernchen.net/wordpress/wp-content/uploads/2013/03/kindle2.jpg" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img fetchpriority="high" decoding="async" class="alignleft size-full wp-image-934" src="http://obihoernchen.net/wordpress/wp-content/uploads/2013/03/kindle2.jpg" alt="Kindle newspaper" width="400" height="533" srcset="https://obihoernchen.net/wordpress/wp-content/uploads/2013/03/kindle2.jpg 400w, https://obihoernchen.net/wordpress/wp-content/uploads/2013/03/kindle2-225x300.jpg 225w" sizes="(max-width: 400px) 100vw, 400px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://obihoernchen.net/933/newspaper-on-kindle-linux/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Setup Samba 4 on Arch Linux</title>
		<link>https://obihoernchen.net/877/setup-samba-4-on-arch-linux/</link>
					<comments>https://obihoernchen.net/877/setup-samba-4-on-arch-linux/#comments</comments>
		
		<dc:creator><![CDATA[Obihoernchen]]></dc:creator>
		<pubDate>Tue, 12 Mar 2013 14:52:30 +0000</pubDate>
				<category><![CDATA[Pogoplug]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://obihoernchen.net/wordpress/?p=877</guid>

					<description><![CDATA[Updated: [03.05.2015] Sync some performance settings with my own personal settings, added a link to some more performance tips (see bottom). Updated: [28.09.2015] Sync again Note: Check this article if you want to install arch on your pogoplug. Samba 4 is out now 🙂 So I&#8217;ll make this tutorial for Samba 4 because it seems &#8230; <a href="https://obihoernchen.net/877/setup-samba-4-on-arch-linux/" class="more-link">Continue reading <span class="screen-reader-text">Setup Samba 4 on Arch Linux</span></a>]]></description>
										<content:encoded><![CDATA[<p><em>Updated: [03.05.2015] Sync some performance settings with my own personal settings, added a link to some more performance tips (see bottom).<br />
Updated: [28.09.2015] Sync again</em></p>
<p><em>Note: Check <a href="http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/">this </a>article if you want to install arch on your pogoplug.</em></p>
<p>Samba 4 is out now <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
So I&#8217;ll make this tutorial for Samba 4 because it seems to be slightly faster.<br />
This article will tell you how to install it on your PogoplugV2 or another PlugPC.<br />
Should be pretty much the same for all arch installations.</p>
<p>Samba 3 is going to be removed once Samba 4 is installed.<br />
Your old config will be saved to /etc/samba/smb.conf.pacorig</p>
<p>Installation of Samba 4 is pretty easy.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-title="">pacman -Sy samba</pre>
<p>Now enable the services.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-title="">systemctl enable smbd nmbd</pre>
<h3>Create Users</h3>
<p>If you want to create shares for multiple users you have to create new Unix user and add this one to samba as well.<br />
To make it clean we will create a group called <em>&#8220;samba&#8221;</em>.</p>
<pre class="brush: bash; gutter: true">groupadd samba</pre>
<p>Now we can add a new user to this group. This user <em>&#8220;fabian&#8221; </em>is not able to login (-s /sbin/nologin) for security purposes.</p>
<pre class="brush: bash; gutter: true">useradd -m -g samba -s /sbin/nologin fabian</pre>
<p>To use this user in samba shares you have to add it to samba</p>
<pre class="brush: bash; gutter: true">pdbedit -a -u fabian</pre>
<h3>Create Shares</h3>
<p>We are ready to configure our samba shares.<br />
At the beginning configure<br />
To do so edit /etc/samba/smb.conf</p>
<pre class="brush: bash; gutter: true">nano /etc/samba/smb.conf</pre>
<p>Here is an example configuration.<br />
You have to edit the Share definitions below so it fits your setup.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="default" data-enlighter-title="">[global]
   workgroup = WORKGROUP
   server string = POGOPLUG
   netbios name = POGOPLUG
   # hosts allow = 192.168.0.
   printcap name = /dev/null
   load printers = no
   disable spoolss = yes
   printing = bsd
   show add printer wizard = no
   print notify backchannel = no
   log file = /var/log/samba/log.%m
   max log size = 50
   security = user
   dns proxy = no
   # For public share without login
   map to guest = Bad User

   # Android bugix for reading files (samba4 bug see: https://bugzilla.samba.org/show_bug.cgi?id=9706)
   unix extensions = false

   # Fix for file batch copy issues (see: http://archlinuxarm.org/forum/viewtopic.php?f=18&amp;t=4864) - seems to be fixed now (28.09.2015)
   # oplocks = no
   # level2 oplocks = no

   # Some Tuning (See Optimize Performance)
   socket options = TCP_NODELAY IPTOS_LOWDELAY
   write cache size = 262144
   # sendfile will interrupt data transfer :/ (but cpu usage is less) - seems to be fixed now (03.05.2015)
   use sendfile = true
   getwd cache = yes
   min receivefile size = 16384
   max xmit = 65536
   # Global security
   public = yes

#============================ Share Definitions ==============================

# Public, read only
[Videos]
        comment = Videos for all
        read only = yes
        # use this only for read only shares!
        fake oplocks = yes
        path = /media/zincobi/Videos

# Public, writeable
[Abrechnungen]
        comment = Abrechnungen
        read only = no
        writeable = yes
        path = /media/zincobi/Abrechnungen

# whole HDD, only for fabian
[zincobi]
        comment = Fabians share
        public = no
        valid users = fabian
        read only = no
        writeable = yes
        path = /media/zincobi</pre>
<h3>Optimize performance</h3>
<p>The stock performance of samba isn&#8217;t that great. Especially with NTFS.<br />
But there are some parameters which will increase Samba performance significantly.</p>
<p>Add all these settings to the <em>global</em> section in your <em>smb.conf</em> file.</p>
<pre class="brush: bash; gutter: true">socket options = TCP_NODELAY IPTOS_LOWDELAY</pre>
<p>The main problem for slow file transfer speeds is NTFS, because NTFS needs much CPU on linux.<br />
Nevertheless there are 2 options which will boost the speed:</p>
<p><strong>write cache size</strong></p>
<p style="padding-left: 30px;">If this integer parameter is set to non-zero value, Samba will create an in-memory cache for each oplocked file (it does <em>not</em> do this for non-oplocked files). All writes that the client does not request to be flushed directly to disk will be stored in this cache if possible. The cache is flushed onto disk when a write comes in whose offset would not fit into the cache or when the file is closed by the client. Reads for the file are also served from this cache if the data is stored within it.</p>
<p style="padding-left: 30px;">This cache allows Samba to batch client writes into a more efficient write size for RAID disks (i.e. writes may be tuned to be the RAID stripe size) and can improve performance on systems where the disk subsystem is a bottleneck but there is free memory for userspace programs.</p>
<p style="padding-left: 30px;">The integer parameter specifies the size of this cache (per oplocked file) in bytes.</p>
<p style="padding-left: 30px;">Default: <em><em><code>write cache size</code></em> = <code>0</code></em></p>
<p style="padding-left: 30px;">Example: <em><em><code>write cache size</code></em> = <code>262144 # for a 256k cache size per file</code></em></p>
<p>Some example values are:</p>
<pre class="brush: bash; gutter: true">write cache size = 262144</pre>
<p><em> (262144 = 256KB &#8211; you should test some values it&#8217;s pretty memory intensive)</em></p>
<p>Don&#8217;t forget to start the samba services or reboot:</p>
<pre class="brush: bash; gutter: true ">systemctl start smbd nmbd</pre>
<p>For some additonal performance tips check this blogpost: <a href="https://linuxengineering.wordpress.com/2014/08/03/performance-tuning-with-pogoplug-v4/">https://linuxengineering.wordpress.com/2014/08/03/performance-tuning-with-pogoplug-v4/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://obihoernchen.net/877/setup-samba-4-on-arch-linux/feed/</wfw:commentRss>
			<slash:comments>44</slash:comments>
		
		
			</item>
		<item>
		<title>Installing Arch Linux and setting up everything on Plug Computers like PogoplugV2</title>
		<link>https://obihoernchen.net/770/plug_computer_arch_linux/</link>
					<comments>https://obihoernchen.net/770/plug_computer_arch_linux/#comments</comments>
		
		<dc:creator><![CDATA[Obihoernchen]]></dc:creator>
		<pubDate>Wed, 30 Jan 2013 20:10:36 +0000</pubDate>
				<category><![CDATA[Pogoplug]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://obihoernchen.net/wordpress/?p=770</guid>

					<description><![CDATA[Some weeks ago I&#8217;ve ordered a so called &#8220;Plug Computer&#8221;. These Computers are very small devices with an ARM SoC. They are pretty cheap! I&#8217;ve got my PogoplugV2 for 10€ 🙂 I was lucky and got the gray version 😀 Some device info: ARMv5te CPU (Marvell Kirkwood 1.2GHz) 256MB RAM 128MB NAND 4 USB 2.0 Ports Pretty &#8230; <a href="https://obihoernchen.net/770/plug_computer_arch_linux/" class="more-link">Continue reading <span class="screen-reader-text">Installing Arch Linux and setting up everything on Plug Computers like PogoplugV2</span></a>]]></description>
										<content:encoded><![CDATA[<p>Some weeks ago I&#8217;ve ordered a so called &#8220;Plug Computer&#8221;.<a style="color: #ed1e24; text-decoration: underline;" href="http://obihoernchen.net/wordpress/wp-content/uploads/2013/01/pogopro.jpg" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption=""><img decoding="async" class="size-full wp-image-777 alignright" title="" src="http://obihoernchen.net/wordpress/wp-content/uploads/2013/01/pogopro.jpg" alt="PogoplugV2" width="240" height="240" srcset="https://obihoernchen.net/wordpress/wp-content/uploads/2013/01/pogopro.jpg 240w, https://obihoernchen.net/wordpress/wp-content/uploads/2013/01/pogopro-150x150.jpg 150w" sizes="(max-width: 240px) 100vw, 240px" /></a><br />
These Computers are very small devices with an ARM SoC.<br />
They are pretty cheap! I&#8217;ve got my PogoplugV2 for 10€ <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>I was lucky and got the gray version <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
Some device info:</p>
<ul>
<li><span style="line-height: 18px;">ARMv5te CPU (Marvell Kirkwood 1.2GHz)</span></li>
<li>256MB RAM</li>
<li>128MB NAND</li>
<li>4 USB 2.0 Ports</li>
</ul>
<p>Pretty great to use this device as a small homeserver/fileserver. Remember 10€!<br />
I want to use my Pogoplug as a fileserver (for Windows PCs) and DLNA server to stream to my TV.<br />
On top of that maybe some additional stuff in the feature <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>But the default software sucks. No Samba support, no DLNA, no FTP, &#8230;<br />
But this doesn&#8217;t matter because there is an Arch Linux for ARM Port.<br />
This is an instruction how to install Arch Linux on a PogoplugV2.<br />
Everything after the Arch Linux installation (Install Webmin, Samba, DLNA, &#8230;) can be used for all devices which run Arch Linux for ARM.</p>
<p><span style="font-size: 26px; letter-spacing: -0.03em; line-height: normal;">Prepare device and install Arch Linux</span></p>
<p><a href="http://obihoernchen.net/wordpress/wp-content/uploads/2013/01/wikilogo_0_0.png" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption=""><img decoding="async" class="size-full wp-image-778   alignnone" title="" src="http://obihoernchen.net/wordpress/wp-content/uploads/2013/01/wikilogo_0_0.png" alt="Arch Linux" width="400" height="89" srcset="https://obihoernchen.net/wordpress/wp-content/uploads/2013/01/wikilogo_0_0.png 400w, https://obihoernchen.net/wordpress/wp-content/uploads/2013/01/wikilogo_0_0-300x66.png 300w" sizes="(max-width: 400px) 100vw, 400px" /></a></p>
<p style="padding-left: 30px;">Everything we have to do to install Arch Linux are 4 steps.</p>
<ol style="padding-left: 30px;">
</ol>
<ol>
<li style="padding-left: 30px;"><span style="line-height: 18px;">Enabe SSH Access</span></li>
<li style="padding-left: 30px;">Format an USB Stick (min. 2GB size)</li>
<li style="padding-left: 30px;">Flash a custom Bootloader to boot from your USB Stick</li>
<li style="padding-left: 30px;">Install Arch Linux</li>
</ol>
<p style="padding-left: 30px;">An instruction how to do that is available here: http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray<br />
There are instuctions for other devices as well.<br />
If you use Windows use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank" rel="noopener">PuTTY</a> as a SSH client.</p>
<h2>Setup everything</h2>
<h3>1. Login via SSH</h3>
<p style="padding-left: 30px;">Use PuTTY or another SSH client to access your Pogoplug.</p>
<p style="padding-left: 30px;">username: root<br />
password: root</p>
<h3> <span style="letter-spacing: -0.02em;">2. Change your root password</span></h3>
<p style="padding-left: 30px;">First you should change your root password.<br />
Use the following command to do so:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-title="">passwd root</pre>
<h3> 3. Update Arch Linux</h3>
<p style="padding-left: 30px;">Arch Linux has an own package manager called pacman.<br />
With pacman you can install/remove packages and update Arch Linux.</p>
<p style="padding-left: 30px;">To update Arch Linux use the following command:</p>
<pre class="brush: bash; gutter: true">pacman -Syu</pre>
<h3> 4. Change hostname and timezone</h3>
<p style="padding-left: 30px;"><em>Note: For GUI lovers: skip this step and set hostname and timezone in the webmin interface (next step)</em></p>
<p style="padding-left: 30px;">The default hostname is &#8220;alarm&#8221;. Let&#8217;s change it!</p>
<pre class="brush: bash; gutter: true">hostnamectl set-hostname myhostname</pre>
<p style="padding-left: 30px;">To get all available timezones use:</p>
<pre class="brush: bash; gutter: true">timedatectl list-timezones</pre>
<p style="padding-left: 30px;">And to set your timezone:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="default" data-enlighter-title="">timedatectl set-timezone &lt;Zone&gt;/&lt;SubZone&gt;</pre>
<p style="padding-left: 30px;">For example:</p>
<pre class="brush: bash; gutter: true">timedatectl set-timezone Europe/Berlin</pre>
<p style="padding-left: 30px;">Now reboot:</p>
<pre class="brush: bash; gutter: true">reboot</pre>
<p style="padding-left: 30px;">Wait a few seconds and reconnect to SSH.</p>
<h3> 5. Install Webmin</h3>
<p style="padding-left: 30px;"><a href="http://www.webmin.com/" target="_blank" rel="noopener">Webmin</a> is a pretty cool web-based interface for system administration.<br />
It&#8217;s easy to use  and will help you to configure stuff faster.<br />
To install it use:</p>
<pre class="brush: bash; gutter: true">pacman -Sy webmin perl-net-ssleay</pre>
<p style="padding-left: 30px;">Now we have to allow access from more IP addresses.<br />
You have to edit the configuration file.</p>
<pre class="brush: bash; gutter: true">nano /etc/webmin/miniserv.conf</pre>
<p style="padding-left: 30px;">Find the following line: <strong><em>allow=127.0.0.1</em></strong><br />
Now add a new allow line with your local network broadcast ip or a specific ip and save the file.<br />
For example:</p>
<pre class="brush: bash; gutter: true">allow=127.0.0.1 ## Allow local access
allow=192.168.0.0 ## Allows all users from 192.168.0.1 - 192.168.0.255</pre>
<p style="padding-left: 30px;">Now we&#8217;ll enable &amp; start the webmin service so it autostarts.</p>
<pre class="brush: bash; gutter: true">systemctl enable webmin
systemctl start webmin</pre>
<p style="padding-left: 30px;">To access the Webmin interface open a browser and go to:<br />
<strong><em>https://deviceip:10000</em></strong></p>
<p style="padding-left: 30px;">To lower memory usage go to:<br />
Webmin&gt;Webmin Configuration&gt;Advanced Configuration and disable <em>&#8220;<b>Pre-load Webmin functions library?&#8221;</b></em></p>
<h3> 6. USB Auto Mount</h3>
<p style="padding-left: 30px;">If you want to remove your USB HDD and use it anywhere else it would be cool to have automounting like Windows.<br />
There are a lot of auto mounting mechanisms for Arch Linux but a lot of them are outdated.<br />
This one is using udevil to auto mount all USB HDDs on attach as /media/PARTITION_LABEL. So make sure all partitions have a label!</p>
<pre class="brush: bash; gutter: true">pacman -Sy udevil</pre>
<p style="padding-left: 30px;">I want to access my HDDs via Samba to use them in Windows so I have to use either FAT32 or NTFS.<br />
This sucks because FAT32 isn&#8217;t able to handle files &gt;4GB so it&#8217;s useless.<br />
And <strong>NTFS</strong> is fucking slow on Linux.</p>
<p style="padding-left: 30px;">But with some special mount options we are able to increase the speed dramatically!<br />
I&#8217;ve did some benchmarks with <em>hdparm</em> and <em>dd</em> before and after the optimization.<br />
The read speed was pretty good already (about 29MB/s &#8211;&gt; USB 2.0 limit).<br />
But the write speed was really bad!</p>
<p style="padding-left: 30px;"><strong>Before: </strong>~6,5 MB/s write speed<br />
<strong>After: </strong>~28,5 MB/s write speed</p>
<p style="padding-left: 30px;">As you can see the write speed on <strong>NTFS</strong> was really slow before. But there is a way to fix it <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
We have to edit the mount options and add a special <em>ntfs-3g</em> option to our <em>udevil</em> automount settings.<br />
Open the <em>udevil</em> config file and edit it:</p>
<pre class="brush: bash; gutter: true">nano /etc/udevil/udevil.conf</pre>
<p style="padding-left: 30px;">Search for<strong><em> default_options_ntfs=</em> </strong>and <strong><em>allowed_options=</em></strong></p>
<p style="padding-left: 30px;">Now we add the option <strong>&#8220;big_writes&#8221;</strong> to both lines so it looks like:</p>
<pre class="brush: bash; gutter: true">..., noatime, big_writes, uid=...</pre>
<p style="padding-left: 30px;">Save the file.</p>
<p style="padding-left: 30px;">Create the /media directory</p>
<pre class="brush: bash; gutter: true">mkdir /media</pre>
<p style="padding-left: 30px;">Add the udevil service to autostart.</p>
<pre class="brush: bash; gutter: true">systemctl enable devmon@root</pre>
<p style="padding-left: 30px;">Let&#8217;s reboot to see whether it works</p>
<pre class="brush: bash; gutter: true">reboot</pre>
<p style="padding-left: 30px;">Wait a few seconds and reconnect to SSH.<br />
Now you&#8217;ll have a new folder: <strong><em>/media/yourHDDname</em></strong><em> </em>where your HDD is mounted.<br />
And you should see something like <em><strong>/dev/sdX1 on /media/&#8230; </strong></em>if you type:</p>
<pre class="brush: bash; gutter: true">mount</pre>
<p style="padding-left: 30px;"><strong>Note: All USB HDDs should go to standby automatically</strong>.<br />
You can check with:</p>
<pre class="brush: bash; gutter: true; first-line: 1">hdparm -C /dev/sda</pre>
<p><span style="font-size: 20px; letter-spacing: -0.02em; line-height: normal;">7. Blink LED to HDD activity</span></p>
<p style="padding-left: 30px;">The PogoplugV2 has a green and orange LED.<br />
So I thought it would be a cool idea change the color to HDD activity.<br />
I&#8217;ve created an systemd service.</p>
<p style="padding-left: 30px;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p style="padding-left: 30px;"><span style="color: #ff0000;"><strong>Only If you have a PogoplugV2!</strong></span></p>
<p style="padding-left: 30px;">You have to correct your <em><strong>arcNumber</strong> </em>and <em><strong>matchid</strong></em><strong> </strong>because there is a bug in the current uboot and your Pogoplug isn&#8217;t detected as a PogoplugV2.</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy uboot-env
fw_setenv arcNumber 3542
fw_setenv machid dd6
reboot</pre>
<p style="padding-left: 30px;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p style="padding-left: 30px;">We need the <em><strong>iostat</strong> </em>binary to create our own deamon.<br />
Iostat will check hdd activity.</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy sysstat</pre>
<p style="padding-left: 30px;">Create a new file called <em><strong>/usr/lib/systemd/system/blinkled.service</strong> </em>with the following content:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[Unit]
Description=Blink LED if hard drive is active daemon

[Service]
Type=oneshot
ExecStart=/usr/local/bin/blinkled
ExecStop=/usr/bin/killall iostat
RemainAfterExit=true

[Install]
WantedBy=multi-user.target</pre>
<p style="padding-left: 30px;">Create another file called <strong><em>/usr/local/bin/blinkled</em></strong><br />
This command is pretty long <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> It will execute iostat every 3 seconds. If there is HDD activity the Pogoplug will start to blink orange.<br />
You can change <em><strong>heartbeat</strong></em> to <em><strong>default-on</strong></em> or <em><strong>timer</strong></em> as well.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">#!/bin/bash
/usr/bin/iostat -z -d 3 | /usr/bin/sed -u -e &#039;1d&#039; -e &#039;s/Device.*/none/&#039; -e &#039;s/sd.*/heartbeat/&#039; -e &#039;/^$/d&#039; &gt; /sys/class/leds/status:orange:fault/trigger &amp;</pre>
<p style="padding-left: 30px;">And make it executable</p>
<pre class="brush: bash; gutter: true; first-line: 1">chmod u+x /usr/local/bin/blinkled</pre>
<p style="padding-left: 30px;">To start our service use:</p>
<pre class="brush: bash; gutter: true; first-line: 1">systemctl start blinkled</pre>
<p style="padding-left: 30px;">To autostart use:</p>
<pre class="brush: bash; gutter: true; first-line: 1">systemctl enable blinkled</pre>
<h3> 8. Update Kernel to &gt;3.2</h3>
<p style="padding-left: 30px;"><span style="color: #ff0000;"><strong>Warning: This specific instruction works for PogoplugV2 only!<br />
You can brick your device!</strong></span></p>
<p style="padding-left: 30px;">The current kernel for PogoplugV2 is 3.1.x but 3.8.x or newer is available.<br />
You have to update manually because newer kernels need a new uboot.</p>
<p style="padding-left: 30px;">You need the newest <em><strong>uboot</strong> </em>to boot Kernels &gt;3.2 so you have to install it before:<br />
If this is a fresh installation you probably have the newest uboot already and you don&#8217;t have to do that!</p>
<pre class="brush: bash; gutter: true; first-line: 1">cd /tmp
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh</pre>
<p style="padding-left: 30px;">Then you have to correct your <em><strong>arcNumber</strong> </em>and <em><strong>matchid</strong> </em>if you didn&#8217;t follow &#8220;Blink LED to HDD activity&#8221;.</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy uboot-env
fw_setenv arcNumber 3542
fw_setenv machid dd6
reboot</pre>
<p style="padding-left: 30px;">Now you can install the new <em><strong>Kernel</strong> </em>files with:</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy linux-kirkwood linux-headers-kirkwood
reboot</pre>
<h3> 9. Install Samba</h3>
<p><a title="See the following post" href="http://obihoernchen.net/wordpress/877/setup-samba-4-on-arch-linux/" target="_blank" rel="noopener">See this post</a></p>
<h3>10. Install MiniDLNA</h3>
<p style="padding-left: 30px;">Install <a title="MiniDLNA" href="http://sourceforge.net/projects/minidlna/" target="_blank" rel="noopener">MiniDLNA</a> and enable the service.</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy minidlna
systemctl enable minidlna</pre>
<p style="padding-left: 30px;">Now edit the config file</p>
<pre class="brush: bash; gutter: true; first-line: 1">nano /etc/minidlna.conf</pre>
<p style="padding-left: 30px;">It&#8217;s pretty easy to understand the config file and the documentation is well.<br />
You have to set at least one <em><strong>media_dir</strong></em><br />
All USB devices are mounted at <em><strong>/media/DEVICE_LABEL</strong></em><br />
For example:</p>
<pre class="brush: bash; gutter: true; first-line: 1">media_dir=V,/media/zincobi/Videos</pre>
<p style="padding-left: 30px;">Here are some additional options you could set:</p>
<pre class="brush: bash; gutter: true; first-line: 1">friendly_name=POGOPLUG DLNA Server
db_dir=/var/cache/minidlna
log_dir=/var/log
presentation_url=http://YOUR_DEVICE_IP_HERE:8200/</pre>
<p style="padding-left: 30px;">MiniDLNA will update the DB automatically.<br />
If you have a lot of files (&gt;8192) you should increase your max inotify value for a single user so MiniDLNA can watch all files.<br />
Create /etc/sysctl.d/90-inotify.conf and insert the following:</p>
<pre class="brush: bash; gutter: true; first-line: 1"># Increase inotify max watchs per user for local minidlna
fs.inotify.max_user_watches = 100000</pre>
<p style="padding-left: 30px;">MiniDLNA is able to use thumbnails or cover images.<br />
I&#8217;ve created a small bash script which will generate thumbnails for videos recursively.<br />
You need ffmpegthumbnailer to create these thumbnails.</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy ffmpegthumbnailer</pre>
<p style="padding-left: 30px;">Let&#8217;s create the script:</p>
<pre class="brush: bash; gutter: true; first-line: 1">nano /usr/local/bin/generateThumbs.sh</pre>
<p style="padding-left: 30px;">This script will generate a thumbnails for every video file recursively.<br />
You can add even more extensions to the TYPES array.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title="">#!/bin/bash

DIR=$1

if [ -z &quot;$DIR&quot; ]; then
	printf &quot;%sn&quot; &quot;This script will generate thumbnails for all video files inside the given directory&quot;
	printf &quot;%sn&quot; &quot;moviexy.avi --&gt; moviexy.jpg&quot;
	printf &quot;%sn&quot; &quot;ffmpegthumbnailer is required&quot;
	printf &quot;%sn&quot; &quot;Usage: generateThumbs &quot;
	exit 1
fi

TYPES=( mov mp4 avi mkv m4v xvid divx wmv mpg mpeg )

# Create a regex of the extensions for the find command
TYPES_RE=&quot;\(&quot;${TYPES[1]}
for t in &quot;${TYPES[@]:1:${#TYPES[*]}}&quot;; do
    TYPES_RE=&quot;${TYPES_RE}\|${t}&quot;
done
TYPES_RE=&quot;${TYPES_RE}\)&quot;

find &quot;$DIR&quot; -regex &quot;.*.${TYPES_RE}&quot; -type f | while read -r FILEPATH
do
	printf &quot;%sn&quot; &quot;--- Start Thumbnailcreation for ---&quot;
	printf &quot;%sn&quot; &quot;$FILEPATH&quot;
	THUMBFILE=&quot;${FILEPATH%.*}.jpg&quot; # remove video ext. and add .jpg
	if [ -f &quot;$THUMBFILE&quot; ]; then
		printf &quot;e[1;33m%se[0mn&quot; &quot;Thumbnail exists&quot;
	else
		printf &quot;e[1;32m%se[0mn&quot; &quot;Generating thumbnail...&quot;
		ffmpegthumbnailer -i &quot;$FILEPATH&quot; -o &quot;$THUMBFILE&quot; -s 160 -q 10
	fi
	printf &quot;%sn&quot; &quot;--- End Thumbnailcreation ---&quot;
done
exit 0</pre>
<p style="padding-left: 30px;">See: <a href="https://github.com/Obihoernchen/generateThumbs">https://github.com/Obihoernchen/generateThumbs</a></p>
<p style="padding-left: 30px;">Make it executable:</p>
<pre class="brush: bash; gutter: true">chmod u+x /usr/local/bin/generateThumbs.sh</pre>
<p style="padding-left: 30px;">Execute it with something like:</p>
<pre class="brush: bash; gutter: true; first-line: 1">generateThumbs.sh /media/YOURDEVICELABEL/Videos</pre>
<p style="padding-left: 30px;">Now start MiniDLNA</p>
<pre class="brush: bash; gutter: true; first-line: 1">systemctl start minidlna</pre>
<h3>12. Configure static IP</h3>
<p style="padding-left: 30px;"><strong><span style="color: #ff0000;">Be careful you can mess up your whole network connection!</span></strong></p>
<p style="padding-left: 30px;">I don&#8217;t like dynamic IP addresses in my LAN. Especially for servers.<br />
They should have a static IP like every server. Of course there are hostnames but not all devices are able to resolve them.</p>
<p style="padding-left: 30px;">Arch uses <a title="netcfg" href="https://wiki.archlinux.org/index.php/Netcfg" target="_blank" rel="noopener">netcfg </a>to configure your network adapters. You can create multiple profile.<br />
To create a new static ip profile create a new profile in <em><strong>/etc/network.d/</strong></em> named <em><strong>wired-static-eth0</strong></em></p>
<pre class="brush: bash; gutter: true; first-line: 1">nano /etc/network.d/wired-static-eth0</pre>
<p style="padding-left: 30px;">And add the following content, replace everything with your values and save the file.<br />
<em>Note: I use custom DNS settings because my router doesn&#8217;t allow me to edit DNS settings.</em></p>
<pre class="brush: bash; gutter: true; first-line: 1">CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'

#IP of your pogoplug
ADDR='192.168.0.2'

#ROUTES=('192.168.0.0/24 via 192.168.1.2')

#Gateway (For example your router)
GATEWAY='192.168.0.1'

#DNS set to ('Gateway IP') if you want to use the DNS your router provides
DNS=('8.8.8.8' '8.8.4.4')

## For IPv6 autoconfiguration
#IP6=stateless
## For IPv6 static address configuration
#IP6='static'
#ADDR6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#ROUTES6=('abcd::1234')
#GATEWAY6='1234:0:123::abcd'</pre>
<p style="padding-left: 30px;">Now you need to change the default network profile to the new one.</p>
<pre class="brush: bash; gutter: true; first-line: 1">nano /etc/conf.d/netcfg</pre>
<p style="padding-left: 30px;">Find <em><strong>NETWORKS=</strong></em> and edit it:</p>
<pre class="brush: bash; gutter: true; first-line: 1">NETWORKS=(wired-static-eth0)</pre>
<p style="padding-left: 30px;">You have to be sure that everything is correct otherwise you are going to loose network connection and have to edit all files from your USB stick with another PC.<br />
Just restart the netcfg service or restart to apply the new settings</p>
<pre class="brush: bash; gutter: true; first-line: 1">systemctl restart netcfg</pre>
<h3> <span style="letter-spacing: -0.02em;">13. Enable color in Bash prompt</span></h3>
<p style="padding-left: 30px;">The current terminal doesn&#8217;t look that nice. Everything is white and boring&#8230;<br />
But we can change this so your terminal will look like this:</p>
<p style="padding-left: 30px;"><a href="http://obihoernchen.net/wordpress/wp-content/uploads/2013/01/Unbenannt.png" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption=""><img decoding="async" class="size-full wp-image-806  alignnone" title="" src="http://obihoernchen.net/wordpress/wp-content/uploads/2013/01/Unbenannt.png" alt="Terminal with color" width="677" height="354" srcset="https://obihoernchen.net/wordpress/wp-content/uploads/2013/01/Unbenannt.png 677w, https://obihoernchen.net/wordpress/wp-content/uploads/2013/01/Unbenannt-300x156.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a></p>
<p style="padding-left: 30px;">Just replace <em><strong>/etc/bash.bashrc</strong></em> with the following content:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sh" data-enlighter-title=""># /etc/bash.bashrc
#
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can&#039;t tolerate any output. So make sure this doesn&#039;t display
# anything or bad things will happen !

# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it&#039;s important to refrain from
# outputting anything in those cases.

# If not running interactively, don&#039;t do anything!
[[ $- != *i* ]] &amp;&amp; return

# Bash won&#039;t get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control.
#  (E11)
shopt -s checkwinsize

# Enable history appending instead of overwriting.
shopt -s histappend

case ${TERM} in
        xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
                PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }&#039;printf &quot;\033]0;%s@%s:%s\007&quot; &quot;${USER}&quot; &quot;${HOSTNAME%%.*}&quot; &quot;${PWD/#$HOME/~}&quot;&#039;
                ;;
        screen)
                PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }&#039;printf &quot;\033_%s@%s:%s\033\\&quot; &quot;${USER}&quot; &quot;${HOSTNAME%%.*}&quot; &quot;${PWD/#$HOME/~}&quot;&#039;
                ;;
esac

# fortune is a simple program that displays a pseudorandom message
# from a database of quotations at logon and/or logout.
# Type: &quot;pacman -S fortune-mod&quot; to install it, then uncomment the
# following line:

# [[ &quot;$PS1&quot; ]] &amp;&amp; /usr/bin/fortune

# Welcome Message
# Arch Linux Logo Welcome Message
c1=&quot;$(tput sgr0)$(tput setaf 4)&quot;
c2=&quot;$(tput bold)$(tput setaf 4)&quot;
c3=&quot;$(tput bold)$(tput setaf 0)&quot;
echo
echo &quot;        $c2,$c1                       _     _ _&quot;
echo &quot;       $c2/$c1#$c2\\$c1        __ _ _ __ ___| |__ | (_)_ __  _   ___  __&quot;
echo &quot;      $c2/$c1###$c2\\$c1      / _\` | &#039;__/ __| &#039;_ \\| | | &#039;_ \\| | | \\ \\/ /&quot;
echo &quot;     $c2/$c1#####$c2\\$c1    | (_| | | | (__| | | | | | | | | |_| |&gt;  &lt;&quot;
echo &quot;    $c2/$c1##,-,##$c2\\$c1    \\__,_|_|  \\___|_| |_|_|_|_| |_|\\__,_/_/\\_\\&quot;
echo &quot;   $c2/$c1##(   )##$c2\\$c1&quot;
echo &quot;  $c2/$c1#.--   --.#$c2\\  $c3 A simple, elegant GNU/Linux distribution.&quot;
echo &quot; $c2/$c1\`           \`$c2\\$(tput sgr0)&quot;$&#039;\n&#039;

# Show date
DATE=&quot;$(tput setaf 1)[$(tput setaf 6)$(date)&quot;
DATE=&quot;${DATE}$(tput setaf 1)]&quot;
echo $DATE
# Show kernel info
KERNEL=&quot;$(tput setaf 1)[$(tput setaf 6)$(uname -srmn)&quot;
KERNEL=&quot;${KERNEL}$(tput setaf 1)]&quot;
echo &quot;$KERNEL&quot;$&#039;\n&#039;
# Reset colors
tput sgr0

# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
# first to take advantage of user additions. Use internal bash
# globbing instead of external grep binary.

# sanitize TERM:
safe_term=${TERM//[^[:alnum:]]/?}
match_lhs=&quot;&quot;

[[ -f ~/.dir_colors ]] &amp;&amp; match_lhs=&quot;${match_lhs}$(&lt;~/.dir_colors)&quot;
[[ -f /etc/DIR_COLORS ]] &amp;&amp; match_lhs=&quot;${match_lhs}$(&lt;/etc/DIR_COLORS)&quot;
[[ -z ${match_lhs} ]] \
        &amp;&amp; type -P dircolors &gt;/dev/null \
        &amp;&amp; match_lhs=$(dircolors --print-database)

if [[ $&#039;\n&#039;${match_lhs} == *$&#039;\n&#039;&quot;TERM &quot;${safe_term}* ]] ; then

        # we have colors &lt;img src=&quot;http://obihoernchen.net/wordpress/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:-)&quot; class=&quot;wp-smiley&quot;&gt;

        # Enable colors for ls, etc. Prefer ~/.dir_colors
        if type -P dircolors &gt;/dev/null ; then
                if [[ -f ~/.dir_colors ]] ; then
                        eval $(dircolors -b ~/.dir_colors)
                elif [[ -f /etc/DIR_COLORS ]] ; then
                        eval $(dircolors -b /etc/DIR_COLORS)
                fi
        fi

        # -- CUSTOM PS1 String START --

        PS1=&quot;\$? \$(if [[ \$? == 0 ]]; then echo \&quot;\[\033[01;32m\]\342\234\223\&quot;; else echo \&quot;\[\033[01;31m\]\342\234\227\&quot;; fi) $(if [[ ${EUID} == 0 ]]; then echo &#039;\[\033[01;31m\]\h&#039;; else echo &#039;\[\033[01;32m\]\u@\h&#039;; fi)\[\033[01;34m\] \w \$\[\033[00m\] &quot;
        #PS1=&quot;\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] &amp;&amp; echo \&quot;[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\&quot;)[$(if [[ ${EUID} == 0 ]]; then echo &#039;\[\033[0;31m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h&#039;; else echo &#039;\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h&#039;; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\076 \[\033[0m\]&quot;
        # --- Custom PS1 String END ---

        # Use this other PS1 string if you want \W for root and \w for all other users:
        # PS1=&quot;$(if [[ ${EUID} == 0 ]]; then echo &#039;\[\033[01;31m\]\h\[\033[01;34m\] \W&#039;; else echo &#039;\[\033[01;32m\]\u@\h\[\033[01;34m\] \w&#039;; fi) \$([[ \$? != 0 ]] &amp;&amp; echo \&quot;\[\033[01;31m\]:(\[\033[01;34m\] \&quot;)\$\[\033[00m\] &quot;

        alias ls=&quot;ls --color=auto&quot;
        alias dir=&quot;dir --color=auto&quot;
        alias grep=&quot;grep --colour=auto&quot;
        alias dmesg=&#039;dmesg --color&#039;
        man() {
            env LESS_TERMCAP_mb=$&#039;\E[01;31m&#039; \
            LESS_TERMCAP_md=$&#039;\E[01;38;5;74m&#039; \
            LESS_TERMCAP_me=$&#039;\E[0m&#039; \
            LESS_TERMCAP_se=$&#039;\E[0m&#039; \
            LESS_TERMCAP_so=$&#039;\E[38;5;246m&#039; \
            LESS_TERMCAP_ue=$&#039;\E[0m&#039; \
            LESS_TERMCAP_us=$&#039;\E[04;38;5;146m&#039; \
            man &quot;$@&quot;
        }

        # Uncomment the &quot;Color&quot; line in /etc/pacman.conf instead of uncommenting the following line...!

        # alias pacman=&quot;pacman --color=auto&quot;
else

        # show root@ when we do not have colors

        PS1=&quot;\u@\h \w \$([[ \$? != 0 ]] &amp;&amp; echo \&quot;:( \&quot;)\$ &quot;

        # Use this other PS1 string if you want \W for root and \w for all other users:
        # PS1=&quot;\u@\h $(if [[ ${EUID} == 0 ]]; then echo &#039;\W&#039;; else echo &#039;\w&#039;; fi) \$([[ \$? != 0 ]] &amp;&amp; echo \&quot;:( \&quot;)\$ &quot;

fi

PS2=&quot;&gt; &quot;
PS3=&quot;&gt; &quot;
PS4=&quot;+ &quot;

# Try to keep environment pollution down, EPA loves us.
unset safe_term match_lhs

# Try to enable the auto-completion (type: &quot;pacman -S bash-completion&quot; to install it).
[ -r /usr/share/bash-completion/bash_completion ] &amp;&amp; . /usr/share/bash-completion/bash_completion

# Try to enable the &quot;Command not found&quot; hook (&quot;pacman -S pkgfile&quot; to install it).
# See also: https://wiki.archlinux.org/index.php/Bash#The_.22command_not_found.22_hook
[ -r /usr/share/doc/pkgfile/command-not-found.bash ] &amp;&amp; . /usr/share/doc/pkgfile/command-not-found.bash</pre>
<p style="padding-left: 30px;"><strong>More information and other examples:</strong> <a title="https://wiki.archlinux.org/index.php/Color_Bash_Prompt" href="https://wiki.archlinux.org/index.php/Color_Bash_Prompt" target="_blank" rel="noopener">https://wiki.archlinux.org/index.php/Color_Bash_Prompt</a></p>
<p style="padding-left: 30px;">To search for available packages in repos if your command doesn&#8217;t exist on your current system configuration install pkgfile</p>
<pre class="brush: bash; gutter: true; first-line: 1">pacman -Sy pkgfile
pkgfile --update</pre>
<h3>14. Disable some logging to extend USB stick lifetime</h3>
<p style="padding-left: 30px;">Flash drives have limited number of write cycles and default linux logging will write pretty much so your USB will be destroyed pretty fast.<br />
That&#8217;s why a swap file on your USB stick is a really bad idea!<br />
But you can disable some logging to extend the liefetime of your USB stick.</p>
<p style="padding-left: 30px;">Just edit <em><strong>syslog-ng.conf</strong></em> and disable some of the &#8220;<strong><em>log { source(src); filter&#8230;</em></strong>&#8221; lines at the end of the file.<br />
You can comment out (add a &#8220;<strong>#</strong>&#8221; in front of the line) all lines if you want to disable everything.</p>
<pre class="brush: bash; gutter: true">  nano /etc/syslog-ng/syslog-ng.conf</pre>
<p style="padding-left: 30px;">I&#8217;ve disabled some of them. That&#8217;s my example:</p>
<pre class="brush: bash; gutter: true"># Disable some logging
#log { source(src); filter(f_acpid); destination(d_acpid); };
log { source(src); filter(f_authpriv); destination(d_authlog); };
#log { source(src); filter(f_syslog); destination(d_syslog); };
#log { source(src); filter(f_cron); destination(d_cron); };
#log { source(src); filter(f_daemon); destination(d_daemon); };
#log { source(src); filter(f_kernel); destination(d_kernel); };
#log { source(src); filter(f_lpr); destination(d_lpr); };
#log { source(src); filter(f_mail); destination(d_mail); };
#log { source(src); filter(f_news); destination(d_news); };
#log { source(src); filter(f_ppp); destination(d_ppp); };
log { source(src); filter(f_user); destination(d_user); };
#log { source(src); filter(f_uucp); destination(d_uucp); };
#log { source(src); filter(f_debug); destination(d_debug); };
#log { source(src); filter(f_messages); destination(d_messages); };
log { source(src); filter(f_err); destination(d_errors); };
log { source(src); filter(f_emergency); destination(d_console); };
#log { source(src); filter(f_everything); destination(d_everything); };
#log { source(src); filter(f_iptables); destination(d_iptables); };</pre>
<p style="padding-left: 30px;">On top of that you could disable logging of some servers like samba, minidlna and so on.<br />
I don&#8217;t do that because I want to have these logs but to do so set the log path in the config files to <em><strong>/dev/null</strong></em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://obihoernchen.net/770/plug_computer_arch_linux/feed/</wfw:commentRss>
			<slash:comments>185</slash:comments>
		
		
			</item>
	</channel>
</rss>
