tag:blogger.com,1999:blog-68965605736858783412024-03-05T17:40:13.004+08:00Ubuntu Tips and TricksUbuntu Linux Tips and Tricks, and some rants on Linux in general0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.comBlogger56125tag:blogger.com,1999:blog-6896560573685878341.post-36610191728773539572016-05-08T19:52:00.001+08:002016-05-08T19:52:06.109+08:00How to Remove Old Linux KernelsSometimes /boot is so limited, and tend to forget to do housekeeping. Here goes<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">dpkg --list | grep linux-image |awk {'print $2'}|grep -v "`uname -r`\|linux-image-generic"|xargs apt-get purge -y</span>0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-83808944718833614052014-03-26T10:30:00.001+08:002014-03-26T10:30:21.600+08:00Disable touchpad for laptop I got problem with my touchpad.. it let the cursor jumping here and there .. so it's very annoying.<br />
<br />
Here is the tips that I found out from the Internet<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">xinput list | perl -ne 'if ($_ =~ /Synaptics/) {exec "xinput","set-prop",substr($_,3+index($_,"id="),2),"Device Enabled","0"}'</span><br />
<br />
You may change /Synaptics/ with any value that pointed to your device from "xinput list" command0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-33035459105200414752014-03-26T10:27:00.001+08:002014-03-26T10:27:12.926+08:00Move windows control (min, max, close) button to the rightWorked from 12.04 - 13.10 (the original author said this, I tested on 13.10 and worked)<br />
<br />
<pre style="background-color: #eeeeee; border: 0px; color: #333333; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 18.200000762939453px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'</code></pre>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-74772210672873985362013-12-21T14:59:00.001+08:002013-12-21T14:59:19.674+08:00Borked with Error during Make Menuconfig in Kernel Compile?<span style="font-family: inherit;">Just</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">sudo apt-get install lib32ncurses5-dev</span><br />And it'll insya Allah, works!<span style="background-color: #e6e6e6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: #e6e6e6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"><a href="https://groups.google.com/forum/#!msg/android-x86/_y2D1zo11so/6GI1wrc19X8J" target="_blank">source</a></span>0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-44374565432456300772013-12-11T07:33:00.000+08:002013-12-11T07:33:11.543+08:00Touchpad Tidak Berfungsi Selepas Upgrade 12.04LTSSaya mengalami masalah untuk menggunakan touchpad selepas proses kemaskini pakej dalam Ubuntu 12.04 LTS saya<br />
<br />
Berikut adalah arahan yang saya guna sebagai "root"<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"># modprobe -r psmouse</span><br />
<span style="font-family: Courier New, Courier, monospace;"># modprobe psmouse proto=imps</span><br />
<div>
<br /></div>
<div>
<br /></div>
<div>
Dan ianya berfungsi seperti sediakala.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<a href="http://ubuntuforums.org/showthread.php?t=1971196" target="_blank">sumber</a></div>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com1tag:blogger.com,1999:blog-6896560573685878341.post-49757688577162019602013-11-15T11:07:00.001+08:002013-11-15T11:07:14.493+08:00Modifying an erroneous visudo file and cannot get into sudo I recently modified the visudo file and turns out I can't get into visudo mode at all. Worst is that in Ubuntu 12.04 we can't use "su" command or log in as "root"<br />
<br />
Here is the tips, from <a href="http://askubuntu.com/questions/73864/how-to-modify-a-invalid-etc-sudoers-file-it-throws-out-an-error-and-not-allowi" target="_blank">here</a><br />
<br />
Use pkexec command,<br />
<br />
Just type "<span style="font-family: Courier New, Courier, monospace;">pkexec visudo</span>"<br />
<br />
And modify or restore back to the original settings.<br />
<br />
<br />0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-36160499421164628022013-11-14T20:13:00.000+08:002013-11-14T20:13:01.382+08:00Disable auto mount from USB device I have a problem with my Galaxy Nexus before and now my LG Nexus 4 - they keep pop up the nautilus if I insert the plug to the cable (I prefer charging my phone to the laptop).<br />
<br />
So here is the solution, which finally I found from <a href="https://help.ubuntu.com/community/Mount/USB" target="_blank">here</a><br />
<br />
<br />
Go to your terminal, type dconf-editor. The find "<strong style="background-color: white; border: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; line-height: 1; margin: 0px; padding: 0px; vertical-align: baseline;">org.gnome.desktop.media-handling.automount-open"</strong><br />
<strong style="background-color: white; border: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; line-height: 1; margin: 0px; padding: 0px; vertical-align: baseline;"><br /></strong>
And choose your preferred choice, mine is like this:<span style="color: #333333; font-family: Ubuntu, Ubuntu Beta, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 13px;"><b><br /></b></span></span>
<span style="color: #333333; font-family: Ubuntu, Ubuntu Beta, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 13px;"><b><br /></b></span></span>
<span style="color: #333333; font-family: Ubuntu, Ubuntu Beta, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 13px;"><b><br /></b></span></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrmoUtzzdAkLIVIS-t_yQeWMg8y-kGGhZh0sUbZacDZn5rJR5b8vHwKv0Bqsjb55HgEAYSCVHc5V7STaFjbau8Y6bfVpfYs19-oznqfPh5ocU3vzgEWRBgsnh5AG7rW-Mxex3-KZsB8iT/s1600/automount.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="416" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrmoUtzzdAkLIVIS-t_yQeWMg8y-kGGhZh0sUbZacDZn5rJR5b8vHwKv0Bqsjb55HgEAYSCVHc5V7STaFjbau8Y6bfVpfYs19-oznqfPh5ocU3vzgEWRBgsnh5AG7rW-Mxex3-KZsB8iT/s640/automount.png" width="640" /></a></div>
<span style="color: #333333; font-family: Ubuntu, Ubuntu Beta, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 13px;"><b><br /></b></span></span>
<span style="color: #333333; font-family: Ubuntu, Ubuntu Beta, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 13px;"><b><br /></b></span></span>
<br /><br />As I prefer the phone being automounted, I just feel annoyed with the nautilus pop up, hence I untick "automount-open" but choose "automount" and "autorun-never" instead.<br /><br />I feel the autorun function is so Windowish.. and wondering why it ever exists. Not that it is bad.. but for me it is less preferred.0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-22085494617382634542013-03-27T10:48:00.003+08:002013-03-27T10:48:31.600+08:00Changing Maximize, Minimize and Close Button from Left to Right in UnityI am currently back to Ubuntu 12.04 due to stability issue with 12.10<br />
<br />
But the problem is with the buttons. So here goes<br />
<br />
<br />
<span style="background-color: #ebece4; font-family: Ubuntubeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; line-height: 15px;">gconftool-2 --set "/apps/metacity/general/button_layout" --type string ":minimize,maximize,close"</span><br />
<br />
<br />
<br />
This will set these buttons to right pane of your windows :)<div>
<br /></div>
<div>
simplified from <a href="http://ubuntuforums.org/showthread.php?t=1992987" target="_blank">here</a><br /><span style="font-family: Ubuntubeta, Ubuntu, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 15px;"><br /></span></span>
<span style="font-family: Ubuntubeta, Ubuntu, Bitstream Vera Sans, DejaVu Sans, Tahoma, sans-serif; font-size: x-small;"><span style="line-height: 15px;"><br /></span></span></div>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-64793934260484996802013-03-15T10:17:00.003+08:002013-03-15T10:17:51.243+08:00Customizing Workspace Navigation Shortcuts Using GsettingsI got a problem in my Ubuntu 12.04 LTS, since the configuration that I saved using the gnome-setting interface did not worked (as if it was never saved).<br />
<br />
So I decided to google around and found this tips which I already customized to my enviroment:<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;"><alt><br />gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "[\"<alt>Q\"]"<br />gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "[\"<alt>W\"]"<br />gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "[\"<alt>E\"]"<br />gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "[\"<alt>R\"]"</alt></alt></alt></alt></alt></span></blockquote>
<br />
<br />
Here, I used Alt with <q> for workspace 1-4</q><br />
<br />
<br />0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-87124063153415753422013-01-03T10:33:00.002+08:002013-01-03T10:33:13.452+08:00Ubuntu PhoneMark Shuttleworth recently presented the release of Ubuntu phone. Hope to see this in Malaysia soon!<br />
<br />
<a href="http://www.ubuntu.com/devices/phone" target="_blank">source</a>0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com1tag:blogger.com,1999:blog-6896560573685878341.post-20446279705221608632012-11-20T12:24:00.002+08:002012-11-20T12:24:23.597+08:00Finding fastest mirror on QuantalPut these lines inside your /etc/apt/source.list<br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">deb mirror://mirrors.ubuntu.com/mirrors.txt quantal main restricted universe multiverse</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">deb mirror://mirrors.ubuntu.com/mirrors.txt quantal-updates main restricted universe multiverse</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">deb mirror://mirrors.ubuntu.com/mirrors.txt quantal-backports main restricted universe multiverse</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">deb mirror://mirrors.ubuntu.com/mirrors.txt quantal-security main restricted universe multiverse</span><br />
<div>
<br /></div>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-39069208282920216532012-11-11T22:21:00.003+08:002012-11-11T22:22:19.644+08:00MATE desktop environment untuk Ubuntu 12.10 QuantalCinnamon telah diulas di <a href="http://ubuntu-my.blogspot.com/2012/11/cinnamon-untuk-ubuntu-1210-quantal.html" target="_blank">sini</a><br />
<br />
Untuk MATE, pilih salah satu mirror;<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">sudo add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu quantal main"</span><br />
<div>
<br /></div>
<div>
ATAU </div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">sudo add-apt-repository "deb http://repo.mate-desktop.org/ubuntu quantal main"</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Kemudian;</div>
<div>
<br /></div>
<div>
<pre class="code bash" style="background-color: #f7f9fa; border: 1px dashed rgb(191, 191, 191); font-family: monospace, serif; font-size: 13px; margin-bottom: 1em; overflow: auto; padding: 0.5em; text-align: justify;"><span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">sudo</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">apt-get</span> update
<span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">sudo</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">apt-get</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">install</span> mate-archive-keyring
<span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">sudo</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">apt-get</span> update
<span class="co0" style="color: grey; font-style: italic; margin: 0px; padding: 0px;"># ini akan pasang pakej asas</span>
<span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">sudo</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">apt-get</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">install</span> mate-core
<span class="co0" style="color: grey; font-style: italic; margin: 0px; padding: 0px;"># ini akan pasang pakej lanjutan</span>
<span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">sudo</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">apt-get</span> <span class="kw2" style="font-weight: bold; margin: 0px; padding: 0px;">install</span> mate-desktop-environment</pre>
<a href="http://wiki.mate-desktop.org/download?&#ubuntu_quantal_quetzal_1210_repository" target="_blank">sumber</a></div>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-59735954506211373542012-11-11T10:10:00.004+08:002012-11-11T10:10:49.454+08:00Cinnamon untuk Ubuntu 12.10 QuantalBagi pengguna Cinnamon seperti saya (yang biasa menggunakan environment ini di dalam Linux Mint), tentunya menginginkan kosmetik yang sama di dalam Ubuntu 12.10<br />
<br />
Ia boleh diperolehi dari laman PPA di <a href="http://www.ubuntuupdates.org/ppa/gwendal_le_bihan_dev_cinnamon_stable" target="_blank">sini</a><br />
<br />
Secara ringkas:<br />
<br />
<pre class="literal-block"><span style="font-family: "Courier New",Courier,monospace;">sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon </span></pre>
<br />
<br />0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-58730546861737822332012-10-31T23:22:00.002+08:002012-10-31T23:22:57.690+08:00Pasang kernel terkini dari PPA<div style="text-align: justify;">
Kernel terkini memang mengujakan, selain dari "bragging right" untuk ada kernel terbaru, ia juga berguna untuk menguji ciri-ciri terbaru pada kernel yang ada di dalam git.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Selain dari kompil sendiri dari git, kita boleh pasang kernel terbaru dari PPA di <a href="http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/" target="_blank">sini</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Option linux-image-extra, menurut komen di <a href="http://askubuntu.com/questions/153023/what-is-the-linux-image-extra-package-for-and-do-i-need-it" target="_blank">sini</a> adalah untuk kernel yang mengandungi driver-driver seperti untuk KVM dan Virtualbox.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Selamat mencuba!</div>
<div style="text-align: justify;">
<br /></div>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-12882109736639569712012-10-29T09:49:00.001+08:002012-10-29T09:49:14.519+08:00Grabbing fastest mirror on UbuntuNetselect is not included by default, need to use Debian stable's netselect<br />
<br />
1- Get it <a href="http://packages.debian.org/stable/net/netselect" target="_blank">here</a>, no dependency. <br />
<br />
<br />
2- Find the fastest mirror:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">netselect -v -s10 -t20 `wget -q -O- https://launchpad.net/ubuntu/+archivemirrors | grep -P -B8 "statusUP|statusSIX" | grep -o -P "(f|ht)tp.*\"" | tr '"\n' ' '`</span></span></blockquote>
<br />
3- Alter your sources.list and DONE!0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-2720094561445377322012-10-20T20:06:00.001+08:002012-10-20T20:06:13.767+08:00Ubuntu 12.10 dilancarkanUbuntu 12.10 telah dilancarkan. Antara pembaharuan yang dibawa ialah fungsi Amazon search di dalam versi kali ini. Untuk membuang fungsi carian tersebut anda boleh rujuk blog <a href="http://blog.mypapit.net/2012/10/how-to-remove-amazon-shopping-search-result-from-unity.html" target="_blank">ini</a><br />
<br />
Pendek kata guna arahan:<br />
<br />
<blockquote class="tr_bq">
<code class="bash functions" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(255, 20, 147) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 12px; height: auto !important; left: auto !important; line-height: 13.1875px; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre; width: auto !important;">sudo</code><span style="background-color: white; color: #111111; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 12px; line-height: 13.1875px; white-space: pre;"> </span><code class="bash plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 12px; height: auto !important; left: auto !important; line-height: 13.1875px; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre; width: auto !important;">apt-get remove unity-lens-shopping</code></blockquote>
<br />
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-68118937825823762372012-09-18T15:52:00.001+08:002012-09-18T16:04:24.747+08:00Buang kernel lama selepas upgradeRun ni dulu:<br />
<br />
<pre><span style="font-size: x-small;"><code> dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'</code></span></pre>
<pre><code> </code></pre>
Bila dah yakin, baru run:<br />
<pre><code> </code></pre>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge</span></span><br />
<br />
Pastikan anda faham apa yang anda lakukan, segala risiko tidak akan saya tanggung.<br />
<br />
Sumber <a href="http://askubuntu.com/questions/65096/how-to-clean-previous-kernels-after-update" target="_blank">asal</a> 0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-3209905506093533992012-08-24T11:03:00.002+08:002012-08-24T11:03:35.528+08:00Mount HFS+ partition sebagai read/writeSecara default jika kita mount partition Mac yang menggunakan filesystem HFS+, ia hanya akan beri permission "read only"<br />
<br />
Perbincangan secara mendalam tentang hal ini boleh dibaca <a href="http://superuser.com/questions/84446/how-to-mount-a-hfs-partition-in-ubuntu-as-read-write" target="_blank">di sini</a><br />
<br />0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-11627898772099699922012-08-23T22:38:00.001+08:002012-08-23T22:38:54.634+08:00VNC dari Mint(Ubuntu) ke Ubuntu<div class="uiStreamMessage" data-ft="{"type":1,"tn":"K"}" style="font-family: inherit; text-align: justify;">
<span class="messageBody" data-ft="{"type":3}"><span class="userContent">mac
dalam bilik, laptop dalam study room. sebab nak akses current desktop..
thinking of guna VNC. so install tightvnc. sebab malas nak config, each
session created by VNC server occupy port 5901...5902.. which is not
default. <br /> <br /> akses pulak guna xtightvncviewer.. akses default port
5900. otherwise kena specify host:<port>. solution. guna x11vnc
utk create vnc session, akses guna xtightvncviewer.<br /> <br /> mmg awesome x11vnc ni.. very lightweight.</port></span></span></div>
0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-70697933981193101282012-06-20T10:19:00.002+08:002012-06-20T10:19:28.024+08:00Ping<div style="color: white;">
The measured tree overflows</div>0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com2tag:blogger.com,1999:blog-6896560573685878341.post-38480319327853901892012-05-23T10:09:00.001+08:002012-05-23T10:09:54.537+08:00Recovering formatted device with photorecI recently got problem with my microSD card which I used in my SGS II phone - it tells that my card is not formatted, which is odd. I then use my another device to read, and try to reformat but seems the same message appeared.<br />
<br />
Later, I tried to read it from my Linux Mint, it does not detected at all. By using looking at /dev/ seems there's device there.. so I opt to use mkfs to format the card, it worked.<br />
<br />
However, that card contained many pictures of my lovely daughter and my wife.<br />
<br />
<a href="http://blog.mypapit.net/" target="_blank">My friend</a>, later suggested to use "photorec", which is conveniently could be installed with [check first]:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">
$apt-cache search photorec<br />testdisk - Partition scanner and disk recovery tool</div>
<br />
It's in <span style="font-family: "Courier New",Courier,monospace;">testdisk</span> package<br />
<br />
To install:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install testdisk</span><br />
<br />
Try to play around with the flag, you recovered file could be located as you wish:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEWbwF5bxtruNyblZOCLRa_mjVzbsbdYhJM6DihgpTAxKpPmk5_71z05wogJcUZcyWBUIBPEjPhgCrv9n42ArBabdcPtEtZWG3p23o8I-7TpftcmsfZHMUU_LgX77P-GiMS5lCEKz2kHbd/s1600/photo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEWbwF5bxtruNyblZOCLRa_mjVzbsbdYhJM6DihgpTAxKpPmk5_71z05wogJcUZcyWBUIBPEjPhgCrv9n42ArBabdcPtEtZWG3p23o8I-7TpftcmsfZHMUU_LgX77P-GiMS5lCEKz2kHbd/s320/photo.png" width="320" /></a></div>
<br />
It's brilliant. Most of my files are recovered, although it seems scattered hence you need to find your important files by yourselves.0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com2tag:blogger.com,1999:blog-6896560573685878341.post-48307259786337633692012-05-16T15:53:00.001+08:002012-05-16T15:53:19.714+08:00The lazy way to download PDF from a websiteI usually stumbled to a website where it has many PDF (slides, research papers) and I don't want to bother to download them one by one.<br />
<br />
So I simply use lynx with -dump option and grep:<br />
For example:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">
lynx -dump http://www.utdallas.edu/~zhiqiang.lin/spring2012.html|grep -o "http://*.*.pdf" > list</div>
<br />
So in order to download them from the "list", I use curl (or you can use wget too)<br />
<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">for i in `cat list`;do echo $i;curl -C - $i -O;done</span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Done, easy eh?<br />0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-39022032956310671982012-05-15T10:38:00.001+08:002012-05-15T10:38:15.043+08:00Compiling Linux Kernel for UbuntuSometimes I felt like I wanted to have a feeling of the new kernel, well my opinion is that Ubuntu and its derivatives aren't designed for such customizations, unless you're a developer.<br />
<br />
The notes on kernel compilation is <a href="https://help.ubuntu.com/community/Kernel/Compile" target="_blank">here</a> . Basically for Ubuntu the way is slightly different and seems much easier since you don't have to edit the Grub configurations manually after you created the *.deb file for linux images and headers. Everything will be taken care for you.<br />
<br />
My system is now, running Linux Mint 12 [derived from Ubuntu 11.10]<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">vostro-mint source # uname -a</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Linux vostro-mint 3.4.0-1-i5 #3 SMP Tue May 15 00:23:33 MYT 2012 x86_64 x86_64 x86_64 GNU/Linux</span></blockquote>
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">vostro-mint source # cat /etc/issue</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Linux Mint 12 Lisa \n \l</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"></span></blockquote>
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">vostro-mint source # cat /proc/version</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Linux version 3.4.0-1-i5 (root@vostro-mint) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #3 SMP Tue May 15 00:23:33 MYT 2012</span></blockquote>
<br />0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-48191240865194880922012-05-10T09:14:00.003+08:002012-05-10T09:17:21.052+08:00Terminal record with ttyrec<div style="text-align: justify;">
Do you know that you can record your terminal session with ttyrec?</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
On Ubuntu/Mint this software can simply being installed by issuing </div>
<div style="text-align: justify;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
sudo apt-get install ttyrec -y</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The syntax is basically </div>
<div style="text-align: justify;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
ttyrec [filename]<filename></filename></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
And your session will be recorded until you issue "exit" command</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
To replay the session simply use </div>
<div style="text-align: justify;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
ttyplay [filename] <filename></filename></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Enjoy!</div>0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0tag:blogger.com,1999:blog-6896560573685878341.post-80405294552817849722012-05-09T09:41:00.001+08:002012-05-09T09:41:12.151+08:00ipraytime, prayer time tool for Muslims<div style="text-align: justify;">
When it comes to prayer times, I usually checked for JAKIM's e-solat page, <a href="http://www.e-solat.gov.my/" target="_blank">here</a> . As it's the only trusted source for prayer times in Malaysia, it could have been hit by massive simultaneous access when it comes to the early of the month, because some applications simply grab the data from that website to feed their apps.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I rarely use ipraytime, but it does have features that I believe as accurate it could be. Ipraytime is included in Ubuntu/Mint, within itools package. Hence you can simply install by</div>
<div style="text-align: justify;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
sudo aptitude install itools -y </div>
<div style="text-align: justify;">
or <span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install itools -y</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The usage is fairly straight forward</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
You can get your current position by using latitude marker in google map, or your own smartphone.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Let say your position:3.14004,101.74932</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">ipraytime -lat 3.14004 -lon 101.74932 -a 1 -m</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For Malaysia, usually the angle method is Egyptian General Authority of Survey so the -a flag is meant for that. -m is for monthly schedule.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Or you can simply put your favorite location in your <span style="font-family: "Courier New",Courier,monospace;">$HOME/.iprayrc</span> with the following format:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">City: Ampang,Malaysia</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Latitude: 3.13998</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Longitude: 101.74940 </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">AngleMethod: 1</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">UTC: 8</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Hence when you invoke </div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
ipraytime -m</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Later on or just ipraytime it will show the position that you have specified.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
As for the output, some terminals do have problem with showing special characters. But it worked on old school terminals such as xterm and the minimalist mrxvt</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7emual0S18FrWzfG89QtQ7x1mGe38An3jznCpFPB9m4W9DhqMLfKfN14lBAUUBPHw14H1upVYq9lckB3potnH_2tZ_KYEagGfs6ip8ZhAJnHqUfehPpTJzTEGsPdphV612fAMT1YZBCf/s1600/Screenshot+at+2012-05-09+09:31:53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7emual0S18FrWzfG89QtQ7x1mGe38An3jznCpFPB9m4W9DhqMLfKfN14lBAUUBPHw14H1upVYq9lckB3potnH_2tZ_KYEagGfs6ip8ZhAJnHqUfehPpTJzTEGsPdphV612fAMT1YZBCf/s320/Screenshot+at+2012-05-09+09:31:53.png" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>0xffhttp://www.blogger.com/profile/11282323362186270236noreply@blogger.com0