<?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>Libre Things &#187; Linux</title>
	<atom:link href="http://positon.org/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://positon.org</link>
	<description></description>
	<lastBuildDate>Tue, 23 Feb 2016 20:01:11 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.7.1</generator>
	<item>
		<title>Lenovo Thinkpad BIOS Update with Linux and USB</title>
		<link>http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb</link>
		<comments>http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb#comments</comments>
		<pubDate>Thu, 29 May 2014 16:59:54 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[BIOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Thinkpad]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://positon.org/?p=190</guid>
		<description><![CDATA[Here are the steps I used to upgrade the BIOS of my Lenovo Thinkpad X1 Carbon Gen 2. You have to download the bootable ISO file from Lenovo support site, convert it and copy it to a usb flash drive. You will need a USB key you can erase. First Get the bootable ISO file [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Here are the steps I used to upgrade the BIOS of my Lenovo Thinkpad X1 Carbon Gen 2.<br />
You have to download the bootable ISO file from Lenovo support site, convert it and copy it to a usb flash drive.</p>
<p>You will need a USB key you can erase.</p>
<p>First Get the bootable ISO file from Lenovo support website. To get your product number:</p>
<pre>
sudo dmidecode -t system | grep Product
</pre>
<p>To check your BIOS version: <code>sudo dmidecode -t bios</code></p>
<p>Get the <strong>geteltorito</strong> program from your packages or download it:</p>
<pre>
cd /tmp/
wget http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/geteltorito
chmod +x geteltorito
</pre>
<p>Extract the img from the ISO:</p>
<pre>
./geteltorito -o bios.img gruj09us.iso
</pre>
<p>Copy the img to the USB key (<strong>make sure sdb is you USB key!!</strong>):</p>
<pre>
sudo fdisk -l /dev/sdb #at least check that device size is right
sudo dd if=bios.img of=/dev/sdb
</pre>
<p>That&#8217;s it. Boot on USB stick and follow the instructions to update your BIOS.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Clone a Linux system install to another computer</title>
		<link>http://positon.org/clone-a-linux-system-install-to-another-computer</link>
		<comments>http://positon.org/clone-a-linux-system-install-to-another-computer#comments</comments>
		<pubDate>Sun, 06 Apr 2014 15:54:06 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gparted]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://positon.org/?p=159</guid>
		<description><![CDATA[After searching a bit I could not find a simple and good howto to do that. The following method should work for any Linux distribution (Ubuntu, Debian, Manjaro, Archlinux, Fedora&#8230;). Source and target systems must be on the same processor architecture (though transfer from 32bit to 64bit should work). What you need: 2 live USB [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>After searching a bit I could not find a simple and good howto to do that.<br />
The following method should work for any Linux distribution (Ubuntu, Debian, Manjaro, Archlinux, Fedora&#8230;). Source and target systems must be on the same processor architecture (though transfer from 32bit to 64bit should work).</p>
<p>What you need:</p>
<ul>
<li>2 live USB keys (or cds)</li>
<li>To speed up data transfer: good quality ethernet cables (one cable between the 2 computers is OK), or a usb key/drive with a BIG ext4 partition. You can try over wifi, but it may be slow.</li>
</ul>
<h3>1. Boot source and target machines on live USB/CD</h3>
<p>Any live USB/CD should be OK.<br />
On the target computer, you will need a tool to partition your hard drive, like <a href="http://gparted.org/" title="gparted">gparted</a>.<br />
<a href="http://rsync.samba.org/" title="rsync">rsync</a> is also required for data transfer: it&#8217;s included in many live systems.</p>
<p><a href="http://www.ubuntu.com/" title="Ubuntu">Ubuntu</a> live cd is OK, <a href="http://manjaro.org/" title="Manjaro">Manjaro</a> live cd too.</p>
<h3>2. Partition your target hard drive</h3>
<p>Use a tool like <a href="http://gparted.org/" title="gparted">gparted</a> to partition the target hard drive, with the same partitions as your source system (slash, swap, home&#8230;).<br />
I recommend you to assign LABELs to your partitions: for the fstab, it&#8217;s easier than UUIDs.</p>
<h3>3. Mount all partitions on both machines</h3>
<p>On both systems, open a root terminal. Then, for each data partition (you can ignore swap):</p>
<pre>
mkdir /mnt/slash
mount /dev/sdaX /mnt/slash
</pre>
<p>If you have a home partition:</p>
<pre>
mkdir /mnt/home
mount /dev/sdaY /mnt/home
</pre>
<h3>4. Transfer the data (network or usb)</h3>
<p>This part may be tricky. Choose the method you prefer.</p>
<h4>Network</h4>
<ol>
<li><strong>Setup the network.</strong> Test the connectivity with ping command.<br />
The easier is to plug the PCs on a DHCP network (like your ISP box) so that you get automatic IP addresses. If you linked the 2 pcs with a single cable, you&#8217;ll have to setup the IPs with NetworkManager (static ips, or adhoc network).</li>
<li>On source system, as root, create a simple <code>/etc/rsyncd.conf</code> file:
<pre>
uid = root
gid = root
use chroot = no

[all]
    path = /
</pre>
</li>
<li>Then start the rsync daemon server: <code>rsync --daemon</code></li>
<li>On target PC, for each partition:
<pre>
rsync -avHX SOURCE_IP::all/mnt/slash/ /mnt/slash/
</pre>
<p>Don&#8217;t forget &#8216;/&#8217; at the end of paths. <code>-a</code> will preserve many file attributes like owner and permissions, <code>-H</code> will preserve hardlinks if any, <code>-X</code> will preserve extended attributes like setuid. You may also add <code>-A</code> if you are using acls. What is good with rsync is that you can stop and restart the transfer whenever you want.
</li>
</ol>
<h4>USB</h4>
<p>Prepare a USB drive with a BIG ext4 partition.</p>
<ol>
<li>Mount the USB partition on source system (<code>mount /dev/sdbX /mnt/usb</code>)</li>
<li>For each partition:
<pre>
rsync -avHX /mnt/slash/ /mnt/usb/slash/
</pre>
</li>
<li>umount, unplug and remount the USB disk on the target system.</li>
<li>For each partition:
<pre>
rsync -avHX /mnt/usb/slash/ /mnt/slash/
</pre>
</li>
</ol>
<h3>5. Change fstab on target system</h3>
<p>As root, edit <code>/mnt/slash/etc/fstab</code><br />
For each partition (including swap), replace the first field with the new UUID or LABEL (it&#8217;s straightforward with LABELs):<br />
<code>UUID=the-long-uuid</code>, or <code>LABEL=yourlabel</code></p>
<p>2 ways to get the UUIDs / LABELs:</p>
<pre>
ls -l /dev/disk/by-uuid/
blkid /dev/sdaX
</pre>
<h3>6. Reinstall Grub</h3>
<p>We will use a <strong>chroot</strong> (changed root environment) to be able to call the <a href="http://www.gnu.org/software/grub/" title="Grub">grub</a> install inside the migrated system.</p>
<p>First, bind mount some system directories needed by grub, then chroot:</p>
<pre>
mount --bind /proc /mnt/slash/proc
mount --bind /sys /mnt/slash/sys
mount --bind /dev /mnt/slash/dev
mount --bind /run /mnt/slash/run
chroot /mnt/slash
</pre>
<p>Then install grub in the <a href="http://en.wikipedia.org/wiki/Master_boot_record" title="master boot record">Master Boot Record</a> of your hard drive, and update grub config file (with the new uuids&#8230;):</p>
<pre>
grub-install /dev/sda
update-grub
</pre>
<h3>7. Reboot target machine</h3>
<p>That&#8217;s it! Your system should be working on the new computer now.<br />
Feel free to comment if you encounter problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/clone-a-linux-system-install-to-another-computer/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Listen to mouse events in Linux (text mode)</title>
		<link>http://positon.org/listen-to-mouse-events-in-linux-text-mode</link>
		<comments>http://positon.org/listen-to-mouse-events-in-linux-text-mode#comments</comments>
		<pubDate>Sat, 08 Sep 2012 22:59:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MPD]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=119</guid>
		<description><![CDATA[A small script to listen to mouse events with the mev command using gpm (General Purpose Mouse). Can be used for example on the Raspberry Pi to run mpd commands, to use a mouse as a remote control. I didn&#8217;t find how to isolate the wheel events in order to control the volume. Any idea [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>A small script to listen to mouse events with the <code>mev</code> command using <code>gpm</code> (General Purpose Mouse).</p>
<p>Can be used for example on the Raspberry Pi to run mpd commands, to use a mouse as a remote control.</p>
<p>I didn&#8217;t find how to isolate the wheel events in order to control the volume. Any idea somebody?</p>
<p>In Archlinux, you can add the following command in <code>/etc/rc.local</code> to start it at boot time:</p>
<pre>
nohup /usr/local/bin/mpd_mouse.sh &gt; /tmp/mpd_mouse.log 2&gt;&amp;1 &amp;
</pre>
<pre>
#!/bin/sh
# This script listen to mouse events with the mev command using gpm.
# Can be used for example on the Raspberry Pi to run mpd commands, to use a mouse as a remote control.
# You can start it as a daemon with:
# nohup /usr/local/bin/mpd_mouse.sh &gt; /tmp/mpd_mouse.log 2&gt;&amp;1 &amp;

# start gpm if not already started
gpm -m /dev/input/mice -t imps2

# unset TERM variable, otherwise mev refuses to start when detecting xterm
unset TERM

echo &quot;Listening to mouse events...&quot;

# we use script to fake a tty for mev, otherwise it exits (note: mev logs errors in syslog)
script -qc &quot;mev -E&quot; /dev/null &lt;/dev/null | grep --line-buffered -v &quot;mouse-movement&quot; | while read LINE
do
        echo
        echo &quot;$LINE&quot;

        EVENT=$(echo &quot;$LINE&quot; | cut -d' ' -f1 | cut -d'(' -f2)

        if [ &quot;$EVENT&quot; = &quot;down-mouse-1&quot; ]
        then
                echo mpc stop
                mpc stop
        elif [ &quot;$EVENT&quot; = &quot;down-mouse-2&quot; ]
        then
                echo mpc toggle
                mpc toggle
        elif [ &quot;$EVENT&quot; = &quot;down-mouse-3&quot; ]
        then
                echo mpc next
                mpc next
        else
                echo &quot;nothing&quot;
        fi

done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/listen-to-mouse-events-in-linux-text-mode/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A solution to the umask problem: inotify to force permissions</title>
		<link>http://positon.org/a-solution-to-the-umask-problem-inotify-to-force-permissions</link>
		<comments>http://positon.org/a-solution-to-the-umask-problem-inotify-to-force-permissions#comments</comments>
		<pubDate>Thu, 21 Oct 2010 23:29:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[inotify]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[umask]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=102</guid>
		<description><![CDATA[Finding a good solution for sharing files between Linux users is a nightmare. If using a unique UID is not a problem, it&#8217;s the most simple solution. All clients access files with the same UID. This way you cannot know who does what, and users cannot fine tune access rights. The problem: default umask is [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Finding a good solution for sharing files between Linux users is a nightmare.</p>
<p>If using a unique UID is not a problem, it&#8217;s the most simple solution. All clients access files with the same UID. This way you cannot know who does what, and users cannot fine tune access rights.</p>
<p>The problem: default <a href="http://en.wikipedia.org/wiki/Umask">umask</a> is ALWAYS 0022, so that any created file will get <code>rw– r–– r––</code> permissions. Only the owner can write. Nobody else. To share files, a group must have write access.</p>
<p>You can change the umask. For command line, you set it in <code>.bashrc</code> or <code>.profile</code>, or <code>/etc/profile</code> for all users. For a <a href="http://en.wikipedia.org/wiki/SSH_file_transfer_protocol">SFTP</a> share, you can <a href="http://jeff.robbins.ws/articles/setting-the-umask-for-sftp-transactions">set it with a trick</a>. For Apache HTTP server, you can set it with <code>/etc/apache2/envvars</code> under Debian.</p>
<p>If file sharing is only done via on service, changing umask is simple, otherwise it&#8217;s not that easy. And even if you change umask for all services, nothing is perfect: for example it doesn&#8217;t work with <a href="http://live.gnome.org/Nautilus">Nautilus</a> and SFTP. Some clients drop files and issue a chmod right after: the hell. You can also try the power of <a href="http://www.suse.de/~agruen/acl/linux-acls/online/">POSIX ACL</a> to force permissions. But problems still remain with some clients.</p>
<p>And for the umask, maybe you don&#8217;t want all files to be dropped group writable. Maybe you want more granularity on permissions.</p>
<p>So I abandonned the idea of fixing the problem at the source in favor of some trick AFTER file creation.<br />
The most simple solution is the cron task: every X minutes, run <code>chmod -R g+w</code> on the directory. This way permissions are not fixed immediately, but asynchronously. And it adds a (very) little more load to your system.</p>
<p>My solution uses <a href="http://en.wikipedia.org/wiki/Inotify">inotify</a> to listen for file changes and force permissions when files are created:</p>
<pre>
aptitude install inotify-tools
</pre>
<p><strong>And the magical command:</strong></p>
<pre>
inotifywait -mrq -e CREATE --format %w%f /tmp/mytest/ | while read FILE; do chmod g=u &quot;$FILE&quot;; done
</pre>
<p><strong>UPDATE 2010-10-30</strong><br />
To support spaces at the end of filenames, and backslashes, use:</p>
<pre>
inotifywait -mrq -e CREATE --format %w%f /tmp/mytest/ | while IFS= read -r FILE; do chmod g=u &quot;$FILE&quot;; done
</pre>
<p>Thanks to vitoreiji (see comments)</p>
<p><code>inotifywait</code> listens for events in the <code>/tmp/mytest</code> directory. When a file is created, it&#8217;s displayed on standard output. Then each fileline is read by the <code>while</code> loop and permissions are changed. <code>g=u</code> gives the group the user&#8217;s permissions (with <code>g+w</code>, if the user drops a file with <code>rw– ––– –––</code>, permissions will be <code>rw– –w– –––</code>).</p>
<p>You can now test file/directory creation and copy. <code>mkdir -p a/b/c/d/e</code> shoud also work.</p>
<p>Finally, add it in a boot script:</p>
<pre>
vi /usr/local/bin/inotifywait.sh &amp;&amp; chmod +x /usr/local/bin/inotifywait.sh
#!/bin/sh
# Take the directory name as argument

inotifywait -mrq -e CREATE --format %w%f &quot;$1&quot; | while read FILE
do
	chmod g=u &quot;$FILE&quot;
done
</pre>
<pre>
vi /etc/init.d/inotifywait.sh &amp;&amp; chmod +x /etc/init.d/inotifywait.sh
#! /bin/sh

case &quot;$1&quot; in
  start|&quot;&quot;)

	rm -f /tmp/inotifywait.log
	/usr/local/bin/inotifywait.sh /path/to/dir/ &gt;/tmp/inotifywait.log 2&gt;&amp;1 &amp;
	
	;;
  restart|reload|force-reload)
	echo &quot;Error: argument '$1' not supported&quot; &gt;&amp;2
	exit 3
	;;
  stop)
	# killall inotifywait ???
	;;
  *)
	echo &quot;Usage: inotifywait.sh [start|stop]&quot; &gt;&amp;2
	exit 3
	;;
esac

:
</pre>
<p>(Debian way)</p>
<pre>
update-rc.d inotifywait.sh defaults
</pre>
<p>Note: a drawback: there is a limit on the number of tracked files. See <code>-r</code> option in <code>man inotifywait</code>.</p>
<p>Then the final touch in order for the new files to be created with the same group as their parent: <a href="http://en.wikipedia.org/wiki/Setuid">setgid bit</a> for all directories.</p>
<pre>
find /path/to/dir -type d -exec chmod g+s {} \;
</pre>
<p><ins>Links</ins>:</p>
<ul>
<li><code>man inotifywait</code></li>
<li><a href="http://github.com/rvoicilas/inotify-tools/wiki">inotify-tools</a></li>
<li><a href="http://en.wikipedia.org/wiki/Inotify" title="http://en.wikipedia.org/wiki/Inotify">http://en.wikipedia.org/wiki/Inotify</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/a-solution-to-the-umask-problem-inotify-to-force-permissions/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>3D performance problems with KMS</title>
		<link>http://positon.org/3d-performance-problems-with-kms</link>
		<comments>http://positon.org/3d-performance-problems-with-kms#comments</comments>
		<pubDate>Thu, 03 Jun 2010 12:48:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[jeux]]></category>
		<category><![CDATA[KMS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=94</guid>
		<description><![CDATA[With the last Ubuntu Lucid 10.04 come a new graphical module: KMS or Kernel-based Mode-Setting. If you have performance problems in some games like Quake 3 or TCE / Enemy Territory, try to disable KMS. The problem can also be with the mouse pointer (slowness, lag, delay or inacuracy). Grub 2 Add nomodeset in /etc/default/grub [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>With the last Ubuntu Lucid 10.04 come a new graphical module: <a href="http://en.wikipedia.org/wiki/Mode-setting">KMS or Kernel-based Mode-Setting</a>.</p>
<p>If you have performance problems in some games like Quake 3 or TCE / Enemy Territory, try to disable KMS.<br />
The problem can also be with the mouse pointer (slowness, lag, delay or inacuracy).</p>
<h2>Grub 2</h2>
<p>Add <code>nomodeset</code> in <code>/etc/default/grub</code> then issue the command <code>update-grub</code>.</p>
<pre>
vi /etc/default/grub
GRUB_CMDLINE_LINUX=&quot;nomodeset&quot;
update-grub
</pre>
<h2>Grub 1</h2>
<p>Add <code>nomodeset</code> at the end of the <code># kopt</code> line, then issue command <code>update-grub</code>.</p>
<pre>
vi /boot/grub/menu.lst
# kopt=root=/dev/sda1 ro nomodeset
update-grub
</pre>
<p>Someone also told me that disabling KMS solved his Firefox javascript speed problem in Yahoo Mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/3d-performance-problems-with-kms/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
		<item>
		<title>For a quiet Thinkpad</title>
		<link>http://positon.org/for-a-quiet-thinkpad</link>
		<comments>http://positon.org/for-a-quiet-thinkpad#comments</comments>
		<pubDate>Thu, 03 Dec 2009 21:42:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fan]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Thinkpad]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=70</guid>
		<description><![CDATA[Some Thinkpads, like the T43, have several heat and fan problems. On a default Linux installation, my T43 processor is at about 46°C, and the GPU at about 49°C, for an external temperature of 19°C. The BIOS fan management algorithm is very bad. After a cold boot, the fan starts running non stop after a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Some Thinkpads, like the T43, have several heat and fan problems.</p>
<p>On a default Linux installation, my T43 processor is at about 46°C, and the GPU at about 49°C, for an external temperature of 19°C.</p>
<p>The BIOS fan management algorithm is very bad. After a cold boot, the fan starts running non stop after a few minutes of use.</p>
<p>Fortunately, it is possible to use programs to take control of the fan in place of the BIOS.</p>
<p>To start, the thinkpad_acpi module must allows us to change the fan speed:</p>
<pre>
# vi /etc/modprobe.d/thinkpad.conf
options thinkpad_acpi fan_control=1 experimental=1
</pre>
<p>Your choice to reload the module or reboot your system.</p>
<pre>
# rmmod thinkpad_acpi
# modprobe thinkpad_acpi
</pre>
<p>Now you can take control of your fan:</p>
<pre>
# cat /proc/acpi/ibm/fan
# echo level 0 &gt; /proc/acpi/ibm/fan
# echo level 7 &gt; /proc/acpi/ibm/fan # full speed !!
# echo level auto &gt; /proc/acpi/ibm/fan # back to normal, BIOS management
</pre>
<p>Now go <a href="http://www.thinkwiki.org/wiki/ACPI_fan_control_script#Comprehensive_bash_script_with_fine_control_over_fan_speed">here</a> and copy the content of the script in <code>/usr/local/bin/tp-fancontrol</code>.</p>
<pre>
# mv index.php /usr/local/bin/tp-fancontrol
# chmod a+x /usr/local/bin/tp-fancontrol
</pre>
<p>Then, test the script:</p>
<pre>
# tp-fancontrol
# tp-fancontrol -s 5 # for a fan that starts later
</pre>
<p>In order to start the script at boot, we also fetch the <code>tp-fancontrol.init.debian</code> script on the same page. We add it at the system boot.</p>
<pre>
# mv index.php /etc/init.d/tp-fancontrol
# chmod a+x /etc/init.d/tp-fancontrol
# vi /etc/init.d/tp-fancontrol
DAEMON=/usr/sbin/fancontrol
# /etc/init.d/tp-fancontrol start
# /etc/init.d/tp-fancontrol stop
# update-rc.d tp-fancontrol defaults # note: only adding &quot;start&quot; scripts is also possible
</pre>
<p>The final touch is to edit the script to change the minimum fan triggering tresholds, so that the fan starts later when the system begins to heat:</p>
<pre>
# vi /usr/local/bin/tp-fancontrol
MIN_THRESH_SHIFT=5
INTERVAL=10 # you can also increase the speed update interval
</pre>
<p>A 5 seconds increase allows the fan to become quiet again when the computer activity is low.</p>
<p><ins>References</ins>:</p>
<ul>
<li><a href="http://www.thinkwiki.org/wiki/How_to_control_fan_speed" title="http://www.thinkwiki.org/wiki/How_to_control_fan_speed">http://www.thinkwiki.org/wiki/How_to_control_fan_speed</a></li>
<li><a href="http://www.thinkwiki.org/wiki/ACPI_fan_control_script" title="http://www.thinkwiki.org/wiki/ACPI_fan_control_script">http://www.thinkwiki.org/wiki/ACPI_fan_control_script</a></li>
<li><a href="http://www.thinkwiki.org/wiki/Problem_with_fan_noise" title="http://www.thinkwiki.org/wiki/Problem_with_fan_noise">http://www.thinkwiki.org/wiki/Problem_with_fan_noise</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/for-a-quiet-thinkpad/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Screen] No more PTYs. Sorry, could not find a PTY.</title>
		<link>http://positon.org/screen-no-more-ptys-sorry-could-not-find-a-pty</link>
		<comments>http://positon.org/screen-no-more-ptys-sorry-could-not-find-a-pty#comments</comments>
		<pubDate>Wed, 18 Nov 2009 22:40:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[screen]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=68</guid>
		<description><![CDATA[If you get the following errors starting screen as a user: No more PTYs. Sorry, could not find a PTY. [screen is terminating] You have to change /dev/ptmx file permissions: # ls -l /dev/ptmx crw-r--r-- 1 root root 5, 2 nov 18 23:28 /dev/ptmx # chmod a+w /dev/ptmx # ls -l /dev/ptmx crw-rw-rw- 1 root [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you get the following errors starting <strong>screen</strong> as a user:</p>
<pre>
No more PTYs.
Sorry, could not find a PTY.
[screen is terminating]
</pre>
<p>You have to change <code>/dev/ptmx</code> file permissions:</p>
<pre>
# ls -l /dev/ptmx 
crw-r--r-- 1 root root 5, 2 nov 18 23:28 /dev/ptmx
# chmod a+w /dev/ptmx
# ls -l /dev/ptmx 
crw-rw-rw- 1 root root 5, 2 nov 18 23:34 /dev/ptmx
</pre>
<p>Under Ubuntu, there was no problem. Permissions already set:</p>
<pre>
$ ls -l /dev/ptmx 
crw-rw-rw- 1 root tty 5, 2 2009-11-18 23:37 /dev/ptmx
</pre>
<p><strong>References :</strong></p>
<ul>
<li><code>man ptmx</code></li>
<li><code>ubuntu$ ls -l /dev/ptmx</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/screen-no-more-ptys-sorry-could-not-find-a-pty/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cron mail subject format</title>
		<link>http://positon.org/cron-mail-subject-format</link>
		<comments>http://positon.org/cron-mail-subject-format#comments</comments>
		<pubDate>Wed, 21 Oct 2009 10:26:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=66</guid>
		<description><![CDATA[I looked for a way of changing mail format sent by the crontab. I hoped for a syntax like MAILTO= Answer: Impossible. With Debian default cron program, it&#8217;s hard coded in cron : In do_command.c source file: fprintf(mail, &#34;From: root (Cron Daemon)\n&#34;); fprintf(mail, &#34;To: %s\n&#34;, mailto); fprintf(mail, &#34;Subject: Cron &#60;%s@%s&#62; %s\n&#34;, usernm, first_word(hostname, &#34;.&#34;), e-&#62;cmd);]]></description>
				<content:encoded><![CDATA[<p>I looked for a way of changing mail format sent by the crontab.<br />
I hoped for a syntax like <code>MAILTO=</code></p>
<p>Answer: Impossible.</p>
<p>With Debian default cron program, it&#8217;s hard coded in cron :</p>
<p>In <code>do_command.c</code> source file:</p>
<pre>
fprintf(mail, &quot;From: root (Cron Daemon)\n&quot;);
fprintf(mail, &quot;To: %s\n&quot;, mailto);
fprintf(mail, &quot;Subject: Cron &lt;%s@%s&gt; %s\n&quot;,
  usernm, first_word(hostname, &quot;.&quot;),
  e-&gt;cmd);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/cron-mail-subject-format/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>(Français) Casser un RAID/LVM logiciel</title>
		<link>http://positon.org/casser-un-raidlvm-logiciel</link>
		<comments>http://positon.org/casser-un-raidlvm-logiciel#comments</comments>
		<pubDate>Tue, 30 Dec 2008 16:47:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=41</guid>
		<description><![CDATA[Sorry, this entry is only available in Français.]]></description>
				<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://fr.positon.org/tag/linux/feed">Français</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/casser-un-raidlvm-logiciel/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Français) Bidouilles resolv.conf</title>
		<link>http://positon.org/bidouilles-resolvconf</link>
		<comments>http://positon.org/bidouilles-resolvconf#comments</comments>
		<pubDate>Sat, 22 Nov 2008 17:17:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=40</guid>
		<description><![CDATA[Sorry, this entry is only available in Français.]]></description>
				<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://fr.positon.org/tag/linux/feed">Français</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/bidouilles-resolvconf/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
