<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xml:lang="en" xml:base="http://dp.nonoo.hu/wp-atom.php">
	<title type="text">dreamport</title>
	<subtitle type="text">Nonoo's personal homepage</subtitle>

	<updated>2012-02-12T22:20:17Z</updated>

	<link rel="alternate" type="text/html" href="http://dp.nonoo.hu" />
	<id>http://dp.nonoo.hu/feed/atom/</id>
	

	<generator uri="http://wordpress.org/" version="3.3.1">WordPress</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/dreamportfeed" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="dreamportfeed" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>47.639948</geo:lat><geo:long>18.310089</geo:long><entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[Measuring temperature using OpenWRT]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/measuring-temperature-using-openwrt/" />
		<id>http://dp.nonoo.hu/?p=2038</id>
		<updated>2012-02-12T22:19:52Z</updated>
		<published>2012-02-12T18:22:44Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="openwrt" /><category scheme="http://dp.nonoo.hu" term="compile" /><category scheme="http://dp.nonoo.hu" term="cross" /><category scheme="http://dp.nonoo.hu" term="libusb" /><category scheme="http://dp.nonoo.hu" term="mips" /><category scheme="http://dp.nonoo.hu" term="pcsensor" /><category scheme="http://dp.nonoo.hu" term="temper" /><category scheme="http://dp.nonoo.hu" term="temperature" /><category scheme="http://dp.nonoo.hu" term="toolchain" /><category scheme="http://dp.nonoo.hu" term="usb" />		<summary type="html"><![CDATA[See my x86 solution for measuring temperature here! I&#8217;m using USB Temper devices again, but this time they are a newer revision, so the previous app with the source code I modified doesn&#8217;t work anymore. I downloaded this source code from here (look at the comments) and modified that so I can define from which [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/measuring-temperature-using-openwrt/"><![CDATA[<p><i>See my x86 solution for measuring temperature <a href="http://dp.nonoo.hu/measuring-temperature/">here</a>!</i></p>
<p>I&#8217;m using USB Temper devices again, but this time they are a newer revision, so the previous app with the source code I modified doesn&#8217;t work anymore. I downloaded <a href="http://momtchil.momtchev.com/files/pcsensor-1.0.0-multi.tgz">this</a> source code from <a href="http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/" target="_blank">here</a> (look at the comments) and modified that so I can define from which USB bus and dev I want the temperature readings from. I had to cross compile this for the router (TP-Link MR3220) running OpenWRT. You can download my modified pcsensor source from <a href="http://dp.nonoo.hu/uploads/2012/02/pcsensor-1.0.0-multi-nonoo.tar.bz2" target="_blank">here</a>.</p>
<p>First I needed the OpenWRT toolchain, which you can get by compiling the OpenWRT buildroot. <a href="http://wiki.openwrt.org/doc/howto/buildroot.exigence" target="_blank">Here&#8217;s</a> a good tutorial how you can compile buildroot. There are also some notes in the <a href="http://wiki.openwrt.org/doc/devel/crosscompile" target="_blank">OpenWRT wiki</a> about cross compilation.<br />
<span id="more-2038"></span><br />
For the pcsensor app to work, I needed libusb 0.1. I downloaded the source code of <a href="http://sourceforge.net/projects/libusb/files/libusb-0.1%20%28LEGACY%29/0.1.12/" target="_blank">v0.1.12</a>, extracted it and created a script called <b>doconfig</b> in the libusb source code directory:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #007800;">TOOLCHAIN_PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>nonoo<span style="color: #000000; font-weight: bold;">/</span>Work<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>staging_dir<span style="color: #000000; font-weight: bold;">/</span>toolchain-mips_r2_gcc-<span style="color: #000000;">4.5</span>-linaro_uClibc-0.9.32<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CC</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-gcc<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-ld<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NM</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-nm<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXX</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-c++<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AR</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-ar<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">OBJDUMP</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-objdump<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">RANLIB</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-ranlib<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STRINGS</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-strings<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STRIP</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-strip<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AS</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mips-openwrt-linux-as<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=-I<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>include<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=-L<span style="color: #007800;">$TOOLCHAIN_PATH</span><span style="color: #000000; font-weight: bold;">/</span>lib<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STAGING_DIR</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--host</span> mips-openwrt-linux <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>nonoo<span style="color: #000000; font-weight: bold;">/</span>Work<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>opt</div></td></tr></tbody></table></div>
<p>After running it, I created a <b>domake</b> file also:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #007800;">TOOLCHAIN_PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>nonoo<span style="color: #000000; font-weight: bold;">/</span>Work<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>staging_dir<span style="color: #000000; font-weight: bold;">/</span>toolchain-mips_r2_gcc-<span style="color: #000000;">4.5</span>-linaro_uClibc-0.9.32<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STAGING_DIR</span>=<span style="color: #007800;">$TOOLCHAIN_PATH</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">$*</span></div></td></tr></tbody></table></div>
<p>I ran <b>domake; domake install</b> and then I got the libusb libs under /home/nonoo/Work/openwrt/opt/lib. The STAGING_DIR variable you see above is needed for the toolchain compiler. I already added these cross compiling stuff to pcsensor&#8217;s Makefile. If you want to compile it on x86, just use my older Temper app&#8217;s Makefile.</p>
<p>libusb is needed on the router as well, so install it with <b>opkg install -d pendrive libusb</b> and run <b>ldconfig</b>.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/measuring-temperature-using-openwrt/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/measuring-temperature-using-openwrt/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[Using a flash drive with OpenWRT]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/using-a-flash-drive-with-openwrt/" />
		<id>http://dp.nonoo.hu/?p=2030</id>
		<updated>2012-02-12T22:20:17Z</updated>
		<published>2012-02-12T17:59:46Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="openwrt" /><category scheme="http://dp.nonoo.hu" term="drive" /><category scheme="http://dp.nonoo.hu" term="flash" /><category scheme="http://dp.nonoo.hu" term="flash drive" /><category scheme="http://dp.nonoo.hu" term="ld.so.conf" /><category scheme="http://dp.nonoo.hu" term="ldconfig" /><category scheme="http://dp.nonoo.hu" term="mc" /><category scheme="http://dp.nonoo.hu" term="pendrive" /><category scheme="http://dp.nonoo.hu" term="usb" />		<summary type="html"><![CDATA[On the weekend I&#8217;ve been hacking a TP-Link MR3220 for my friend Penya. The router has a USB port and I wanted to use a USB flash drive to expand the storage space available on the router. I had two flash drives, one noname 1GB and a Sandisk Cruzer 8GB. I had problems with the [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/using-a-flash-drive-with-openwrt/"><![CDATA[<p><img src="http://dp.nonoo.hu/uploads/2012/02/mr3220onbed.jpg" style="float: right; margin-left: 20px;" />On the weekend I&#8217;ve been hacking a TP-Link MR3220 for my friend Penya. The router has a USB port and I wanted to use a USB flash drive to expand the storage space available on the router. I had two flash drives, one noname 1GB and a Sandisk Cruzer 8GB. I had problems with the noname drive, random disconnects during data writing etc. so I used the Sandisk one.</p>
<p>First I formatted the drive to ext4 under Ubuntu, then plugged it in the router. After logging in with SSH, I installed the needed USB storage modules: <b>opkg update; opkg install kmod-usb-storage kmod-fs-ext4</b>. After that I was able to mount the drive under <b>/mnt/pendrive1</b> (I had to create that directory to mount to): <b>mount /dev/sda1 /mnt/pendrive1</b></p>
<p>If it says that there&#8217;s no /dev/sda1 device, look at <b>dmesg</b> to find out the newly attached flash drive&#8217;s device name. I wanted automount, so I installed the needed packages: <b>opkg install blkid block-mount e2fsprogs</b><br />
<span id="more-2030"></span><br />
I edited <b>/etc/config/fstab</b>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">config global automount<br />
&nbsp; &nbsp; option from_fstab <span style="color: #000000;">1</span><br />
&nbsp; &nbsp; option anon_mount <span style="color: #000000;">1</span><br />
<br />
config global autoswap<br />
&nbsp; &nbsp; option from_fstab <span style="color: #000000;">1</span><br />
&nbsp; &nbsp; option anon_swap <span style="color: #000000;">0</span><br />
<br />
config <span style="color: #c20cb9; font-weight: bold;">mount</span><br />
&nbsp; &nbsp; option target &nbsp; <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<br />
<span style="color: #666666; font-style: italic;"># &nbsp; option device &nbsp; /dev/sda1</span><br />
&nbsp; &nbsp; option uuid <span style="color: #ff0000;">&quot;88e22364-e0c5-42ca-b4e1-d5e9fa9d21ab&quot;</span><br />
&nbsp; &nbsp; option fstype &nbsp; ext4<br />
&nbsp; &nbsp; option options&nbsp; rw,<span style="color: #c20cb9; font-weight: bold;">sync</span><br />
&nbsp; &nbsp; option enabled&nbsp; <span style="color: #000000;">1</span><br />
&nbsp; &nbsp; option enabled_fsck <span style="color: #000000;">1</span><br />
<br />
config swap<br />
&nbsp; &nbsp; option device &nbsp; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda2<br />
&nbsp; &nbsp; option enabled&nbsp; <span style="color: #000000;">0</span></div></td></tr></tbody></table></div>
<p>Note that I set the UUID instead of the device name. It&#8217;s useful if the drive comes up under a different device name. UUID uniquely identifies it. To find out your drive&#8217;s UUID, run <b>blkid</b>. If you have a swap partition on your drive and want to use it as swap space, you can set it here.</p>
<p>After finishing with the config I ran the following commands:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab<br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fstab <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>fstab <span style="color: #7a0874; font-weight: bold;">enable</span><br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>fstab start</div></td></tr></tbody></table></div>
<p>If the last command freezes for some reason, run <b>rm /var/lock/fstab.lck</b> before it. If all goes well, now you have your flash drive automounting if it&#8217;s plugged in.</p>
<p>To install packages on the drive, you have to add it to the opkg destination list. Edit <b>/etc/opkg.conf</b>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">src<span style="color: #000000; font-weight: bold;">/</span>gz snapshots http:<span style="color: #000000; font-weight: bold;">//</span>downloads.openwrt.org<span style="color: #000000; font-weight: bold;">/</span>snapshots<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>ar71xx<span style="color: #000000; font-weight: bold;">/</span>packages<br />
dest root <span style="color: #000000; font-weight: bold;">/</span><br />
dest ram <span style="color: #000000; font-weight: bold;">/</span>tmp<br />
dest pendrive <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<br />
lists_dir ext <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>opkg-lists<br />
option overlay_root <span style="color: #000000; font-weight: bold;">/</span>overlay</div></td></tr></tbody></table></div>
<p><i>(Notice the dest pendrive line, I added only that to the file.)</i></p>
<p>After that you can install packages using the drive this way: <b>opkg install -d pendrive packagename</b>.</p>
<p>It&#8217;s usefule to add the bin and sbin directories on the flash drive to the PATH, so edit it in <b>/etc/profile</b>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin</div></td></tr></tbody></table></div>
<p>You&#8217;ll need to configure <b>ldconfig</b> for the dynamic libraries on the drive to work, if you don&#8217;t have ldconfig yet, install it: <b>opkg install -d pendrive ldconfig</b></p>
<p>Add these lines to <b>ld.so.conf</b>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>lib<br />
<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib</div></td></tr></tbody></table></div>
<p>And then run <b>ldconfig</b> every time you install a lib.</p>
<h4>Installing Midnight Commander on OpenWRT</h4>
<p>It&#8217;s nice to have mc on the router, so let&#8217;s install it:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">opkg <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-d</span> pendrive mc librpc<br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mc <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mc<br />
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mc<span style="color: #000000; font-weight: bold;">/</span>sfs.ini<br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mc<span style="color: #000000; font-weight: bold;">/</span>extfs.d<br />
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.mc<span style="color: #000000; font-weight: bold;">/</span>cedit<span style="color: #000000; font-weight: bold;">/</span>Syntax</div></td></tr></tbody></table></div>
<p>If mc says <b>error opening terminal: xterm</b>, then make sure you have these lines in <b>/etc/profile</b>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERMINFO</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>terminfo<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERM</span>=linux</div></td></tr></tbody></table></div>
<h4>Using a webcam on OpenWRT</h4>
<p>Install the needed kernel modules (for my webcam, kmod-video-uvc) and the capture application (in this case fswebcam) with <b>opkg install -d pendrive kernel kmod-video-uvc fswebcam</b>. Create the module loader shell script <b>/etc/init.d/webcam</b>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
insmod <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.39.4<span style="color: #000000; font-weight: bold;">/</span>i2c-dev.ko<br />
insmod <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.39.4<span style="color: #000000; font-weight: bold;">/</span>videodev.ko<br />
insmod <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.39.4<span style="color: #000000; font-weight: bold;">/</span>v4l2-common.ko<br />
insmod <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>pendrive1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.39.4<span style="color: #000000; font-weight: bold;">/</span>uvcvideo.ko</div></td></tr></tbody></table></div>
<p>If you want it to autostart at boot, run <b>chmod +x /etc/init.d/webcam</b>. To capture an image, run: <b>fswebcam &#8211;jpeg 100 &#8211;save c.jpeg -r 640&#215;480 -v</b></p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/using-a-flash-drive-with-openwrt/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/using-a-flash-drive-with-openwrt/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[GLX X11/Xorg problems]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/glx-x11xorg-problems/" />
		<id>http://dp.nonoo.hu/?p=2026</id>
		<updated>2012-02-12T18:00:59Z</updated>
		<published>2012-02-08T23:36:42Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="tutorial" /><category scheme="http://dp.nonoo.hu" term="glx" /><category scheme="http://dp.nonoo.hu" term="ld.so.nohwcap" /><category scheme="http://dp.nonoo.hu" term="nohwcap" /><category scheme="http://dp.nonoo.hu" term="nvidia" /><category scheme="http://dp.nonoo.hu" term="x11" /><category scheme="http://dp.nonoo.hu" term="xorg" />		<summary type="html"><![CDATA[X won&#8217;t start up with compiz? Xorg log says it&#8217;s stuck at initializing extension GLX? glxinfo segfaults in libc? You have an Nvidia card and tried everything to bring life to compiz? Boot into recovery mode, reinstall the proprietary Nvidia driver, delete /etc/ld.so.nohwcap and suddenly everything starts to work again after hours of frustrated X [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/glx-x11xorg-problems/"><![CDATA[<p>X won&#8217;t start up with compiz? Xorg log says it&#8217;s stuck at initializing extension GLX? glxinfo segfaults in libc? You have an Nvidia card and tried everything to bring life to compiz?</p>
<p>Boot into recovery mode, reinstall the proprietary Nvidia driver, delete <b>/etc/ld.so.nohwcap</b> and suddenly everything starts to work again after hours of frustrated X torture. Of course I&#8217;ve found <a href="http://www.nvnews.net/vbulletin/showthread.php?t=109392" target="_blank">this</a> forum post after I found out the same solution&#8230; :)</p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/glx-x11xorg-problems/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/glx-x11xorg-problems/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[Esprimo V5535 Ubuntu video driver install (SiS671)]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/esprimo-v5535-ubuntu-video-driver-install-sis671/" />
		<id>http://dp.nonoo.hu/?p=2007</id>
		<updated>2011-12-24T17:48:58Z</updated>
		<published>2011-12-24T17:48:58Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="tutorial" /><category scheme="http://dp.nonoo.hu" term="drivers" /><category scheme="http://dp.nonoo.hu" term="esprimo" /><category scheme="http://dp.nonoo.hu" term="sis671" /><category scheme="http://dp.nonoo.hu" term="ubuntu" /><category scheme="http://dp.nonoo.hu" term="v5535" /><category scheme="http://dp.nonoo.hu" term="video" /><category scheme="http://dp.nonoo.hu" term="xorg" />		<summary type="html"><![CDATA[- Download the driver source from here - Extract it, run ./configure and install all needed *-dev packages - Install x11proto-gl-dev and mesa-common-dev - Run make, if it stops with an error, open the corresponding .c file and uncomment the line which gave an error (for example it tries to include mibank.h, but it&#8217;s no [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/esprimo-v5535-ubuntu-video-driver-install-sis671/"><![CDATA[<p>- Download the driver source from <a href="http://blog.bigsmoke.us/2011/01/18/ubuntu-sis-671-driver" target="_blank">here</a><br />
- Extract it, run <strong>./configure</strong> and install all needed *-dev packages<br />
- Install <strong>x11proto-gl-dev</strong> and <strong>mesa-common-dev</strong><br />
- Run <strong>make</strong>, if it stops with an error, open the corresponding .c file and uncomment the line which gave an error (for example it tries to include mibank.h, but it&#8217;s no longer available and even it doesn&#8217;t needed for compilation). There are about 3-4 lines to uncomment.<br />
- After the process finished, look for <strong>src/.libs/sis671_drv.so</strong>. Copy it to <strong>/usr/lib/xorg/modules/drivers</strong>.<br />
- Run <strong>Xorg :1 -configure</strong>, move <strong>xorg.conf.new</strong> from your home dir to <strong>/etc/X11</strong>, and replace <strong>fbdev</strong> and <strong>vesa</strong> to <strong>sis671</strong> in the lines starting with <strong>Device</strong><br />
- Execute <strong>sudo service lightdm restart</strong> and now the resolution should be 1280&#215;800<br />
- To fix the console: add <b>blacklist vga16fb</b> to <strong>/etc/modprobe.d/blacklist-framebuffer.conf</strong><br />
- If you still have problems, check <strong>/var/log/Xorg.0.log</strong></p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/esprimo-v5535-ubuntu-video-driver-install-sis671/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/esprimo-v5535-ubuntu-video-driver-install-sis671/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[No drives in Ubuntu installer]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/no-drives-in-ubuntu-installer/" />
		<id>http://dp.nonoo.hu/?p=2004</id>
		<updated>2011-12-24T15:43:09Z</updated>
		<published>2011-12-24T10:17:43Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="tutorial" /><category scheme="http://dp.nonoo.hu" term="bios" /><category scheme="http://dp.nonoo.hu" term="drives" /><category scheme="http://dp.nonoo.hu" term="fdisk" /><category scheme="http://dp.nonoo.hu" term="installer" /><category scheme="http://dp.nonoo.hu" term="missing" /><category scheme="http://dp.nonoo.hu" term="partitions" /><category scheme="http://dp.nonoo.hu" term="raid" /><category scheme="http://dp.nonoo.hu" term="ubuntu" />		<summary type="html"><![CDATA[I tried to install Ubuntu to a desk computer but there were no disks/partitions listed in the installer. Switching to a console and running fdisk -l listed the disk and I was able to partition it using fdisk, formatted to ext4 but it still wasn&#8217;t listed in the installer. The solution: I used this disk [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/no-drives-in-ubuntu-installer/"><![CDATA[<p>I tried to install Ubuntu to a desk computer but there were no disks/partitions listed in the installer. Switching to a console and running <b>fdisk -l</b> listed the disk and I was able to partition it using fdisk, formatted to ext4 but it still wasn&#8217;t listed in the installer.</p>
<p><u>The solution:</u> I used this disk in a motherboard RAID setup earlier, I just had to enable the RAID controller in the BIOS, enter the controller&#8217;s setup and remove RAID information from the disk. After that, I was able to partition the disk and continue Ubuntu install.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/no-drives-in-ubuntu-installer/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/no-drives-in-ubuntu-installer/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[Remote controlled duck]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/remote-controlled-duck/" />
		<id>http://dp.nonoo.hu/?p=1997</id>
		<updated>2011-12-21T20:41:49Z</updated>
		<published>2011-12-21T20:41:49Z</published>
		<category scheme="http://dp.nonoo.hu" term="video" /><category scheme="http://dp.nonoo.hu" term="bath" /><category scheme="http://dp.nonoo.hu" term="control" /><category scheme="http://dp.nonoo.hu" term="duck" /><category scheme="http://dp.nonoo.hu" term="remote" /><category scheme="http://dp.nonoo.hu" term="toy" />		<summary type="html"><![CDATA[I got this from my friends as a birthday present. A little slow because of the foam, but light speed fast on clear international waters :)]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/remote-controlled-duck/"><![CDATA[<p>I got this from my friends as a birthday present. A little slow because of the foam, but light speed fast on clear international waters :)</p>
<p><iframe width="600" height="335" src="http://www.youtube.com/embed/UFwTquzHScA" frameborder="0" allowfullscreen></iframe></p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/remote-controlled-duck/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/remote-controlled-duck/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[Forwarding sound on LAN]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/forwarding-sound-on-lan/" />
		<id>http://dp.nonoo.hu/?p=1987</id>
		<updated>2011-12-17T06:34:42Z</updated>
		<published>2011-12-16T20:28:27Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="tutorial" /><category scheme="http://dp.nonoo.hu" term="forwarding" /><category scheme="http://dp.nonoo.hu" term="howto" /><category scheme="http://dp.nonoo.hu" term="lan" /><category scheme="http://dp.nonoo.hu" term="paprefs" /><category scheme="http://dp.nonoo.hu" term="pulseaudio" /><category scheme="http://dp.nonoo.hu" term="sound" />		<summary type="html"><![CDATA[Here&#8217;s how to simply forward sound from one computer to another in Ubuntu. First, install paprefs: 1sudo apt-get install paprefs Start it by executing paprefs in a terminal. If every checkbox is grayed out, you have to make a symlink to the PulseAudio modules directory as paprefs searches for the modules in the wrong place: [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/forwarding-sound-on-lan/"><![CDATA[<p>Here&#8217;s how to simply forward sound from one computer to another in Ubuntu.</p>
<p>First, install <strong>paprefs</strong>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> paprefs</div></td></tr></tbody></table></div>
<p>Start it by executing <strong>paprefs</strong> in a terminal. If every checkbox is grayed out, you have to make a symlink to the PulseAudio modules directory as paprefs searches for the modules in the wrong place:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pulse-<span style="color: #000000;">0.99</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pulse-0.99.3<br />
<span style="color: #666666; font-style: italic;"># or for a newer PulseAudio version:</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pulse-<span style="color: #000000;">1.0</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pulse-1.0.0</div></td></tr></tbody></table></div>
<p><span id="more-1987"></span></p>
<p>(Replace the version numbers with your version numbers.)</p>
<p>So after you successfully started <strong>paprefs</strong>, make the following settings on the server machine:</p>
<p><img src="/uploads/2011/12/paprefs-server-1.png" /><br />
<img src="/uploads/2011/12/paprefs-server-2.png" /></p>
<p>If you have multiple soundcards, paprefs has this great setting:</p>
<p><img src="/uploads/2011/12/paprefs-server-3.png" /></p>
<p>On the client side, check this checkbox:</p>
<p><img src="/uploads/2011/12/paprefs-client-1.png" /></p>
<p>Now restart PulseAudio on both computers with:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pulseaudio <span style="color: #660033;">-k</span></div></td></tr></tbody></table></div>
<p>And then press <strong>Alt+F2</strong>, enter <strong>pulseaudio</strong>. Now you should be able to select the server&#8217;s sound card(s) on the client side in the <strong>Sound settings dialog</strong> (click on the speaker icon on the panel, and select <strong>Sound Settings&#8230;</strong> from the menu):</p>
<p><img src="/uploads/2011/12/paprefs-client-2.png" /></p>
<p><strong>Note:</strong> there&#8217;s another method for sound forwarding using multicast RTP, see <a href="http://askubuntu.com/questions/70556/how-do-i-forward-sound-from-one-computer-to-another-over-the-lan" target="_blank">this</a> guide.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/forwarding-sound-on-lan/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/forwarding-sound-on-lan/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[Volume control shell script]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/volume-control-shell-script/" />
		<id>http://dp.nonoo.hu/?p=1984</id>
		<updated>2011-12-16T20:29:29Z</updated>
		<published>2011-12-16T16:59:59Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="control" /><category scheme="http://dp.nonoo.hu" term="pacmd" /><category scheme="http://dp.nonoo.hu" term="pulseaudio" /><category scheme="http://dp.nonoo.hu" term="script" /><category scheme="http://dp.nonoo.hu" term="shell" /><category scheme="http://dp.nonoo.hu" term="volume" />		<summary type="html"><![CDATA[Here&#8217;s a simple shell script I wrote for controlling PulseAudio volume from shell under Linux. It takes two parameters: up and down and sets volume for all sinks. 123456789101112#!/bin/bash OLDIFS=$IFS IFS=$'\n' for L in `pacmd dump &#124; grep set-sink-volume`; do &#160; &#160; if &#91; $1 = &#34;up&#34; &#93;; then &#160; &#160; &#160; &#160; pacmd set-sink-volume [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/volume-control-shell-script/"><![CDATA[<p>Here&#8217;s a simple shell script I wrote for controlling PulseAudio volume from shell under Linux. It takes two parameters: up and down and sets volume for all sinks.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #007800;">OLDIFS</span>=<span style="color: #007800;">$IFS</span><br />
<span style="color: #007800;">IFS</span>=$<span style="color: #ff0000;">'\n'</span><br />
<span style="color: #000000; font-weight: bold;">for</span> L <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>pacmd dump <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> set-sink-volume<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$1</span> = <span style="color: #ff0000;">&quot;up&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pacmd set-sink-volume <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$L</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $2}'</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$L</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $3+5000}'</span><span style="color: #000000; font-weight: bold;">`</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$1</span> = <span style="color: #ff0000;">&quot;down&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pacmd set-sink-volume <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$L</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $2}'</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$L</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $3-5000}'</span><span style="color: #000000; font-weight: bold;">`</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #007800;">IFS</span>=<span style="color: #007800;">$OLDIFS</span></div></td></tr></tbody></table></div>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/volume-control-shell-script/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/volume-control-shell-script/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[My bday party 2011]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/my-bday-party-2011/" />
		<id>http://dp.nonoo.hu/?p=1974</id>
		<updated>2011-12-05T14:57:22Z</updated>
		<published>2011-12-05T14:57:22Z</published>
		<category scheme="http://dp.nonoo.hu" term="video" /><category scheme="http://dp.nonoo.hu" term="2011" /><category scheme="http://dp.nonoo.hu" term="birthday" /><category scheme="http://dp.nonoo.hu" term="party" />		<summary type="html" />
		<content type="html" xml:base="http://dp.nonoo.hu/my-bday-party-2011/"><![CDATA[<p><iframe width="600" height="335" src="http://www.youtube.com/embed/JalO2h_ww_g" frameborder="0" allowfullscreen></iframe></p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/my-bday-party-2011/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/my-bday-party-2011/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Nonoo</name>
						<uri>http://www.nonoo.hu/</uri>
					</author>
		<title type="html"><![CDATA[32bit OpenGL with wine]]></title>
		<link rel="alternate" type="text/html" href="http://dp.nonoo.hu/32bit-opengl-with-wine/" />
		<id>http://dp.nonoo.hu/?p=1970</id>
		<updated>2011-12-02T21:37:35Z</updated>
		<published>2011-12-02T21:37:35Z</published>
		<category scheme="http://dp.nonoo.hu" term="linux" /><category scheme="http://dp.nonoo.hu" term="tutorial" /><category scheme="http://dp.nonoo.hu" term="32bit" /><category scheme="http://dp.nonoo.hu" term="64bit" /><category scheme="http://dp.nonoo.hu" term="ldconfig" /><category scheme="http://dp.nonoo.hu" term="opengl" /><category scheme="http://dp.nonoo.hu" term="wine" />		<summary type="html"><![CDATA[Do you have problems running OpenGL apps under Wine with an Nvidia card and a 64bit Linux? Wine says X11DRV_WineGL_InitOpenglInfo couldn&#8217;t initialize OpenGL? Here&#8217;s the fix. - apt-get install ia32-libs, if it&#8217;s already installed and you still have problems, move on to the next step - move everything from /usr/lib/i386-linux-gnu to /usr/lib32 EXCEPT /usr/lib/i386-linux-gnu/glib2.0. - [...]]]></summary>
		<content type="html" xml:base="http://dp.nonoo.hu/32bit-opengl-with-wine/"><![CDATA[<p>Do you have problems running OpenGL apps under <a href="http://en.wikipedia.org/wiki/Wine_(software)" target="_blank">Wine</a> with an Nvidia card and a 64bit Linux? Wine says <em>X11DRV_WineGL_InitOpenglInfo couldn&#8217;t initialize OpenGL</em>?</p>
<p>Here&#8217;s the fix.</p>
<p>- <strong>apt-get install ia32-libs</strong>, if it&#8217;s already installed and you still have problems, move on to the next step<br />
- move everything from <strong>/usr/lib/i386-linux-gnu</strong> to <strong>/usr/lib32</strong> EXCEPT <strong>/usr/lib/i386-linux-gnu/glib2.0</strong>.<br />
- extract the official 64bit Nvidia driver: <strong>./NVIDIA-Linux-x86-290.10.run -x</strong><br />
- copy <strong>libGL.so.290.10</strong> (or newer) and the <strong>tls directory</strong> from Nvidia driver&#8217;s directory called <strong>32</strong> to <strong>/usr/lib32</strong><br />
- create symlinks <strong>libGL.so.1 and libGL.so</strong> in /usr/lib32, they should both point to <strong>libGL.so.290.10</strong><br />
- run <strong>sudo ldconfig</strong></p>
<p>That&#8217;s it. Now wine should run OpenGL apps without problems.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://dp.nonoo.hu/32bit-opengl-with-wine/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://dp.nonoo.hu/32bit-opengl-with-wine/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
	</feed>

