<?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>linux &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Mon, 19 Feb 2018 17:16:57 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Fix Music on Console TiMidity startup error</title>
		<link>https://luxing.im/fix-music-on-console-timidity-startup-error/</link>
					<comments>https://luxing.im/fix-music-on-console-timidity-startup-error/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 19 Feb 2018 16:04:22 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[moc]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[terminal]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=749</guid>

					<description><![CDATA[I love to use terminal / console, figured that it is more efficient at most of the times, even when I was listening to music. Music On Console (MOC) is one of the programs that I use. My primary OS is Fedora and right now I am using Fedora 27. Strangely I failed to start &#8230; <p class="link-more"><a href="https://luxing.im/fix-music-on-console-timidity-startup-error/" class="more-link">Continue reading<span class="screen-reader-text"> "Fix Music on Console TiMidity startup error"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I love to use terminal / console, figured that it is more efficient at most of the times, even when I was listening to music. Music On Console (MOC) is one of the programs that I use.<br />
<span id="more-749"></span></p>
<p>My primary OS is Fedora and right now I am using Fedora 27.</p>
<p>Strangely I failed to start <code>mocp</code> command once I installed moc, with a little searching, add <code>~/.moc/config</code> file with the content:</p>
<pre>TiMidity_Config = /etc/timidity.cfg</pre>
<p>Make sure this config file has 600 permission or it will complain about insecure permission.</p>
<p>Then I would be able to use mocp in any directory.</p>
<p>MOC has Equalizer support, <a href="http://ftp.daper.net/pub/soft/moc/contrib/eqsets.tar.gz">download</a> the eqset from their official website and the presets to <code>~/.moc/eqsets</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/fix-music-on-console-timidity-startup-error/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">749</post-id>	</item>
		<item>
		<title>ASCII Quarium</title>
		<link>https://luxing.im/ascii-quarium/</link>
					<comments>https://luxing.im/ascii-quarium/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Thu, 10 Apr 2014 14:16:22 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=347</guid>

					<description><![CDATA[Make the console a fun place while idle! This is a perl script made by RoboBunny. For RedHat systems: yum install perl-ExtUtils-MakeMaker perl-Term-Animation -y The above 2 packages are dependencies for this animation in terminal. Then download ASCIIquarium from http://robobunny.com/projects/asciiquarium/asciiquarium.tar.gz Decompress this tar and give it an executable permission (+x). Copy it over to any &#8230; <p class="link-more"><a href="https://luxing.im/ascii-quarium/" class="more-link">Continue reading<span class="screen-reader-text"> "ASCII Quarium"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Make the console a fun place while idle! This is a perl script made by <a href="http://robobunny.com/projects/asciiquarium/html/" target="_blank">RoboBunny</a>.<br />
<span id="more-347"></span><br />
For RedHat systems:</p>
<pre>yum install perl-ExtUtils-MakeMaker perl-Term-Animation -y </pre>
<p>The above 2 packages are dependencies for this animation in terminal.</p>
<p>Then download ASCIIquarium from <a href="http://robobunny.com/projects/asciiquarium/asciiquarium.tar.gz">http://robobunny.com/projects/asciiquarium/asciiquarium.tar.gz</a></p>
<p>Decompress this tar and give it an executable permission (+x).</p>
<p>Copy it over to any location in your $PATH, in my case, I copied to ~/bin</p>
<p>Show the ASCIIquarium by typing <em>asciiquarium</em></p>
<p><img fetchpriority="high" decoding="async" src="http://robobunny.com/projects/asciiquarium/screenshot.png" width="613" height="452" class="alignnone" /></p>
<p>You can quit the animation by pressing &#8220;q&#8221;.</p>
<p>Another similar cool terminal animation is <a href="http://pkgs.org/search/?query=cmatrix&#038;type=smart" target="_blank">cmatrix</a>, give it a go <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/ascii-quarium/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">347</post-id>	</item>
		<item>
		<title>Changing text encoding with Vim</title>
		<link>https://luxing.im/changing-text-encoding-with-vim/</link>
					<comments>https://luxing.im/changing-text-encoding-with-vim/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Fri, 28 Feb 2014 01:33:24 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[vim]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=301</guid>

					<description><![CDATA[A lot of subtitles in Chinese language are encoded with GB2312 or sometimes Code Page 936 (CP936, aka gbk), are generated under Windows. This brings problems in many Linux based multimedia players. Converting using iconv is not that hard, since its command is simple to use: iconv -f gb2312 -t utf8 subtitle.srt -o converted.srt But &#8230; <p class="link-more"><a href="https://luxing.im/changing-text-encoding-with-vim/" class="more-link">Continue reading<span class="screen-reader-text"> "Changing text encoding with Vim"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>A lot of subtitles in Chinese language are encoded with GB2312 or sometimes Code Page 936 (CP936, aka gbk), are generated under Windows. This brings problems in many Linux based multimedia players.<br />
<span id="more-301"></span><br />
Converting using <strong>iconv</strong> is not that hard, since its command is simple to use:</p>
<pre>iconv -f gb2312 -t utf8 subtitle.srt -o converted.srt</pre>
<p>But in many cases, you will find error as such: </p>
<pre>iconv: illegal input sequence at position xxxx.</pre>
<p> To solve this, you can need to change the <strong>gb2312</strong> to some larger encoding set with the same catagory. For example, <strong>gbk</strong> is a super set of gb2312.</p>
<p>If you only know the file&#8217;s encoding but don&#8217;t know its super charset, you can always use vim to convert it.</p>
<pre>vim subtitle.srt</pre>
<p>Edit it with <em>++enc</em> option:</p>
<pre>:e ++enc=gb2312</pre>
<p>Save it with <em>++enc</em> option:</p>
<pre>:w ++enc=utf8 converted.srt</pre>
<p>Related documentation: <a href="http://vimdoc.sourceforge.net/htmldoc/usr_45.html#45.4" target="_blank">http://vimdoc.sourceforge.net/htmldoc/usr_45.html#45.4</a></p>
<p>All done!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/changing-text-encoding-with-vim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">301</post-id>	</item>
		<item>
		<title>Access Control List on Linux filesystem</title>
		<link>https://luxing.im/access-control-list-on-linux-filesystem/</link>
					<comments>https://luxing.im/access-control-list-on-linux-filesystem/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Tue, 18 Feb 2014 12:40:41 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rhcsa]]></category>
		<category><![CDATA[rhel]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=285</guid>

					<description><![CDATA[The Access Control List (ACL) provides an extended set of permissions on files and directories, there are 2 commands available to use: setfacl, getfacl. Consult man page for complete manual. Sample use: getfacl -c Video/ Gives out: user::rwx group::r-x other::r-x When it&#8217;s needed to share to others: setfacl -m u:user2:5 getfacl -c Video/ Will return: &#8230; <p class="link-more"><a href="https://luxing.im/access-control-list-on-linux-filesystem/" class="more-link">Continue reading<span class="screen-reader-text"> "Access Control List on Linux filesystem"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>The Access Control List (ACL) provides an extended set of permissions on files and directories, there are 2 commands available to use: <em>setfacl</em>, <em>getfacl</em>.</p>
<p>Consult <a href="http://linux.die.net/man/1/setfacl" target="_blank">man</a> page for complete manual.<br />
<span id="more-285"></span><br />
Sample use:</p>
<pre>getfacl -c Video/</pre>
<p>Gives out:</p>
<pre>
user::rwx
group::r-x
other::r-x
</pre>
<p>When it&#8217;s needed to share to others:</p>
<pre>setfacl -m u:user2:5
getfacl -c Video/</pre>
<p>Will return:</p>
<pre>
user::rwx
user:user2:r-x
group::r-x
mask::r-x
other::r-x
</pre>
<p>So user2 can only be read-only on this directory.</p>
<p>Removing all extended ACL and leave the default system rwx, use this command:</p>
<pre>setfacl -b Video/</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/access-control-list-on-linux-filesystem/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">285</post-id>	</item>
		<item>
		<title>Small Makefile script for making daily course notes on LaTeX</title>
		<link>https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/</link>
					<comments>https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Wed, 08 Jan 2014 16:22:40 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Makefile]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=258</guid>

					<description><![CDATA[I have a habit of making daily course notes using (Probably not the most suitable way for you readers). By using this Makefile script I can automatically generate date based file, and avoiding overriding the current date notes. Because I have an folder structure like this: ~/ study/ termX/ course1/ course2/ termY/ In this structure &#8230; <p class="link-more"><a href="https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/" class="more-link">Continue reading<span class="screen-reader-text"> "Small Makefile script for making daily course notes on LaTeX"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I have a habit of making daily course notes using <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> (Probably not the most suitable way for you readers). By using this Makefile script I can automatically generate date based <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> file, and avoiding overriding the current date notes.<br />
<span id="more-258"></span><br />
Because I have an folder structure like this:</p>
<pre>
  ~/
    study/
        termX/
            course1/
            course2/
        termY/
</pre>
<p>In this structure I can copy this Makefile to anywhere.</p>
<pre>
LC = pdflatex
NAME = $(shell date +%Y%m%d)
TEMPLATE = template.tex

all: make

make: $(NAME).tex
    pdflatex $(NAME).tex
    xdg-open $(NAME).pdf

create: $(TEMPLATE)
    if [ ! -e `date +%Y%m%d`.tex ]; \
    then \
        cp $(TEMPLATE) `date +%Y%m%d`.tex; \
    fi; 
    vim `date +%Y%m%d`.tex

clean:
    rm -f *.aux *.log *.out
</pre>
<p>The usage is very clear, the default is to compile a tex file to PDF.</p>
<p>You still need to write a tex template called template.tex for this to work.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">258</post-id>	</item>
		<item>
		<title>Installing Bumblebee on Fedora for Lenovo Y510P</title>
		<link>https://luxing.im/installing-bumblebee-on-y510p/</link>
					<comments>https://luxing.im/installing-bumblebee-on-y510p/#comments</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 02 Dec 2013 01:49:12 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nvidia]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=211</guid>

					<description><![CDATA[Previously I wrote down the article Installing Fedora on Lenovo Y510P, today I am going to write down my steps on installing bumblebee and using intel driver by default. Let&#8217;s assume you are using nomodeset setting when boot up, open up a terminal and login to root by sudo -s We need to install a &#8230; <p class="link-more"><a href="https://luxing.im/installing-bumblebee-on-y510p/" class="more-link">Continue reading<span class="screen-reader-text"> "Installing Bumblebee on Fedora for Lenovo Y510P"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Previously I wrote down the article <a href="http://blog.luxing.im/installing-fedora-on-lenovo-y510p/" target="_blank">Installing Fedora on Lenovo Y510P</a>, today I am going to write down my steps on installing bumblebee and using intel driver by default.<br />
<span id="more-211"></span><br />
Let&#8217;s assume you are using <strong>nomodeset</strong> setting when boot up, open up a terminal and login to root by </p>
<pre>sudo -s</pre>
<p>We need to install a few things:</p>
<pre>
yum install -y libbsd-devel libbsd glibc-devel libX11-devel help2man autoconf git tar glib2 glib2-devel kernel-devel kernel-headers automake gcc gtk2-devel VirtualGL VirtualGL.i686
</pre>
<pre>yum groupinstall "C Development and Libraries" -y</pre>
<p>Then, </p>
<pre>yum localinstall http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora19/noarch/bumblebee-nonfree-release-1.1-1.noarch.rpm http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora19/noarch/bumblebee-release-1.1-1.noarch.rpm</pre>
<p>When finished, do </p>
<pre>yum install bumblebee-nvidia bumblebee primus bbswitch-dkms</pre>
<p>Reboot to init level 3 (1 or 2 is fine), login with root. (As long as X is not running)</p>
<p>Type </p>
<pre>X -configure</pre>
<p>this will generate xorg.conf.new under /root folder. Copy this over to /etc/X11/xorg.conf and modify this xorg.conf.</p>
<p>We need to find <strong>Section &#8220;Device&#8221;</strong>, where your Card0 is at, comment out <em>#Driver &#8220;modesetting&#8221;</em>, add <strong>Driver &#8220;intel&#8221;</strong> under it, make sure the <strong>BusID</strong> is matched from <strong>lspci</strong>&#8216;s Intel VGA bus id, in my case, it is <em>&#8220;PCI:0:2:0&#8221;</em> You might also want to delete any other screens/devices/monitors, leave only screen0, device0 and monitor0 in the config file. Leave other unrelated untouched.</p>
<p>Add the following line in <em>Section &#8220;Device&#8221; for card0:</p>
<pre>Option      "Backlight"     "intel_backlight"</pre>
<p>cd to /etc/default/, edit grub, delete nomodeset from GRUB_CMDLINE_LINUX, add acpi_backlight=vendor at the end. Then cd to /boot/efi/EFI/fedora, execute command </p>
<pre>grub2-mkconfig -o grub.cfg</pre>
<p>Now reboot. Wait for a few minutes, you can take a look at what systemd is doing by pressing any arrow key at boot screen. You should see nvidia is compiling kernel.</p>
<p>And now you should be using intel driver for displaying. You could start your games or other graphic intensive applications by using <strong>optirun xxx</strong> in terminal.</p>
<p>Test it using those 2 commands:</p>
<pre>glxgears -info
optirun glxgears -info</pre>
<p>You can see which driver you are using under GL_VENDOR value.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/installing-bumblebee-on-y510p/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">211</post-id>	</item>
		<item>
		<title>A few system monitoring tools under Linux</title>
		<link>https://luxing.im/a-few-system-monitoring-tools-under-linux/</link>
					<comments>https://luxing.im/a-few-system-monitoring-tools-under-linux/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Thu, 28 Nov 2013 03:27:19 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[system]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=202</guid>

					<description><![CDATA[Under Linux, you can use ldd to find out an executable&#8217;s library dependency, you can use top to find out the current processes and their relevant information. In this article, some third party software will be introduced for easier management under terminal session. Processes htop Besides the built-in top which we can use for monitoring &#8230; <p class="link-more"><a href="https://luxing.im/a-few-system-monitoring-tools-under-linux/" class="more-link">Continue reading<span class="screen-reader-text"> "A few system monitoring tools under Linux"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Under Linux, you can use <em>ldd</em> to find out an executable&#8217;s library dependency, you can use <em>top</em> to find out the current processes and their relevant information. In this article, some third party software will be introduced for easier management under terminal session.<br />
<span id="more-202"></span></p>
<h1>Processes</h1>
<h3>htop</h3>
<p>Besides the built-in <em>top</em> which we can use for monitoring current processes&#8217; status, we have a much better tool <em>htop</em>. User can see how much workload each of your cpu is doing, you can sort the list in every column and you can press t for tree view for main and forked/sub processes relationships. There are a few things htop doesn&#8217;t show on default screen, such as used buffer size and cache size etc, but you can always use <em>free -k</em> or <em>top</em> as supplements.</p>
<h1>File systems</h1>
<h3>du and df</h3>
<p>There are a few tools I need to take this note down. The default built-in <em>df</em> and <em>du</em> utility are great tools. Man page is always helpful in detail.</p>
<h3>iostat</h3>
<p>This comes with the package sysstat in RPM based Linux distributions (CentOS/Fedora/etc), available at their main repositories. Not so sure for the deb people. I always use the command </p>
<pre>iostat -dmx /dev/sda 3</pre>
<p> to check sda&#8217;s usage every 3 seconds.</p>
<h3>iotop</h3>
<p>iotop is a simple I/O monitor, this package is written by Python 2.x and it requires root privilege to run. It is really simple but it does the job. Check out <code>--help</code> for a bit more functionality.</p>
<h3>ftop</h3>
<p>ftop shows processes of open files and file systems. This software is now 5 years old and hasn&#8217;t been updated, but it does the job, and I like this better than iotop. For CentOS people, this package comes from rpmforge, you&#8217;ll have to add the repository first to your box.</p>
<h1>Networking monitoring</h1>
<p>Networking is another very important thing that needs to be mornitored. <em>netstat</em> does a fairly good job for a fixed point of time&#8217;s status, don&#8217;t we need a bit more than that?</p>
<h3>iftop</h3>
<p>iftop can show current port and ip of the host and the destination, provided this you can use <em>netstat</em> to find out what process is behind a typical service. This can also show in bars how heavily a service is using the network.</p>
<p>It needs root privilege to run, it also has a .iftoprc file <a href="https://github.com/reicheltd/dotfiles/blob/master/.iftoprc" target="_blank">available</a> for configuring defaults.</p>
<h3>nload</h3>
<p>nload doesn&#8217;t need root privilege to run, so the functionality is even simpler. Just monitoring the load on network. Press F2 for its configuration.</p>
<p>nload is available in rpmforge for CentOS.</p>
<p>Overall, these are the basic level system monitoring tools, and there are many more like those. For enterprise environment monitoring, there are much more sophisticated tools available. </p>
<p>In recent releases of GNOME, KDE and maybe others, they provide a GUI based system monitoring tools too. See what fits you the most.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/a-few-system-monitoring-tools-under-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">202</post-id>	</item>
		<item>
		<title>FTP Downloading under wine</title>
		<link>https://luxing.im/ftp-downloading-under-wine/</link>
					<comments>https://luxing.im/ftp-downloading-under-wine/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 11 Nov 2013 19:43:01 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[ftprush]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[wine]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=193</guid>

					<description><![CDATA[FTPRush is a powerful FTP transfer tool under Windows. It can also run under wine in Linux. It is curious that how wine works using Internet connections. I used to using Windows to download stuff from FTP servers using FTPRush, because FTPRush under wine has a very slow connection. It reminds me the old dial-up &#8230; <p class="link-more"><a href="https://luxing.im/ftp-downloading-under-wine/" class="more-link">Continue reading<span class="screen-reader-text"> "FTP Downloading under wine"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>FTPRush is a powerful FTP transfer tool under Windows. It can also run under wine in Linux.<br />
<span id="more-193"></span><br />
It is curious that how wine works using Internet connections. I used to using Windows to download stuff from FTP servers using FTPRush, because FTPRush under wine has a <strong>very</strong> slow connection. It reminds me the old dial-up age because I have always been getting 10k/s or less.</p>
<p>The thing is, when using a SSH tunnel as a proxy allowing FTPRush to download from FTP servers has always been very fast. I don&#8217;t know why it is as fast as being under Windows, regarding this issue, the quick solution is to setup a SSH proxy that takes the bandwidth to interface <strong>lo</strong>.</p>
<p>So, under FTPRush, first setup a proxy connection. Press F6 to open up the &#8220;options&#8221;, under Proxy Server, add a proxy and name it with whatever you like, proxy type SOCKS5, HOST is 127.0.0.1, port can be anything above 1027, let&#8217;s say, 8088.</p>
<p>Secondly, setup an FTP site with proxy set to the one just set. </p>
<p>Since we are using Linux, open up a terminal and type </p>
<pre>ssh -D 127.0.0.1:8088 -p 22 localhost</pre>
<p> to create a ssh tunnel and bind it to local 8088 port. Don&#8217;t exit the terminal, go back to FTPRush and start the connection with the FTP site.</p>
<p>Happy downloading!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/ftp-downloading-under-wine/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">193</post-id>	</item>
		<item>
		<title>Installing Fedora on Lenovo Y510p</title>
		<link>https://luxing.im/installing-fedora-on-lenovo-y510p/</link>
					<comments>https://luxing.im/installing-fedora-on-lenovo-y510p/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Sun, 27 Oct 2013 13:44:25 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[y510p]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=170</guid>

					<description><![CDATA[I bought a brand new Lenovo Y510p 2 months back, and it arrived 2 days ago (what a speed!). Yesterday evening I finally got a chance to install Linux onto my baby. I have to say that wasn&#8217;t an easy job. Here are the steps that I did last night. You can combine this article &#8230; <p class="link-more"><a href="https://luxing.im/installing-fedora-on-lenovo-y510p/" class="more-link">Continue reading<span class="screen-reader-text"> "Installing Fedora on Lenovo Y510p"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I bought a brand new Lenovo Y510p 2 months back, and it arrived 2 days ago (what a speed!). Yesterday evening I finally got a chance to install Linux onto my baby. I have to say that wasn&#8217;t an easy job. Here are the steps that I did last night.<br />
<span id="more-170"></span><br />
<strong>You can combine this article with <a href="http://blog.luxing.im/installing-bumblebee-on-y510p/" target="_blank">that</a> to create a more simple 1-step installation process. I have done this curly.</strong></p>
<p>Firstly, boot into Win 8, using disk utility to shrink volumns [to as small as you want if you can], because my version of Y510p has an optical drive, I took the advantage and burned a Fedora 19 DVD disc, I did not use LiveCD, don&#8217;t ask me why.</p>
<p>If you intend to use USB to install, use <a href="https://fedorahosted.org/liveusb-creator/" target="_blank">liveusb-creator</a> rather than unetbootin.</p>
<p>In BIOS, I turned on Legacy support with UEFI first. <-- This is important.

Left the burnt DVD inside the tray, reboot and kept pressing F12 until a boot selection screen came up. Choose the DVD drive. By default, the kernel in the DVD doesn't provide a working graphics driver, so I'd have to install under command line. The Anaconda command-line was simple enough to use, the problems came next.

I could successful boot using UEFI Win8 mode into Fedora, but I couldn't reach a desktop environment. Switched to tty2 using root. I tried startx but it didn't work, and the Ethernet card provided by Athores did not work either! Wifi could work, but I was at school and they used WPA2 Enterprise encryption so I couldn't do anything from this laptop!

If you experience black screen on booting, add nomodeset to your grub2 kernel booting options behind <em>linux</em>. You can manually add this parameter to /boot/efi/EFI/fedora/grub.cfg.</p>
<p>I knew this was gonna happen, so I brought my sweet old HP 6531s alongside with me. I figured that if I update some of the packages, it might work, epsecially kernel and graphics related packages. On the Internet some people say using alx driver could install the driver for my Qualcomm Atheros QCA8171 Gigabit Ethernet, it was a no-go for me.</p>
<p>I downloaded the required latest packages from <a href="http://pkgs.org" target="_blank">http://pkgs.org</a>, listed below:</p>
<pre>
binutils-2.23.52.0.1-8.fc19.x86_64.rpm
cpp-4.8.1-1.fc19.x86_64.rpm
elfutils-0.156-5.fc19.x86_64.rpm
elfutils-libelf-0.156-5.fc19.x86_64.rpm
elfutils-libs-0.156-5.fc19.x86_64.rpm
gcc-4.8.1-1.fc19.x86_64.rpm
gdb-7.6-30.fc19.x86_64.rpm
glibc-2.17-18.fc19.x86_64.rpm
glibc-common-2.17-18.fc19.x86_64.rpm
glibc-devel-2.17-18.fc19.x86_64.rpm
glibc-headers-2.17-18.fc19.x86_64.rpm
kernel-3.11.6-200.fc19.x86_64.rpm
kernel-devel-3.11.6-200.fc19.x86_64.rpm
kernel-headers-3.11.6-200.fc19.x86_64.rpm
libmpc-1.0.1-1.fc19.x86_64.rpm
linux-firmware-20130724-29.git31f6b30.fc19.noarch.rpm
mpfr-3.1.1-2.fc19.x86_64.rpm
patch-2.7.1-6.fc19.x86_64.rpm
pkgconfig-0.27.1-1.fc19.x86_64.rpm
</pre>
<p>Using USB sticks to copy from old computer to Y510p, trying to resolve the dependency list was a great pain.</p>
<p>I recon the most important package is kernel-3.11* then reboot. And voila! Y510p successfully booted into my MATE Desktop Environment! Atheros ethernet was also working fantastically.</p>
<p>The 5400rpm hdd is noticeably slow, the booting process nearly made me think that I failed again. The brightness cannot be adjusted under MATE and I don&#8217;t know why (see the <a href="http://blog.luxing.im/installing-bumblebee-on-y510p/" target="_blank">follow-up</a>)</p>
<p>Proprietary GPU drive from nVidia doesn&#8217;t compile on my machine at all.</p>
<p>Overall, this is a success attempt installation, and it made my day!</p>
<p>It so happens that Linus Torvalds on Oct 17, 2013 made a <a href="https://plus.google.com/102150693225130002912/posts/GqUgcYcfQuV" target="_blank">comment</a> to Fedora Project complaining on their installing DVD/CD that never gets updated after their first current-version release. I agree with him. Otherwise Fedora is great!</p>
<p>Update:</p>
<p>1. You don&#8217;t need a xorg-x11-drv-nouveau to be able to display.</p>
<p>2. The nVidia proprietary driver from rpmfusion won&#8217;t work yet.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/installing-fedora-on-lenovo-y510p/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">170</post-id>	</item>
		<item>
		<title>Using Mutt as Email client</title>
		<link>https://luxing.im/using-mutt-as-email-client/</link>
					<comments>https://luxing.im/using-mutt-as-email-client/#comments</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Fri, 04 Oct 2013 01:00:08 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mutt]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=15</guid>

					<description><![CDATA[I&#8217;ve always fascinated with my professor Jim Diamond&#8217;s email client, and how it interacts with his zsh. Start from today, I am going to change my main email client from Thunderbird to Mutt too. Here is a small piece of snippet that I put into my ~/.mutt configuration. You may follow my steps and copy &#8230; <p class="link-more"><a href="https://luxing.im/using-mutt-as-email-client/" class="more-link">Continue reading<span class="screen-reader-text"> "Using Mutt as Email client"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve always fascinated with my professor Jim Diamond&#8217;s email client, and how it interacts with his <em>zsh</em>. Start from today, I am going to change my main email client from Thunderbird to Mutt too. Here is a small piece of snippet that I put into my ~/.mutt configuration. You may follow my steps and copy the necessary information to your mutt configuration files.</p>
<p><span id="more-15"></span></p>
<p>It is nearly a year that I haven&#8217;t used Windows as my in-production OS, instead I&#8217;ve used either RedHat sponsored Linux distro (Fedora) or a RHEL-copy CentOS.</p>
<pre>sudo yum install mutt</pre>
<p>Now it is the fun part.</p>
<p>By default, your mutt will read info from ~/.muttrc or ~/.mutt/muttrc. Since I have several email addresses needed to be setup, I use the second one.</p>
<pre>mkdir -p ~/.muttrc/accounts</pre>
<p>Which creates requested folders.</p>
<p>Go to ~/.mutt/accounts/ and create your email account file (you may name it as your like, but keep track of the file name) like the following way:</p>
<pre># Uni Email Setting, file name: university
set from = "abcdef@esp.tld"
set realname = "Your Name Here"
# IMAP settings here
set imap_user = "abcdef"
set imap_pass = ""       # Password is empty here so you'll key-in passwords everytime you wish to access your email account
set folder = "imaps://imap.mail.tld:993"
set spoolfile = "imaps://imap.mail.tld:993/Inbox"   # For gmail users, you need to set your spoolfiles to "+INBOX"
set imap_check_subscribed
set mime_forward=yes
set mime_forward_rest=yes

#SMTP settings
set smtp_url = "smtp://abcdef@smtp.esp.tld:587/"
set smtp_pass = ""

set mail_check = 120
set timeout = 300
set imap_keepalive = 300
# You can set the postponed/record to "+Drafts" or "Sent" correspondently below.
set postponed = "imaps://imap.mail.tld:993/Inbox.Drafts"
set record = "imaps://imap.mail.tld:993/Inbox.Sent"
set header_cache=~/.mutt/cache/headers</pre>
<p>You can also put your GnuPG keys under your account if you have multiple keys for multiple emails for some reason. You need to copy the <a href="http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG" target="_blank">content</a> over under each of your account setting. Remember to substitute your public key identifier in the config files.</p>
<p>You can create similar ones with gmail, assume that you have read the comments above.</p>
<p>Now we put some general information into our muttrc:</p>
<pre>vim ~/.mutt/muttrc</pre>
<pre>set editor = "vim"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set include
set sort = 'threads'
set sort_aux = 'reverse-last-date-received'
set auto_tag = yes
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
alternative_order text/plain text/html *
auto_view text/html
bind editor  complete-query
bind editor ^T complete
bind editor  noop
set hostname = desktop.luxing.im
set sig_on_top = yes

# Create a statusbar shows the information in localtime.
set pager_format="%4C %Z %[!%b %e at %I:%M %p]  %.20n -- %s%* -- (%P)"

# Accounts and Shortcuts
source ~/.mutt/accounts/acadia
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/accounts/yeah<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/accounts/126<enter><change-folder>!<enter>'


# move spam to Spam/ from: http://chrisjrob.com/2011/03/23/configuring-mutt-for-spam/
macro index S "<tag-prefix><enter-command>unset resolve<enter><tag-prefix>N<tag-prefix><enter-command>set resolve<enter><tag-prefix><save-message>=INBOX.Spam<enter>" "file as Spam"
macro pager S "<save-message>=INBOX.Spam<enter>" "file as Spam"

macro index H "<tag-prefix><enter-command>unset resolve<enter><tag-prefix>N<tag-prefix><enter-command>set resolve<enter><tag-prefix><save-message>=INBOX<enter>" "file as Ham"
macro pager H "<save-message>=INBOX<enter>" "file as Ham"

# return to inbox by pressing .
macro index . "<change-folder>=INBOX<enter>" "Inbox"

set pager_format="%4C %Z %[!%b %e at %I:%M %p]  %.20n  %s%* -- (%P)" # show the corresponding local time of the email.
set pgp_use_gpg_agent = yes

</pre>
<p>You need to adjust your accounts corresponding to your settings.</p>
<p>If you put sensitive information like your passwords into your <em>account</em>, remember to chmod 600 for security concern.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/using-mutt-as-email-client/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">15</post-id>	</item>
	</channel>
</rss>
