<?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; Henry Poon&#039;s Blog</title>
	<atom:link href="https://blog.henrypoon.com/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.henrypoon.com</link>
	<description></description>
	<lastBuildDate>Wed, 05 Oct 2022 02:19:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">83044199</site>	<item>
		<title>Running Selenium Webdriver on WSL2</title>
		<link>https://blog.henrypoon.com/blog/2020/09/27/running-selenium-webdriver-on-wsl2/</link>
					<comments>https://blog.henrypoon.com/blog/2020/09/27/running-selenium-webdriver-on-wsl2/#respond</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Mon, 28 Sep 2020 00:49:34 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[AWK]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Computer architecture]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Drive]]></category>
		<category><![CDATA[Error message]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Firefox version history]]></category>
		<category><![CDATA[Flag]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Graphical user interface testing]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[ise]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Lag]]></category>
		<category><![CDATA[lamb]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Messages]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[Operating systems]]></category>
		<category><![CDATA[Parameter]]></category>
		<category><![CDATA[PATH]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Resolv.conf]]></category>
		<category><![CDATA[Rolling]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Struct]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Ubuntu version history]]></category>
		<category><![CDATA[USR]]></category>
		<category><![CDATA[Variable]]></category>
		<category><![CDATA[Web development software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">https://blog.henrypoon.com/?p=6269</guid>

					<description><![CDATA[This is a newer version of the post that I made before on how to run Selenium on WSL, but this one is on doing it in WSL2. The instructions are similar at a high level but there are some additional gotchas. You will need: WSL2 setup with Firefox installed (mine uses Ubuntu 20.04) VcXsrv [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This is a newer version of the post that I made before on <a href="https://blog.henrypoon.com/blog/2017/06/18/running-selenium-webdriver-on-bash-for-windows/" target="_blank" rel="noreferrer noopener">how to run Selenium on WSL</a>, but this one is on doing it in WSL2.  The instructions are similar at a high level but there are some additional gotchas.</p>



<p class="wp-block-paragraph">You will need:</p>



<ul class="wp-block-list"><li><a rel="noreferrer noopener" href="https://msdn.microsoft.com/en-us/commandline/wsl/install_guide" target="_blank">WSL2 setup</a> with Firefox installed (mine uses Ubuntu 20.04)</li><li><a rel="noreferrer noopener" href="https://sourceforge.net/projects/vcxsrv/" target="_blank">VcXsrv</a></li><li><a rel="noreferrer noopener" href="https://github.com/mozilla/geckodriver/releases" target="_blank">geckodriver</a></li></ul>



<h2 class="wp-block-heading">How it works</h2>



<p class="wp-block-paragraph">VcXsrv starts up an X server on the Windows host machine, and what WSL will do is connect to this server to pass on the details of what programs need to be displayed (in this case, the browser window).  Geckodriver is there purely as a middle layer for Selenium to be able to interact with Firefox.</p>



<h2 class="wp-block-heading">VcXsrv setup</h2>



<p class="wp-block-paragraph">This setups the X server so that Windows can display graphical data coming from the Ubuntu instance.</p>



<ol class="wp-block-list"><li>Download and install</li><li>Start it up with the the command line parameter &#8220;-ac&#8221;.  This flag removes access control restrictions for connecting clients (which is okay as long as this server isn&#8217;t exposed on the open Internet and that the only client connecting is the Ubuntu instance)</li><li>Allow connections to VcXsrv on Windows Firewall</li></ol>



<p class="wp-block-paragraph">The &#8220;-ac&#8221; flag and allowing the program through Windows Firewall is pretty important.  When I didn&#8217;t do this, Ubuntu would give me cryptic error messages like &#8220;Broadway display type not supported&#8221;, but once I set up these access controls, everything was fine.</p>



<h2 class="wp-block-heading">Bash setup</h2>



<p class="wp-block-paragraph">Install firefox</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install firefox</code></pre>



<p class="wp-block-paragraph">Export DISPLAY variable in .bashrc (or for whatever terminal you use, maybe .zshrc, etc.)</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">export DISPLAY=$(ip route | awk '{print $3; exit}'):0</code></pre>



<p class="wp-block-paragraph">This will configure your DISPLAY variable to use the IP address listed in the resolv.conf file.  The IP address listed there is the IP address of the X server that will be used for displaying the browser window.</p>



<p class="wp-block-paragraph">Start up VcXsrv as described in the above and then try to open Firefox.  The Firefox window should open.</p>



<h2 class="wp-block-heading">Geckodriver setup</h2>



<p class="wp-block-paragraph">This acts purely as the API interface that allows Selenium to interact with Firefox.  Selenium looks for this executable when controlling the web browser.</p>



<ol class="wp-block-list"><li>Download geckodriver (make sure to get the Linux one and not the Windows one)</li><li>Put it in /usr/bin (or alternatively some other folder in your PATH)</li></ol>



<h2 class="wp-block-heading">Selenium sample on Python</h2>



<p class="wp-block-paragraph">I tend to use Python when running Selenium code, and I haven&#8217;t tried it on another language (I imagine the principles are similar).  Here is a piece of sample code for starting up the browser and opening up a website, but really any Selenium code can be used.</p>



<pre class="wp-block-code"><code lang="python" class="language-python">import time

from selenium import webdriver
from selenium.webdriver import DesiredCapabilities

def execute_with_retry(method, max_attempts):
    e = None
    for i in range(0, max_attempts):
        try:
            return method()
        except Exception as e:
            print(e)
            time.sleep(1)
    if e is not None:
        raise e

capabilities = DesiredCapabilities.FIREFOX
capabilities["marionette"] = True
firefox_bin = "/usr/bin/firefox"
browser = execute_with_retry(lambda: webdriver.Firefox(
    firefox_binary=firefox_bin, capabilities=capabilities), 10)

browser.get("https://www.google.com")

time.sleep(10)

browser.close()</code></pre>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2020/09/27/running-selenium-webdriver-on-wsl2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6269</post-id>	</item>
		<item>
		<title>Installing Seafile with Docker and Apache 2</title>
		<link>https://blog.henrypoon.com/blog/2019/06/12/installing-seafile-with-docker-and-apache-2/</link>
					<comments>https://blog.henrypoon.com/blog/2019/06/12/installing-seafile-with-docker-and-apache-2/#respond</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Wed, 12 Jun 2019 07:12:42 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[9]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache 2]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Chan]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[cloud storage]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Dia]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[DROPBOX]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[File sharing]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Gran]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Matt]]></category>
		<category><![CDATA[Nap]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[OS-level virtualisation]]></category>
		<category><![CDATA[Page]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[PATH]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[seafile]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Systemd]]></category>
		<category><![CDATA[Thou]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[USR]]></category>
		<category><![CDATA[ypres]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">https://blog.henrypoon.com/?p=3509</guid>

					<description><![CDATA[Seafile is an open source file sharing software that allows its users to setup their own cloud storage at home. Think Dropbox, but self-hosted. This post is about deploying an instance of Seafile using Docker on a non-standard port (i.e. not 80 and 443). The reason to deploy the app on a non-standard port is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><a rel="noreferrer noopener" aria-label="Seafile (opens in a new tab)" href="https://www.seafile.com" target="_blank">Seafile</a> is an open source file sharing software that allows its users to setup their own cloud storage at home.  Think Dropbox, but self-hosted.</p>



<p class="wp-block-paragraph">This post is about deploying an instance of Seafile using Docker on a non-standard port (i.e. not 80 and 443).  The reason to deploy the app on a non-standard port is usually because there is already another webserver running on that port (in my case Apache 2).  In such scenarios, it is necessary to set up a reverse proxy so the Seafile port can be exposed by Apache on ports 80/443.  Under typical circumstances, deploying Seafile on a standard port would mean that the app would host itself without the need for Apache 2 at all.  This post also assumes Ubuntu 16.04 as the operating system, but in theory should apply to other Linux OS&#8217;s.</p>



<p class="has-text-align-left wp-block-paragraph">The process can be split into multiple parts:</p>



<ol class="wp-block-list"><li>Setup Docker</li><li>Deploy Seafile</li><li>Configure Apache 2</li><li>Setup systemd</li><li>Setup e-mail (optional)</li><li>Backing up the image</li><li>Troubleshooting</li></ol>



<h2 class="wp-block-heading">Setup Docker</h2>



<p class="wp-block-paragraph">This guide won&#8217;t go into depth on how to setup Docker, but rather the setup guide and more information about what Docker is can be found here: <a rel="noreferrer noopener" aria-label="https://docs.docker.com/get-started/ (opens in a new tab)" href="https://docs.docker.com/get-started/" target="_blank">https://docs.docker.com/get-started/</a></p>



<h2 class="wp-block-heading">Deploy Seafile</h2>



<p class="wp-block-paragraph">The key page in the Seafile documentation for deploying Seafile within Docker can be found here: <a href="https://github.com/haiwen/seafile-docker" target="_blank" rel="noreferrer noopener">https://github.com/haiwen/seafile-docker</a>.  The command I used is as follows:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">docker run -d --name seafile \
  -e SEAFILE_SERVER_HOSTNAME=seafile.example.com \
  -e SEAFILE_ADMIN_EMAIL=me@example.com \
  -e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \
  -v /opt/seafile-data:/shared \
  -p 8000:80 \
  seafileltd/seafile:latest</code></pre>



<p class="wp-block-paragraph">I recommend setting up Seafile with an actual secret password because it&#8217;s not easy to change once it&#8217;s set up.</p>



<p class="wp-block-paragraph">Note that the port argument shows 8000:80.  It means that Docker will use the host port 8000 and the container will use port 80 &#8211; meaning that using Docker will interpret requests from my host OS on port 8000 as requests on port 80 in the container.  8000 was used on my setup because port 80 was already used. </p>



<p class="wp-block-paragraph">Once the command is executed, the necessary files will be downloaded and the container will start and will be accessible on port 8000.</p>



<p class="wp-block-paragraph">There is also an option to setup Seafile with an SSL cert from <a rel="noreferrer noopener" aria-label="Let's Encrypt (opens in a new tab)" href="https://letsencrypt.org/" target="_blank">Let&#8217;s Encrypt</a>, but I didn&#8217;t do this because I already had a cert that I wanted to reuse.</p>



<p class="wp-block-paragraph">Once the server is up, navigate to <a href="#">https://seafile.example.com/sys/settings/</a> and change SERVICE_URL and FILE_SERVER_URL to match your domain name.</p>



<h2 class="wp-block-heading">Configure Apache 2</h2>



<p class="wp-block-paragraph">Adding a reverse proxy on Apache 2 will allow Apache 2 to route requests to port 8000, which will go to port 80 in the container.  The main reference for this section is this: <a href="https://manual.seafile.com/deploy/deploy_with_apache/" target="_blank" rel="noreferrer noopener">https://manual.seafile.com/deploy/deploy_with_apache/</a>.  This is done by adding a new site to Apache 2.  The following configuration assumes that a LetsEncrypt SSL certificate is used.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cd /etc/apache2/sites-available
sudo nano seafile.conf</code></pre>



<pre class="wp-block-code"><code lang="apacheconf" class="language-apacheconf">&lt;IfModule mod_ssl.c&gt;
&lt;VirtualHost *:443&gt;
    ServerName seafile.example.com
    ServerAdmin me@example.com

    RewriteEngine On

    # ModSecurity does not process requests.  There is a hard limit of 1 GB
    # with ModSecurity.
    SecRuleEngine Off

    # Whitelist internal IPs for mod_evasive
    DOSWhitelist 192.168.1.*

    &lt;Location /media&gt;
        Require all granted
    &lt;/Location&gt;

    # Stuff for seafile server
    ProxyPass /seafhttp http://127.0.0.1:8082
    ProxyPassReverse /seafhttp http://127.0.0.1:8082
    RewriteRule ^/seafhttp - [QSA,L]

    # Stuff for seahub
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8000/
    ProxyPassReverse / http://127.0.0.1:8000/

    ErrorLog ${APACHE_LOG_DIR}/seafile_error.log
    CustomLog ${APACHE_LOG_DIR}/seafile_access.log combined

    Include /etc/letsencrypt/options-ssl-apache.conf

    SSLCertificateFile /path/to/cert/file.pem
    SSLCertificateKeyFile /path/to/cert/key/file.pem
&lt;/VirtualHost&gt;
&lt;/IfModule&gt;
</code></pre>



<p class="wp-block-paragraph">I&#8217;ve added my local domain to the whitelist so that mod_evasive doesn&#8217;t think my local host is a threat.</p>



<p class="wp-block-paragraph">There are two sets of ProxyPass and ProxyPassReverse lines.  The reason for this is that Seafile is split up into Seahub and Seafile, where one uses port 8082 (by default), while the other uses 8000.  These two lines are essentially what allows Apache to read requests from port 443 and pass them on to the container.</p>



<p class="wp-block-paragraph">Once the file is saved, execute the following</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo a2ensite seafile.conf
sudo service apache2 reload</code></pre>



<p class="wp-block-paragraph">Navigating to the site at the Apache 2 defined port should now load Seafile without having to go to port 8000.</p>



<h2 class="wp-block-heading">Setup systemd</h2>



<p class="wp-block-paragraph">systemd allows the Docker container to be started up on boot, and be controlled like this:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo service seafile start/stop/restart</code></pre>



<p class="wp-block-paragraph">The configuration is as follows:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo nano /etc/systemd/system/seafile.service</code></pre>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[Unit]
Description=Seafile Server
After=network.target mysql.service

[Service]
Type=oneshot
ExecStart=/usr/bin/docker container start seafile
ExecStop=/usr/bin/docker container stop seafile
ExecReload=/usr/bin/docker container restart seafile
RemainAfterExit=yes
User=root
Group=root

[Install]
WantedBy=multi-user.target</code></pre>



<p class="wp-block-paragraph">Once the configuration is saved, shut off the existing running instance of Seafile and then let systemd start it up for you.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl daemon-reload
sudo service seafile start</code></pre>



<p class="wp-block-paragraph">At this point, Seafile should start automatically on boot, with Apache 2 doing a reverse proxy to the true Seafile port.</p>



<h2 class="wp-block-heading">Setup e-mail (optional)</h2>



<p class="wp-block-paragraph">Optionally, Seafile can be configured to send e-mails.  The reference is here: <a href="https://manual.seafile.com/config/sending_email/" target="_blank" rel="noreferrer noopener">https://manual.seafile.com/config/sending_email/</a>.  The config file should be under:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">/opt/seafile-data/seafile/conf/seahub_settings.py</code></pre>



<p class="wp-block-paragraph">I happen to be using Gmail SMTP, so at the end of the file I&#8217;ve added</p>



<pre class="wp-block-code"><code lang="properties" class="language-properties">EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'me@example.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER</code></pre>



<h2 class="wp-block-heading">Backing up the image</h2>



<p class="wp-block-paragraph">After setting everything up, you&#8217;ll probably want to backup the Docker image.  First, print out the list of running containers</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker ps</code></pre>



<p class="wp-block-paragraph">Then take a snapshot of the current running state:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">docker commit -p &lt;container ID&gt; &lt;whatever you want to call this snapshot&gt;</code></pre>



<p class="wp-block-paragraph">Running this command lists all the images and should show this newly saved image:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker images</code></pre>



<p class="wp-block-paragraph">I don&#8217;t have a private docker repository, so I saved the image to the disk and backed up the file by doing the below.  Just make sure to actually move the image to an actual backup location.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker save -o &lt;whatever path you want&gt;/&lt;filename&gt;.tar &lt;the name used earlier&gt;</code></pre>



<p class="wp-block-paragraph">The image should be backed up now.  To restore the image, it&#8217;s a matter of running this:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker load -i &lt;path to the backup file&gt;</code></pre>



<p class="wp-block-paragraph">Listing the images as above should show that the image was successfully loaded.  Running this starts it back up again.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker run &lt;container name&gt;</code></pre>



<h2 class="wp-block-heading">Troubleshooting</h2>



<p class="wp-block-paragraph">Seafile logs can be helpful if it doesn&#8217;t start up correctly.  These can be found at:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">/opt/seafile-data/logs/seafile</code></pre>



<p class="wp-block-paragraph">There may be a need to ssh into the Docker container.  The command for that is:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker exec -it seafile /bin/bash</code></pre>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2019/06/12/installing-seafile-with-docker-and-apache-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3509</post-id>	</item>
		<item>
		<title>Moving an OS to another disk and still have it boot with Linux</title>
		<link>https://blog.henrypoon.com/blog/2016/01/28/moving-an-os-to-another-disk-and-still-have-it-boot-with-linux/</link>
					<comments>https://blog.henrypoon.com/blog/2016/01/28/moving-an-os-to-another-disk-and-still-have-it-boot-with-linux/#respond</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Fri, 29 Jan 2016 05:18:36 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Booting]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Contents]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Device file]]></category>
		<category><![CDATA[Disk partitioning]]></category>
		<category><![CDATA[Disk partitions]]></category>
		<category><![CDATA[Drive]]></category>
		<category><![CDATA[Final]]></category>
		<category><![CDATA[GNU GRUB]]></category>
		<category><![CDATA[GNU Parted]]></category>
		<category><![CDATA[GParted]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Multi-booting]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[Operating systems]]></category>
		<category><![CDATA[Plug]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Solid-state drive]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">https://blog.henrypoon.com/?p=2194</guid>

					<description><![CDATA[For the longest time, I&#8217;ve had an 80 GB HDD running my Windows partition (dual-boot setup with Ubuntu on a SSD), but now I&#8217;ve finally upgraded the Windows partition to an SSD as well. I looked into how to clone my Windows partition onto the SSD, such that I can still boot the disk. I [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">For the longest time, I&#8217;ve had an 80 GB HDD running my Windows partition (dual-boot setup with Ubuntu on a SSD), but now I&#8217;ve finally upgraded the Windows partition to an SSD as well. I looked into how to clone my Windows partition onto the SSD, such that I can still boot the disk.</p>



<p class="wp-block-paragraph">I already have Ubuntu as my main OS, so copying the disk was easy using <a href="http://linux.die.net/man/1/dd" target="_blank" rel="noopener noreferrer">dd</a>, which allows copying all the contents of one disk to another. This works well when the new hard drive is greater than or the same size as the current hard drive (I upgraded from a 80GB HDD to a 128GB SSD).</p>



<p class="wp-block-paragraph">First I run this to see which disk I am copying from and to</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">fdisk -l</code></pre>



<p class="wp-block-paragraph">Then I run dd. If I am copying from /dev/sda to /dev/sda, then it&#8217;s:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">dd if=/dev/sda of=/dev/sdb</code></pre>



<p class="wp-block-paragraph">But sometimes the disks don&#8217;t have the same size, so I used gparted to move/resize the partitions to make use of the extra space on the new disk. gparted complained that it might make my disk no bootable, but the disk was still bootable for me nonetheless. I didn&#8217;t even have to mess with any grub bootloader settings either. I simply unplugged the old disk, and left the new disk plugged in and booted into the new disk no problem.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2016/01/28/moving-an-os-to-another-disk-and-still-have-it-boot-with-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2194</post-id>	</item>
		<item>
		<title>Running League of Legends in PlayOnLinux (Ubuntu 14.04)</title>
		<link>https://blog.henrypoon.com/blog/2015/03/08/running-league-of-legends-in-playonlinux-ubuntu-14-04/</link>
					<comments>https://blog.henrypoon.com/blog/2015/03/08/running-league-of-legends-in-playonlinux-ubuntu-14-04/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Mon, 09 Mar 2015 01:45:11 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[9]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[Chan]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Comment]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Dia]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[Drive]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Icon]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[league of legends]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Light]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[lol]]></category>
		<category><![CDATA[Nap]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[NVIDIA]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[PATH]]></category>
		<category><![CDATA[Pawn]]></category>
		<category><![CDATA[PlayOnLinux]]></category>
		<category><![CDATA[Radeon HD 5000 Series]]></category>
		<category><![CDATA[Riot Games]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Struct]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Video cards]]></category>
		<category><![CDATA[Video gaming]]></category>
		<category><![CDATA[Vol]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[WINE]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">https://www.henrypoon.com/blog/?p=2053</guid>

					<description><![CDATA[There are various guides floating around on the Internet for running League of Legends on Linux, and no single guide worked for me, but after piecing the information together from various places, I managed to get it to work on my system. My computer specifications: Intel Core i5-4570 16 GB Memory Radeon HD 5770 I [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">There are various guides floating around on the Internet for running League of Legends on Linux, and no single guide worked for me, but after piecing the information together from various places, I managed to get it to work on my system.</p>



<p class="wp-block-paragraph">My computer specifications:</p>



<ul class="wp-block-list"><li>Intel Core i5-4570</li><li>16 GB Memory</li><li>Radeon HD 5770</li></ul>



<p class="wp-block-paragraph">I followed the instructions <a href="http://askubuntu.com/questions/459888/shop-and-in-game-item-shop-not-working-in-league-of-legend-lol/461256#461256" target="_blank" rel="noopener noreferrer">here</a>, with these changes:</p>



<ul class="wp-block-list"><li>Using video driver &#8220;fglrx-updates&#8221; (the tutorial talks about NVIDIA cards)</li><li>Did not install TuxLoL</li><li>Did not do anything regarding the &#8220;Maestro error&#8221; since it only applies to Optimus Notebook users</li><li>Did not follow step 6 because I did not run into the problem for big item icon text for the item shop</li><li>EDIT: Thanks to Ingvar&#8217;s comment, the installation progress for the game can be viewed like so: open terminal (Ctrl+Alt+T) and execute: </li></ul>



<pre class="wp-block-code"><code lang="bash" class="language-bash">tail -f ~/.PlayOnLinux/wineprefix/LeagueOfLegends/drive_c/Riot\ Games/League\ of\ Legends/Logs/Patcher\ Logs/*.log</code></pre>



<p class="wp-block-paragraph">There are also other steps that I had to do, which I read from <a href="https://www.playonlinux.com/en/app-1135-League_Of_Legends.html" target="_blank" rel="noopener noreferrer">here</a>:</p>



<ul class="wp-block-list"><li>Click configure for the &#8220;League of Legends&#8221; entry in &#8220;PlayOnLinux&#8221; and find the &#8220;Display&#8221; tab and then choose the following options: <ul><li>Direct Draw Renderer &#8211; gdi</li><li>Video memory size &#8211; 4096 (or something else depending on graphics card)</li><li>Offscreen rendering mode &#8211; fbo\0</li><li>Everything else on default </li></ul></li><li>Create a file called &#8220;game.cfg&#8221; in the directory &#8220;/home/your-username-here/PlayOnLinux&#8217;s virtual drives/LeagueOfLegends/drive_c/Riot Games/League of Legends/Config&#8221;. Below is what I have in my &#8220;game.cfg&#8221;:</li></ul>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[General]
EnableAudio=1
GameMouseSpeed=10
UserSetResolution=1
BindSysKeys=0
SnapCameraOnRespawn=0
OSXMouseAcceleration=1
AutoAcquireTarget=0
EnableLightFx=0
WindowMode=0
ShowTurretRangeIndicators=0
PredictMovement=0
WaitForVerticalSync=0
Colors=32
Height=1080
Width=1920
SystemMouseSpeed=0
CfgVersion=5.3.296
x3d_platform=1</code></pre>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[HUD]
CameraLockMode=0
MiddleClickDragScrollEnabled=0
KeyboardScrollSpeed=0.5000
ChatScale=50
ObjectTooltips=0
AutoDisplayTarget=0
ShowAllChannelChat=1
ShowTimestamps=1
ItemShopPrevY=39
ItemShopPrevX=106
NameTagDisplay=1
ShowChampionIndicator=0
ShowSummonerNames=1
ScrollSmoothingEnabled=0
MiddleMouseScrollSpeed=0.5000
MapScrollSpeed=0.5000
ShowAttackRadius=0
NumericCooldownFormat=1
SmartCastOnKeyRelease=0
EnableLineMissileVis=0
FlipMiniMap=1
ItemShopResizeHeight=0
ItemShopResizeWidth=164
ItemShopPrevResizeHeight=1080
ItemShopPrevResizeWidth=1920
ItemShopItemDisplayMode=1
ItemShopStartPane=1</code></pre>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[Performance]
CharacterInking=1
ShadowsEnabled=1
EnableHUDAnimations=0
PerPixelPointLighting=0
EnableParticleOptimizations=0
BudgetOverdrawAverage=0
BudgetSkinnedVertexCount=0
BudgetSkinnedDrawCallCount=0
BudgetTextureUsage=0
BudgetVertexCount=0
BudgetTriangleCount=0
BudgetDrawCallCount=0
EnableGrassSwaying=0
EnableFXAA=0
AdvancedShader=0
FrameCapType=6
GammaEnabled=0
Full3DModeEnabled=0
AutoPerformanceSettings=0
CharacterQuality=4
EffectsQuality=4
EnvironmentQuality=4
ShadowQuality=4
GraphicsSlider=6
paths=0</code></pre>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[FloatingText]
EnemyTrueDamageCritical_Enabled=1
EnemyMagicalDamageCritical_Enabled=1
EnemyPhysicalDamageCritical_Enabled=1
TrueDamageCritical_Enabled=1
MagicalDamageCritical_Enabled=1
PhysicalDamageCritical_Enabled=1
Countdown_Enabled=0
EnemyTrueDamage_Enabled=0
EnemyMagicalDamage_Enabled=0
EnemyPhysicalDamage_Enabled=0
TrueDamage_Enabled=0
MagicalDamage_Enabled=0
PhysicalDamage_Enabled=0
Score_Enabled=0
QuestComplete_Enabled=0
QuestReceived_Enabled=0
Disable_Enabled=0
Level_Enabled=0
Dodge_Enabled=0
Heal_Enabled=0
Special_Enabled=0
Invulnerable_Enabled=0
Debug_Enabled=0
Absorbed_Enabled=0
OMW_Enabled=0
EnemyCritical_Enabled=0
MagicCritical_Enabled=0
Critical_Enabled=0</code></pre>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[Volume]
SfxVolume=0.5
MasterVolume=0.5</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2015/03/08/running-league-of-legends-in-playonlinux-ubuntu-14-04/feed/</wfw:commentRss>
			<slash:comments>27</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2053</post-id>	</item>
		<item>
		<title>Running TurboTax 2014 in PlayOnLinux</title>
		<link>https://blog.henrypoon.com/blog/2015/03/07/running-turbotax-2014-in-playonlinux/</link>
					<comments>https://blog.henrypoon.com/blog/2015/03/07/running-turbotax-2014-in-playonlinux/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Sun, 08 Mar 2015 05:08:28 +0000</pubDate>
				<category><![CDATA[gaming]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[.exe]]></category>
		<category><![CDATA[9]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Drive]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Installation software]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[PlayOnLinux]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Shortcut]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[TurboTax]]></category>
		<category><![CDATA[UNC]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Installer]]></category>
		<category><![CDATA[WINE]]></category>
		<guid isPermaLink="false">https://www.henrypoon.com/blog/?p=2050</guid>

					<description><![CDATA[This guide describes how to run TurboTax 2014 in PlayOnLinux. &#160;The PlayOnLinux (in combination with WINE) software allows users to install Windows-based software. CAVEAT: NETFILE&#160;did not work for me. &#160;I had to submit my taxes through an installation done on Windows Install&#160;PlayOnLinux and then run it (e.g. starting it through the Terminal) sudo apt-get install [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This guide describes how to run TurboTax 2014 in <a href="https://www.playonlinux.com/en/" target="_blank" rel="noopener noreferrer">PlayOnLinux</a>. &nbsp;The PlayOnLinux (in combination with <a href="https://www.winehq.org/" target="_blank" rel="noopener noreferrer">WINE</a>) software allows users to install Windows-based software.</p>
<hr />
<p>CAVEAT: NETFILE&nbsp;did not work for me. &nbsp;I had to submit my taxes through an installation done on Windows</p>
<hr />
<ol>
<li>Install&nbsp;PlayOnLinux and then run it (e.g. starting it through the Terminal)</li>
</ol>
<pre>sudo apt-get install playonlinux</pre>
<ol start="2">
<li>Click &#8220;Tools&#8221; &gt; &#8220;Manage wine versions&#8221;</li>
<li>Choose 1.7.27 under &#8220;Available Wine versions&#8221; and then click the right arrow &#8220;&gt;&#8221;</li>
<li>Go through the steps in the installer and let it finish</li>
<li>Back in the PlayOnLinux main screen, click &#8220;Install&#8221; in the menu, and then click &#8220;Install a non-listed program&#8221; on the bottom left</li>
<li>Choose &#8220;Use another version of Wine&#8221;, when asked, and then choose 1.7.27</li>
<li>Choose &#8220;Install a program in a new virtual drive&#8221;, when asked</li>
<li>Choose &#8220;32 bits windows installation&#8221;, when asked</li>
<li>Find the location of setup.exe for the TurboTax installer (I copied the files off of the disc to a place on my hard drive)</li>
<li>Ignore the message &#8220;Error in FS_Check&#8221; if it appears</li>
<li>Let the install complete, but do not launch TurboTax right away</li>
<li>Choose &#8220;tt2014.exe&#8221;, if asked to create a shortcut</li>
<li>Back in the PlayOnLinux main screen, select entry for TurboTax and click &#8220;Configure&#8221; in the menu</li>
<li>Make sure the &#8220;Wine version&#8221; is set to 1.7.27</li>
<li>Under &#8220;Install components&#8221;, install the following in this order (some of these may not be required, but I don&#8217;t know which since this is the configuration that worked for me):
<ul>
<li>vcrun2012</li>
<li>Microsoft Core Fonts</li>
<li>msvc100</li>
<li>RegisterFonts</li>
<li>vcrun2010</li>
<li>dotnet40</li>
<li>d3dx9</li>
<li>mono28</li>
<li>Internet Explorer 8 (click &#8220;Restart&#8221; in the installer)</li>
<li>crypt32</li>
</ul>
</li>
<li>Back in the PlayOnLinux main screen, clicking &#8220;Run&#8221; for TurboTax 2014 should now work!</li>
</ol>
<p>This is what worked for me, so hopefully this will work for others.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2015/03/07/running-turbotax-2014-in-playonlinux/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2050</post-id>	</item>
		<item>
		<title>Deleted IME&#8217;s still appear in the list even though they have been removed in Ubuntu 14.04</title>
		<link>https://blog.henrypoon.com/blog/2015/02/15/deleted-imes-still-appear-in-the-list-even-though-they-have-been-removed-in-ubuntu-14-04/</link>
					<comments>https://blog.henrypoon.com/blog/2015/02/15/deleted-imes-still-appear-in-the-list-even-though-they-have-been-removed-in-ubuntu-14-04/#respond</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Mon, 16 Feb 2015 04:30:16 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[Chinese input methods for computers]]></category>
		<category><![CDATA[Configuration management]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Dconf]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Japan]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Thou]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.henrypoon.com/blog/?p=2046</guid>

					<description><![CDATA[I had this weird problem when my Japanese and Chinese IME stayed in my IME list even though I had removed them. &#160;It was driving me nuts, but it turns out that they can be disabled through the dconf-editor First, run: Navigate to: Bold options are options that have been modified. &#160;The interesting one is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I had this weird problem when my Japanese and Chinese IME stayed in my IME list even though I had removed them. &nbsp;It was driving me nuts, but it turns out that they can be disabled through the dconf-editor</p>



<p class="wp-block-paragraph">First, run:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt-get install dconf-editor</code></pre>



<p class="wp-block-paragraph">Navigate to:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">org/gnome/desktop/applications/input-sources</code></pre>



<p class="wp-block-paragraph">Bold options are options that have been modified. &nbsp;The interesting one is the row labeled &#8220;sources&#8221;. &nbsp;Clear the entries of the IME&#8217;s that should not appear in the list and that should remove the IME&#8217;s that shouldn&#8217;t be appearing.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2015/02/15/deleted-imes-still-appear-in-the-list-even-though-they-have-been-removed-in-ubuntu-14-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2046</post-id>	</item>
		<item>
		<title>Running LINE Messenger in Ubuntu 14.04</title>
		<link>https://blog.henrypoon.com/blog/2015/02/09/running-line-messenger-in-ubuntu-14-04/</link>
					<comments>https://blog.henrypoon.com/blog/2015/02/09/running-line-messenger-in-ubuntu-14-04/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Mon, 09 Feb 2015 22:25:38 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[9]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[BackSlash Linux]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Chrome OS]]></category>
		<category><![CDATA[Computer architecture]]></category>
		<category><![CDATA[Computing platforms]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lubuntu]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[Operating systems]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Thou]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WINE]]></category>
		<guid isPermaLink="false">https://www.henrypoon.com/blog/?p=2039</guid>

					<description><![CDATA[LINE is a messaging program kind of like WhatsApp, but it has a desktop client. &#160;However, this desktop client only runs on Windows. &#160;On Linux, it has to run under Wine, which&#160;allows running Windows programs (some) inside the Linux environment. &#160;Caveat: sending stickers does not appear to work. UPDATE 7. JULY 2015: Since this post, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">LINE is a messaging program kind of like WhatsApp, but it has a desktop client. &nbsp;However, this desktop client only runs on Windows. &nbsp;On Linux, it has to run under <a href="https://www.winehq.org/" target="_blank" rel="noopener noreferrer">Wine</a>, which&nbsp;allows running Windows programs (some) inside the Linux environment. &nbsp;Caveat: sending stickers does not appear to work.</p>



<p class="wp-block-paragraph">UPDATE 7. JULY 2015: Since this post, my version of LINE has been updated to 4.0.3.367, and it looks like stickers work now!</p>



<p class="wp-block-paragraph"><span style="color: #ff0000;">UPDATE 31. JULY 2016: Looks like in July 2015, LINE released a Chrome app.  Users of Chrome can just use that extension instead of using this method:</span> <a href="https://chrome.google.com/webstore/detail/line/ophjlpahpchlmihnnnihgmmeilfjmjjc" target="_blank" rel="noreferrer noopener">Link</a></p>



<p class="wp-block-paragraph">Running LINE in Ubuntu 14.04</p>



<ol class="wp-block-list"><li>Install Wine</li></ol>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt-get install wine</code></pre>



<ol class="wp-block-list" start="2"><li>Install VC++ 2008 Redistributable</li></ol>



<pre class="wp-block-code"><code lang="bash" class="language-bash">winetricks vcrun2008</code></pre>



<ol class="wp-block-list" start="3"><li>Download and install <a href="http://line.me/en-US/download" target="_blank" rel="noopener noreferrer">LINE</a> for Windows</li></ol>



<p class="wp-block-paragraph">Without installing the VC++ 2008 Redistributable, LINE would intermittently crash (even though it was able to start correctly). &nbsp;This worked on my Ubuntu 14.04 x64 system.</p>



<p class="wp-block-paragraph">LINE Version: 3.9.1.188<br>Wine Version: 1.6.2</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2015/02/09/running-line-messenger-in-ubuntu-14-04/feed/</wfw:commentRss>
			<slash:comments>26</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2039</post-id>	</item>
		<item>
		<title>Disabling Mouse Acceleration in Ubuntu</title>
		<link>https://blog.henrypoon.com/blog/2015/01/25/disabling-mouse-acceleration-in-ubuntu/</link>
					<comments>https://blog.henrypoon.com/blog/2015/01/25/disabling-mouse-acceleration-in-ubuntu/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Sun, 25 Jan 2015 08:31:32 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[AWK]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Computer mice]]></category>
		<category><![CDATA[Computer mouse]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Counter-Strike]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Digital technology]]></category>
		<category><![CDATA[DirectInput]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mass]]></category>
		<category><![CDATA[mouse acceleration]]></category>
		<category><![CDATA[Plan]]></category>
		<category><![CDATA[Plug]]></category>
		<category><![CDATA[Programming languages]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Trac]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://www.henrypoon.com/blog/?p=1955</guid>

					<description><![CDATA[I&#8217;ve been quite accustomed to disabling mouse acceleration on my Windows machine (thanks to playing massive amounts of Counter-Strike back in the day), but now that I&#8217;ve started to use Linux a bit more, I&#8217;ve found that disabling mouse acceleration was not as easy as in Windows. Script I&#8217;ve managed to produce a script to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I&#8217;ve been quite accustomed to disabling mouse acceleration on my Windows machine (thanks to playing massive amounts of Counter-Strike back in the day), but now that I&#8217;ve started to use Linux a bit more, I&#8217;ve found that disabling mouse acceleration was not as easy as in Windows.</p>



<h1 class="wp-block-heading">Script</h1>



<p class="wp-block-paragraph">I&#8217;ve managed to produce a script to disable mouse acceleration (works for me on Ubuntu 14.04).  However, this script needs to be run every time the computer boots because the settings don&#8217;t stay.  Here is the script:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#wait for the desktop to settle
sleep 5

#gets the hardware id's of all mice plugged into the system
hardwareIds=$(xinput | grep -i mouse | awk '{print substr($(NF-3),4)}')

#turn off mouse acceleration
for i in $hardwareIds
do
xinput set-prop ${i} 'Device Accel Profile' -1
xinput set-prop ${i} 'Device Accel Velocity Scaling' 1
done</code></pre>



<h1 class="wp-block-heading">Explanation</h1>



<p class="wp-block-paragraph">The script works by extracting the hardware id&#8217;s of the mice that are connected to the system and then applying properties to them that disable mouse acceleration for that device.  The extraction of the mouse hardware id&#8217;s are done with this:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#gets the hardware id's of all mice plugged into the system
hardwareIds=$(xinput | grep -i mouse | awk '{print substr($(NF-3),4)}')</code></pre>



<p class="wp-block-paragraph">Calling xinput in the Terminal will list all the connected input devices, which is grepped (case insensitively) for the word &#8220;mouse&#8221;, which gives something like this on my machine:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>⎜ ↳ Logitech G500s Laser Gaming Mouse id=14 [slave pointer (2)]<br>⎜ ↳ Logitech G500s Laser Gaming Mouse id=15 [slave pointer (2)]</p></blockquote>



<p class="wp-block-paragraph">The call to awk extracts the hardware id&nbsp;from those two lines (14, 15 in the above case) and stores them in an array that is iterated through when setting the mouse properties.</p>



<h1 class="wp-block-heading">Reference</h1>



<p class="wp-block-paragraph">This is the website that showed me how to disable mouse acceleration to begin with:&nbsp;<a href="http://ubuntuforums.org/showthread.php?t=1734400" target="_blank" rel="noopener noreferrer">http://ubuntuforums.org/showthread.php?t=1734400</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2015/01/25/disabling-mouse-acceleration-in-ubuntu/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1955</post-id>	</item>
		<item>
		<title>My Brief Experience with iPodLinux and Rockbox</title>
		<link>https://blog.henrypoon.com/blog/2009/12/09/my-brief-experience-with-ipodlinux-and-rockbox/</link>
					<comments>https://blog.henrypoon.com/blog/2009/12/09/my-brief-experience-with-ipodlinux-and-rockbox/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Wed, 09 Dec 2009 19:39:58 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Counter-Strike]]></category>
		<category><![CDATA[Custom firmware]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Disk file systems]]></category>
		<category><![CDATA[Disk partitioning]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Environment variable]]></category>
		<category><![CDATA[Final]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Search]]></category>
		<category><![CDATA[Grab]]></category>
		<category><![CDATA[id software]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IPod]]></category>
		<category><![CDATA[IPod software]]></category>
		<category><![CDATA[IPodLinux]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[ITunes]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Light]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Matt]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Operating systems]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[Portable media players]]></category>
		<category><![CDATA[RAR]]></category>
		<category><![CDATA[Rockbox]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Songs]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Struct]]></category>
		<category><![CDATA[System software]]></category>
		<category><![CDATA[Thou]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[UNC]]></category>
		<category><![CDATA[Variable]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows XP]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">http://henrypoon.mooo.com/blog/my-brief-experience-with-ipodlinux-and-rockbox</guid>

					<description><![CDATA[Sometime in 2005 I saw a video of someone playing Half-Life on an iPod and I thought it was kind of cool that it was possible.&#160; I found out that the person was running Linux on their iPod with id Software&#8217;s Doom installed (a version ported to the iPod).&#160; I also found out that Linux [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Sometime in 2005 I saw a video of someone playing Half-Life on an iPod and I thought it was kind of cool that it was possible.&nbsp; I found out that the person was running Linux on their iPod with id Software&#8217;s Doom installed (a version ported to the iPod).&nbsp; I also found out that Linux on an iPod comes in two flavors: <a title="iPodLinux" href="http://www.ipodlinux.org/" target="_blank" rel="noopener noreferrer">iPodLinux</a> and <a title="Rockbox" href="http://www.rockbox.org/" target="_blank" rel="noopener noreferrer">Rockbox</a>.&nbsp; I decided to try both.&nbsp; I started with iPodLinux.</p>
<h3>iPod Linux</h3>
<p>The installation of iPodLinux requires the user to download the source code from their Subversion Repository and then compile it.&nbsp; There were binaries available for download, but those were two years out of date.&nbsp; Downloading the source code required the installation of an SVN client, and compiling the source code required the installation of Qt with MinGW.&nbsp; I ran into a slight snag here as the installation guide on their site neglected to tell me that Qt would not set the system environment variables needed in order for me to follow the instructions in the guide as is.&nbsp; Typing &#8220;qmake&#8221; kept giving me &#8220;qmake is not recognized&#8221; error in the Windows command line.&nbsp; Once I set up the environment variables, I was able to compile the source code.</p>
<p>After compiling the code, I went onto installation.&nbsp; Whenever I tried to install iPodLinux, the installer would close while trying to partition my iPod.&nbsp; As a result, my iPod was left half partitioned with no OS.&nbsp; I had to restore my iPod with iTunes every time this happened.&nbsp; I figured it was because I was using Windows 7 Pro x64.&nbsp; Even after setting compatibility options and running as administrator, the installer wouldn&#8217;t work.&nbsp; I then repeated everything I had done so far on a Windows XP Pro machine and was finally able to install iPodLinux.</p>
<p>The next step was to boot the OS for the first time.&nbsp; While loading the different modules, the OS would complain about how some modules were didn&#8217;t exist or my iPod had run out of memory.&nbsp; Then the iPod later got stuck while initializing some module called &#8220;MPDc&#8221;.&nbsp; So what I tried to do next was to install iPodLinux without this module.&nbsp; Stupidly enough, the installer refused to let me uncheck any of the options while clearly stating that I could uncheck certain ones if I didn&#8217;t want them.&nbsp; What I don&#8217;t get is why I&#8217;m getting all these errors with my iPod when the developers state that my 5th gen iPod Video is supported.&nbsp; Maybe I&#8217;m missing something?</p>
<p>Then I found out about the ZeroSlackr Project, which is supposed to provide a &#8220;simple, coherent, easy-to-use and newbie friendly method of installing iPodLinux on iPods&#8221;.&nbsp; After downloading, first thing I did was look at the readme&#8217;s to see how to install it.&nbsp; I opened up the readme and it gave me the worst formatting I&#8217;d ever seen in a text file.&nbsp; There were no line breaks.&nbsp; Rather than searching through this wall of text I just looked up how to install it on Google.&nbsp; I opened the batch file included with the install files and it gave me a message saying installation successful and that I could now boot ZeroSlackr from my iPod.&nbsp; I took out the iPod and booted it up just to see no option for ZeroSlackr in the Bootloader.&nbsp; Maybe I did something wrong.</p>
<p>I also tried a program called iPod Manager 2.0.5, but it didn&#8217;t even open no matter how many times I tried to open it.</p>
<p>Afterward, I figure I could use a program to see the ext2 partition that iPodLinux makes and delete the modules manually from there.&nbsp; Browsing the iPodLinux forums and Google searches led me to a program called LTOOLS.&nbsp; It was supposedly able to let me modify the ext2 partition.&nbsp; No luck with that either.&nbsp; I kept getting stopped by the &#8220;Windows could not find file specified&#8221; error whenever&nbsp; I tried to look in the ext2 partition.&nbsp; Next program I tried was Ext2 IFS for Windows.&nbsp; I&#8217;ve used this program successfully in the past to grab files from my Ubuntu partition.&nbsp; For some reason this program didn&#8217;t work either.&nbsp; Luckily using my Ubuntu 8.04 Live CD to open the ext2 partition on the iPod worked for me.&nbsp; The ext2 and the FAT32 partition appeared right away in Ubuntu and all I had to do was do a &#8220;gksudo nautilus&#8221; to delete the files I didn&#8217;t want.</p>
<p>After removing the problematic modules, I finally loaded up the OS.&nbsp; However, the moment I selected any menu option, the iPod would freeze.&nbsp; I waited about 30 seconds with no response.&nbsp; This problem is probably quite beyond me so I stopped here.</p>
<h3>Rockbox</h3>
<p>The thing I liked the most out of Rockbox is that the installation of it worked, without any hassles.&nbsp; All I did was download it, double click, follow the instructions and then bam it worked.&nbsp; It also installs without requiring you to partition your iPod to ext2.&nbsp; As a result, I could access the Rockbox files easily within Windows.&nbsp; I loaded up iTunes and it was still able to sync my stuff onto it.</p>
<p>Once I synced my music onto the iPod again, I tried playing music with it.&nbsp; Without looking at the manual, I could not use my library as one huge playlist.&nbsp; I find that if using the interface on an mp3 player needs a manual for people to know whats going on, its probably too complex.&nbsp; Take the iPod interface for example.&nbsp; It is very intuitive.&nbsp; There was virtually no learning curve in figuring out how to use it.</p>
<p>Another thing that really annoyed me on Rockbox is that even after setting the language options, I still was not able to see Chinese ID3 tags on songs.&nbsp; How am I supposed to be able to choose a song if I can&#8217;t see the title?</p>
<p>What I did like about Rockbox are the apps.&nbsp; I know iPodLinux has them too, but seeing that I never got past the freezing problem, I couldn&#8217;t try them out.&nbsp; My favorite was RockDoom.&nbsp; Being able to play a classic game like that on an iPod made me feel a bit nostalgic.</p>
<h3>Conclusions</h3>
<p>iPodLinux needs a little bit more work in making installation of the OS easier.&nbsp; To be specific, their documentation needs to add solutions for problems like the one I mentioned before.&nbsp; It should also let people uncheck things in the installer.&nbsp; And most important of all, it should work without freezing up all the time.&nbsp; If all 5th gen iPod Videos are standard, then if I have a problem on mine, wouldn&#8217;t that mean everyone else&#8217;s 5G iPod will have problems with it?</p>
<p>Really, I liked everything about Rockbox except its interface and its lack of support for seeing Chinese characters.&nbsp; I was even able to play a Counter-Strike mod for RockDoom.&nbsp; I thought that was fantastic.</p>
<p>There are probably also some fixes out there that I don&#8217;t know about that can solve my problems, but seeing that I only used iPodLinux and Rockbox so briefly, I probably never came across those fixes.&nbsp; I also feel that the sorts of problems I had should not need fixes, but rather they shouldn&#8217;t occur at all.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2009/12/09/my-brief-experience-with-ipodlinux-and-rockbox/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">109</post-id>	</item>
		<item>
		<title>Qt Environment Variables</title>
		<link>https://blog.henrypoon.com/blog/2009/12/06/qt-environment-variables/</link>
					<comments>https://blog.henrypoon.com/blog/2009/12/06/qt-environment-variables/#respond</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Sun, 06 Dec 2009 10:20:14 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Compilers]]></category>
		<category><![CDATA[Control Panel]]></category>
		<category><![CDATA[Custom firmware]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Digital audio players]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Environment variable]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IPod]]></category>
		<category><![CDATA[IPod Nano]]></category>
		<category><![CDATA[IPod Shuffle]]></category>
		<category><![CDATA[IPod software]]></category>
		<category><![CDATA[IPodLinux]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[ITunes]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[Page]]></category>
		<category><![CDATA[PATH]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[Portable media players]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Struct]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Trac]]></category>
		<category><![CDATA[UNC]]></category>
		<category><![CDATA[Variable]]></category>
		<category><![CDATA[Vol]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://henrypoon.mooo.com/blog/qt-environment-variables</guid>

					<description><![CDATA[A long time ago I had come across a project that involved porting Linux on the iPod called iPodLinux (read more at the link).&#160; It basically adds additional functionality than that of regular iPods such as the use of third party apps such as gameboy and NES emulators.&#160; Seeing that I like to mess with [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">A long time ago I had come across a project that involved porting Linux on the iPod called <a title="iPodLinux" href="http://www.ipodlinux.org/" target="_blank" rel="noopener noreferrer">iPodLinux</a> (read more at the link).&nbsp; It basically adds additional functionality than that of regular iPods such as the use of third party apps such as gameboy and NES emulators.&nbsp; Seeing that I like to mess with these things, I decided to try it out.&nbsp; According to their website,</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>iPodLinux currently works on all iPod generations with the <strong>exception</strong> of the 2nd/3rd/4th generation iPod nano, 6th generation iPod classic, all iPod shuffles and the iPod Touch. Donations always help when it comes to supporting new hardware. Progress can be tracked on the Project Status.</p></blockquote>



<p class="wp-block-paragraph">The installation of iPodLinux is somewhat tedious.  They recommend that you download the source code and compile them yourself (instructions on the site), which is what I&#8217;m doing right now.  Compiling the source code requires a program called Qt.  I downloaded the <a href="https://download.qt.io/archive/qt/4.3/" target="_blank" rel="noreferrer noopener">Qt4 + MinGW installer</a> to compile the code.  However, when trying to compile the code using &#8220;qmake&#8221;, Windows did not let me run the program.</p>



<p class="wp-block-paragraph">Apparently the source of the problem is that my environment variables were not set properly.</p>



<p class="wp-block-paragraph">The environment variables settings page can be found in Control Panel &gt; System &gt; Advanced System Settings &gt; Environment Variables.&nbsp; Click the New&#8230; button.</p>



<p class="wp-block-paragraph">Here are the required environment variables:</p>



<p class="wp-block-paragraph">Variable Name: PATH (should exist already)<br>Variable Value: <code>C:\MinGW\bin</code> and <code>C:\Qt4.x.x\bin</code></p>



<p class="wp-block-paragraph">Variable Name: QTDIR<code><br></code>Variable Value: <code>C:\Qt4.x.x (whatever your version is)</code></p>



<p class="wp-block-paragraph">Variable Name: QMAKESPEC<br>Variable Value: <code>win32-g++</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2009/12/06/qt-environment-variables/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">99</post-id>	</item>
	</channel>
</rss>
