tag:blogger.com,1999:blog-22557741736091981302024-03-14T15:55:28.936+08:00foobaring[puh bahr rhing]renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-2255774173609198130.post-80589416005058563022014-02-20T08:26:00.000+08:002014-02-20T08:26:15.290+08:00HowTo: Open Terminal on Fedora 201. move your mouse on the upper left most part of the screen towards the "Activities"<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-FeZSD5hSd7A/UwVKrwPw8EI/AAAAAAAAAU8/XWyXnaCXCkc/s1600/Screenshot+from+2014-02-08+08:53:05.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-FeZSD5hSd7A/UwVKrwPw8EI/AAAAAAAAAU8/XWyXnaCXCkc/s1600/Screenshot+from+2014-02-08+08:53:05.png" height="125" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
2. click the icon<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-RspSNA1jkVo/UwVKlGDsN1I/AAAAAAAAAUs/FJ-CM2z9mA4/s1600/Screenshot+from+2014-02-08+08:53:12.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-RspSNA1jkVo/UwVKlGDsN1I/AAAAAAAAAUs/FJ-CM2z9mA4/s1600/Screenshot+from+2014-02-08+08:53:12.png" height="125" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
3. click the "All" button near the bottom middle part of the screen<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-2q8VEnRme74/UwVKyeBH-AI/AAAAAAAAAVU/TTKfG85lQx0/s1600/Screenshot+from+2014-02-08+08:56:54.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-2q8VEnRme74/UwVKyeBH-AI/AAAAAAAAAVU/TTKfG85lQx0/s1600/Screenshot+from+2014-02-08+08:56:54.png" height="125" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
4. click the "Utilities" group<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-xmDn_QpWZSs/UwVKpBFGKWI/AAAAAAAAAU0/Rgk8D18EHrA/s1600/Screenshot+from+2014-02-08+08:53:23.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-xmDn_QpWZSs/UwVKpBFGKWI/AAAAAAAAAU0/Rgk8D18EHrA/s1600/Screenshot+from+2014-02-08+08:53:23.png" height="125" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
5. click the "Terminal" Icon<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-GY0gn2DkvG8/UwVKuF6mF2I/AAAAAAAAAVE/gyfUZebCk2s/s1600/Screenshot+from+2014-02-08+08:53:28.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-GY0gn2DkvG8/UwVKuF6mF2I/AAAAAAAAAVE/gyfUZebCk2s/s1600/Screenshot+from+2014-02-08+08:53:28.png" height="125" width="200" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6. Terminal is now open!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-tGsfvbgOAk0/UwVKxt01EJI/AAAAAAAAAVM/_zrIk_9XQD0/s1600/Screenshot+from+2014-02-08+08:53:53.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-tGsfvbgOAk0/UwVKxt01EJI/AAAAAAAAAVM/_zrIk_9XQD0/s1600/Screenshot+from+2014-02-08+08:53:53.png" height="125" width="200" /></a></div>
<br />renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-10332180865530510892014-02-20T08:00:00.000+08:002014-02-20T08:29:55.079+08:00HowTo: Install Java Plugins in Google Chrome / Firefox in Fedora 20<b>Step 1:</b><br />
download Linux x64 RPM in <a href="http://www.java.com/en/download/manual.jsp?locale=en">http://www.java.com/en/download/manual.jsp?locale=en</a><br />
<br />
<b>Step 2:</b><br />
open terminal and type the following (<a href="http://foobaring.blogspot.com/2014/02/howto-open-terminal-on-fedora-20.html" target="blank">how to open terminal?</a>)<br />
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">su -</span><br />
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">cd /home/**username**/Downloads </span>(replace **username** with yours)<br />
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">rpm -ivh jre-7u11-linux-x64.rpm</span><br />
you will see some few errors but its ok<br />
<br />
<b>Step 3:</b><br />
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">updatedb</span><br />
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">locate libnpjp2.so</span><br />
<div>
copy the path of the libnpjp2.so file</div>
<div>
<br /></div>
<div>
<b>Step 4a: (Firefox Users)</b></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">cd /home/user/.mozilla/plugins (replace user with your username)</span></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">ln -s path/of/libnpjp.so</span></div>
<div>
<br /></div>
<div>
<b>Step 4b: (Chrome Users)</b></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">cd /opt/google/chrome/</span></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">mkdir plugins</span></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">cd plugins</span></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">ln -s path/of/libnpjp.so</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Step 5:</b></div>
<div>
Edit java control panel to allow unsigned java applet to run on your machine, open a terminal (<u>non-root account</u>) then type</div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">cd /usr/java/jre1.7.0_51/bin/</span></div>
<div>
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">. ControlPanel</span><br />
<span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span>
follow the instructions on the picture below (click security, set to MEDIUM, press apply)<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-3-7oJSN-bxo/UwVFLEhAIUI/AAAAAAAAAUU/fSRPHdQAfE0/s1600/Screenshot+from+2014-02-20+07:53:48.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-3-7oJSN-bxo/UwVFLEhAIUI/AAAAAAAAAUU/fSRPHdQAfE0/s1600/Screenshot+from+2014-02-20+07:53:48.png" height="320" width="249" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-4-eKXrFa9JE/UwVFMzCGXjI/AAAAAAAAAUc/-Akqs-_gdtg/s1600/Screenshot+from+2014-02-20+07:53:54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-4-eKXrFa9JE/UwVFMzCGXjI/AAAAAAAAAUc/-Akqs-_gdtg/s1600/Screenshot+from+2014-02-20+07:53:54.png" height="320" width="250" /></a></div>
<br />
<br />
<br />
<div>
<b>Step 6:</b></div>
<div style="-webkit-text-stroke-width: 0px; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
close and run your browser. visit other java websites to check your java installation. My java installation wont work in java's website. the circle loading thingy just wont stop loading, but try it on other websites instead. Check the browsers for permissions!</div>
<div style="color: black; margin: 0px;">
<br /></div>
<div style="color: black; margin: 0px;">
<br /></div>
</div>
</div>
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com2tag:blogger.com,1999:blog-2255774173609198130.post-90151711036351617642014-02-08T08:21:00.000+08:002014-02-08T08:21:06.419+08:00HowTo: Install VLC on Fedora 20<span style="font-family: Arial, Helvetica, sans-serif;">Step1:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">su -</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">** if you are getting a <span style="background-color: yellow;"><span style="color: #444444;">"Couldn't resolve host"</span></span> response to this then simply do Step1a</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"> Step1a:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> gedit /etc/resolv.conf</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> look for the list of the nameserver and add the line below to the top of the list</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> nameserver 8.8.8.8</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"> your /etc/resolv.conf should look something like this</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> # Generated by NetworkManager</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> domain smartbro.net</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> search smartbro.net</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> <span style="background-color: yellow; color: #444444;">nameserver 8.8.8.8</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> nameserver 121.1.3.81</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> nameserver 121.1.3.16</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> nameserver 121.1.3.66</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> # NOTE: the libc resolver may not support more than 3 nameservers.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> # The nameservers listed below may not be recognized.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> nameserver 192.168.1.1</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Step2:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">yum install vlc -y</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Enjoy!!</span>renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-66291690444574866152014-02-06T07:31:00.002+08:002014-02-06T07:31:59.380+08:00HowTo: Fix Pango-WARNING **: failed to create cairo scaled font<b>Problem:</b><br />
I encountered this problem on newly installed and updated Fedora 20<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="http://2.bp.blogspot.com/-ivih8rWrewg/UvLI-M2yzKI/AAAAAAAAAK8/Aye86FZj1j0/s1600/error-message.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-ivih8rWrewg/UvLI-M2yzKI/AAAAAAAAAK8/Aye86FZj1j0/s1600/error-message.png" height="98" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'Arial Bold 19.53125' at /usr/lib64/perl5/vendor_perl/dpm/canvas_module.pm line 253.<br />
Pango-WARNING **: font_face status is: out of memory at /usr/lib64/perl5/vendor_perl/dpm/canvas_module.pm line 253.<br />
Pango-WARNING **: scaled_font status is: out of memory at /usr/lib64/perl5/vendor_perl/dpm/canvas_module.pm line 253.<br />
Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='Arial Bold 19.53125', text=' 3R ' at /usr/lib64/perl5/vendor_perl/dpm/canvas_module.pm line 253.<br />
<br />
<br />
<b>Solution:</b><br />
1. open terminal<br />
2. su -<br />
3. chmod -Rf 777 /usr/share/fonts/*<br />
4. Tada! Everything should be fixed now!renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com3tag:blogger.com,1999:blog-2255774173609198130.post-36612772614950913292014-01-13T18:29:00.000+08:002014-01-13T18:29:09.037+08:00HowTo: Install ImageMagick 6.8.7 Q16 (64bit) to ActivePerl 5.16.3 in Windows 7Step 1: run the installer<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-UJUgwZb8QBc/UtO9ioMP9lI/AAAAAAAAAJY/RRBm5IIWquA/s1600/install-im-01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-UJUgwZb8QBc/UtO9ioMP9lI/AAAAAAAAAJY/RRBm5IIWquA/s320/install-im-01.png" width="320" /></a></div>
<br />
Step 2: a User Account Control window will pop-up, click YES<br />
<br />
Step 3: press next<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-7RPBCfBfh3M/UtO9iq5U4nI/AAAAAAAAAJU/xLej2lLgEBw/s1600/install-im-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="249" src="http://3.bp.blogspot.com/-7RPBCfBfh3M/UtO9iq5U4nI/AAAAAAAAAJU/xLej2lLgEBw/s320/install-im-02.png" width="320" /></a></div>
<br />
Step 4: select the "I accept the agreement"<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-USA_ybSPj0I/UtO9jI6j4zI/AAAAAAAAAJc/TUjKdAvB05g/s1600/install-im-03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://4.bp.blogspot.com/-USA_ybSPj0I/UtO9jI6j4zI/AAAAAAAAAJc/TUjKdAvB05g/s320/install-im-03.png" width="320" /></a></div>
<br />
Step 5: press next<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Uxk2HH6nFuI/UtO9kVEiI9I/AAAAAAAAAJw/wvYv9Ob1Qew/s1600/install-im-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://1.bp.blogspot.com/-Uxk2HH6nFuI/UtO9kVEiI9I/AAAAAAAAAJw/wvYv9Ob1Qew/s320/install-im-04.png" width="320" /></a></div>
<br />
Step 6: press next<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-SX9F7XSSymQ/UtO9kSBM2CI/AAAAAAAAAJs/WnCL75uCQFE/s1600/install-im-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://3.bp.blogspot.com/-SX9F7XSSymQ/UtO9kSBM2CI/AAAAAAAAAJs/WnCL75uCQFE/s320/install-im-05.png" width="320" /></a></div>
<br />
Step 7: press next<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-xq9B9IgPCdc/UtO9kupdHlI/AAAAAAAAAJ0/i9AChm0spKs/s1600/install-im-06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="http://4.bp.blogspot.com/-xq9B9IgPCdc/UtO9kupdHlI/AAAAAAAAAJ0/i9AChm0spKs/s320/install-im-06.png" width="320" /></a></div>
<br />
Step 8: put a check on the "Install PerlMagick for ActiveState Perl v 5.16.3, then press next<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-fFP8bQJzLPE/UtO9lkdBoLI/AAAAAAAAAKE/NYBhxavkUhU/s1600/install-im-07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="http://1.bp.blogspot.com/-fFP8bQJzLPE/UtO9lkdBoLI/AAAAAAAAAKE/NYBhxavkUhU/s320/install-im-07.png" width="320" /></a></div>
<br />
Step 9: press install<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-wBCIf08Z6MA/UtO9mZnk4sI/AAAAAAAAAKQ/Scb44DCysdM/s1600/install-im-08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="http://1.bp.blogspot.com/-wBCIf08Z6MA/UtO9mZnk4sI/AAAAAAAAAKQ/Scb44DCysdM/s320/install-im-08.png" width="320" /></a></div>
<br />
Step 10: wait for installation<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-a2K0odhvoqQ/UtO9mRCk5dI/AAAAAAAAAKM/4xG8mzdfTDA/s1600/install-im-09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://1.bp.blogspot.com/-a2K0odhvoqQ/UtO9mRCk5dI/AAAAAAAAAKM/4xG8mzdfTDA/s320/install-im-09.png" width="320" /></a></div>
<br />
Step 11: this command prompt will pop-up, DO NOT CLOSE it, it will close by itself!!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-WX7cKXW5ySk/UtO9m4wb20I/AAAAAAAAAKY/NdkLMiqNzZQ/s1600/install-im-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="161" src="http://1.bp.blogspot.com/-WX7cKXW5ySk/UtO9m4wb20I/AAAAAAAAAKY/NdkLMiqNzZQ/s320/install-im-10.png" width="320" /></a></div>
<br />
Step 12: if you see this window, click next<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-9lYPEadZqts/UtO9nT6gmVI/AAAAAAAAAKk/vlAO6S6J8jg/s1600/install-im-11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://3.bp.blogspot.com/-9lYPEadZqts/UtO9nT6gmVI/AAAAAAAAAKk/vlAO6S6J8jg/s320/install-im-11.png" width="320" /></a></div>
<br />
Step 13: uncheck the "view index.html", then press Finish!!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-g0BVf3kJCYk/UtO9n9Q-YXI/AAAAAAAAAKo/kex2JCe1tEc/s1600/install-im-12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://3.bp.blogspot.com/-g0BVf3kJCYk/UtO9n9Q-YXI/AAAAAAAAAKo/kex2JCe1tEc/s320/install-im-12.png" width="320" /></a></div>
<br />
Installation is now complete, you can now add the Image::Magick module by adding the line below to your perl script!<br />
use Image::Magick;renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-43404268223259960672014-01-10T11:11:00.001+08:002014-01-10T12:24:12.926+08:00HowTo: Add Tiled Background Image to Perl Gtk2 Window<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-El8DVFvt7F0/Us90fOUOuDI/AAAAAAAAAI8/pvIxbTGitHs/s1600/image1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-El8DVFvt7F0/Us90fOUOuDI/AAAAAAAAAI8/pvIxbTGitHs/s1600/image1.jpg" height="200" width="181" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-8wFThy-3adQ/Us90fpCINPI/AAAAAAAAAJE/EGtKcXtHVTs/s1600/image2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-8wFThy-3adQ/Us90fpCINPI/AAAAAAAAAJE/EGtKcXtHVTs/s1600/image2.jpg" height="196" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="color: blue; font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b>tiled-background.pl</b></span></span>
<span style="color: blue; font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b><br /></b></span></span>
<span style="color: blue; font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b>#!/usr/bin/perl -w</b></span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b><span style="color: #8e7cc3;">use strict</span></b>;</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b><span style="color: #8e7cc3;">use </span></b>Gtk2 <b><span style="color: magenta;">'-init'</span></b>;</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b><span style="color: #cc0000;">my </span><span style="color: #38761d;">$window</span></b> = Gtk2::Window</span></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">new();</span></span><br />
<span style="color: #38761d; font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b>$window</b></span></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">signal_connect(<b><span style="color: magenta;">'destroy'</span><span style="color: #cc0000;">=>sub</span></b>{Gtk2->main_quit();});</span></span><br />
<span style="color: #38761d; font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b>$window</b></span></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">set_size_request(200,200);</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">background(<b><span style="color: magenta;">"tile01.jpg"</span></b>,<b><span style="color: #38761d;">$window</span></b>);</span></span><br />
<span style="color: #38761d; font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b>$window</b></span></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">show_all();</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">Gtk2<b><span style="color: #cc0000;">-></span></b>main();</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><b><span style="color: #cc0000;">sub </span></b>background {</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span></b>(<b><span style="color: #38761d;">$image</span></b>,<b><span style="color: #38761d;">$win</span></b>) = @_;</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span><span style="color: #38761d;">$back_pixbuf</span></b> = Gtk2::Gdk::Pixbuf</span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;">new_from_file(<b><span style="color: #38761d;">$image</span></b>);</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span></b>(<b><span style="color: #38761d;">$pixmap</span></b>,<b><span style="color: #38761d;">$mask</span></b>) = <b><span style="color: #38761d;">$back_pixbuf</span></b></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;">render_pixmap_and_mask(255);</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span><span style="color: #38761d;">$style</span></b> = <b><span style="color: #38761d;">$win</span></b></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;">get_style();</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$style</span></b>=<b><span style="color: #38761d;">$style</span></b></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;">copy();</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$style</span></b></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;">bg_pixmap(<b><span style="color: magenta;">"normal"</span></b>,<b><span style="color: #38761d;">$pixmap</span></b>);</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$window</span></b></span><b style="font-family: 'Courier New', Courier, monospace; white-space: pre-wrap;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace;">set_style(<b><span style="color: #38761d;">$style</span></b>);</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">}</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;"><br /></span></span>
<a href="http://4.bp.blogspot.com/-k6axN9eQex8/Us90WtN2T7I/AAAAAAAAAI0/3sllETGU3s0/s1600/tile01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://4.bp.blogspot.com/-k6axN9eQex8/Us90WtN2T7I/AAAAAAAAAI0/3sllETGU3s0/s1600/tile01.jpg" height="200" width="200" /></a>renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-31432898852150774982014-01-06T08:00:00.000+08:002014-01-06T08:00:36.197+08:00HowTo: Fix Video Problem while Booting Fedora 19 LiveUSB / LiveCD<span style="font-family: inherit;"><b>Problem:</b></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-z3TqDB_iOC0/Usnw5BsTmNI/AAAAAAAAAIU/kRnpPvCCuwY/s1600/20140105_114400_resized.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-z3TqDB_iOC0/Usnw5BsTmNI/AAAAAAAAAIU/kRnpPvCCuwY/s1600/20140105_114400_resized.jpg" height="150" width="200" /></a></div>
<span style="font-family: inherit;">- I boot my fedora 19 live usb, got to the graphical part. I am supposed to be greeted by the user log-in dialog but instead, I only got the wallpaper, nothing else. I can still move my mouse pointer around.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br />
<b>Specs:</b></span><br />
<span style="font-family: inherit;">- Fedora 19 LiveUSB</span><br />
<span style="font-family: inherit;">- Intel Atom D510 Motherboard</span><br />
<span style="font-family: inherit;"><br />
<b>Reason:</b></span><br />
<span style="font-family: inherit;">- Turns out that I am seeing only a part of the desktop, probably 1/4 only.</span><br />
<span style="font-family: inherit;">- I read somewhere that fedora might have detected a non existing display with very big resolution, that is why I can see only a portion of the desktop.</span><br />
<span style="font-family: inherit;"><br />
<b>Solution:</b></span><br />
<br />
<span style="font-family: inherit;">- boot LiveUSB or LiveCD</span><br />
<span style="font-family: inherit;">- select </span><b><span style="font-family: Courier New, Courier, monospace;">Live Mode</span></b><span style="font-family: inherit;"> and press </span><b><span style="font-family: Courier New, Courier, monospace;">TAB</span></b><span style="font-family: inherit;"> to edit options</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-ouvKQX_2u_8/UsnxOAbtkNI/AAAAAAAAAIc/H8NLpUdB690/s1600/20140105_195631_resized.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-ouvKQX_2u_8/UsnxOAbtkNI/AAAAAAAAAIc/H8NLpUdB690/s1600/20140105_195631_resized.jpg" height="240" width="320" /></a></div>
<br />
<span style="font-family: inherit;">- add </span><b><span style="font-family: Courier New, Courier, monospace;">video=LVDS-1:d</span></b><span style="font-family: inherit;"> at the end of the command and press enter</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-apD_CdgWZdg/UsnxcRITAUI/AAAAAAAAAIk/3cWLqFzz2mI/s1600/20140105_195716_resized.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-apD_CdgWZdg/UsnxcRITAUI/AAAAAAAAAIk/3cWLqFzz2mI/s1600/20140105_195716_resized.jpg" height="240" width="320" /></a></div>
<br />
<span style="font-family: inherit;">- this should fix the problem</span><br />
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-15326266271085823922014-01-06T07:44:00.001+08:002014-01-06T07:44:38.472+08:00HowTo: Run fsck on Emergency Mode on Fedora 19<br />
<b>Problem:</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-zpdLsRUPbGk/UsntYX6GaAI/AAAAAAAAAII/sf_suAdJ1kQ/s1600/20140104_214903_resized.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-zpdLsRUPbGk/UsntYX6GaAI/AAAAAAAAAII/sf_suAdJ1kQ/s1600/20140104_214903_resized.jpg" height="300" width="400" /></a></div>
<b><br /></b>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">systemd-fsck[529]: /dev/mapper/fedora_<b>XXX</b>--home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY...</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "ststemctl reboot" to reboot, "systemctl default" to try again to boot into ddefault mode.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Give root password for maintenance</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(or type Control-D to continue):</span><br />
<br />
<b>Solution #1 (untested):</b><br />
1. type in your root password (you will not see anything when you are typing, but its typing)<br />
2. type <span style="font-family: Courier New, Courier, monospace; font-weight: bold;">fsck</span><br />
<b style="font-family: 'Courier New', Courier, monospace;"> </b><span style="font-family: inherit;">- if you get an error message like the one below, </span>try <b>Solution #2</b> or <b>Solution #3</b><br />
<span style="font-family: Courier New, Courier, monospace;"> <span style="font-size: x-small;">/dev/mapper/fedora_<b>XXX</b>--root is mounted</span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> e2fsck: Cannot continue, aborting.</span><span style="font-family: 'Courier New', Courier, monospace;"> </span><br />
3. if there are questions about fixing, ignoring, forcing, salvage, etc, always answer <b><span style="font-family: Courier New, Courier, monospace;">y</span></b> (yes)<br />
<br />
<b>Solution #2 (untested):</b><br />
- we will continue from step 2 of solution #1<br />
1. type the commands below, remember to substitute <b><span style="font-family: Courier New, Courier, monospace;">XXX</span></b> with the one specified in your error<br />
<span style="font-family: Courier New, Courier, monospace;"> umount /dev/mapper/fedora_<b>XXX</b>--root</span><br />
<span style="font-family: Courier New, Courier, monospace;"> umount /dev/mapper/fedora_<b>XXX</b>--home</span><br />
<span style="font-family: Courier New, Courier, monospace;"> umount /dev/mapper/fedora_<b>XXX</b>--swap</span><br />
2. type <span style="font-family: Courier New, Courier, monospace; font-weight: bold;">fsck </span><span style="font-family: 'Courier New', Courier, monospace;">/dev/mapper/fedora_</span><b style="font-family: 'Courier New', Courier, monospace;">XXX</b><span style="font-family: 'Courier New', Courier, monospace;">--root</span><br />
3. if there are questions about fixing, ignoring, forcing, salvage, etc, always answer <b><span style="font-family: Courier New, Courier, monospace;">y</span></b> (yes)<br />
4. repeat step 2 & 3 with --home & --swap just to be sure<br />
<br />
<b>Solution #3 (tested):</b><br />
1. boot into your LiveCD or LiveUSB<br />
2. once logged in, open gnome-disks utility from the applications (I think its called Disks)<br />
3. unmount all the /dev/mapper/fedora_XXX--root & home & swap<br />
4. open a gnome-terminal (terminal)<br />
5. type <b><span style="font-family: Courier New, Courier, monospace;">su -</span></b><br />
<span style="font-family: inherit;">6. enter your root password</span><br />
<br />
7. type <span style="font-family: Courier New, Courier, monospace; font-weight: bold;">fsck </span><span style="font-family: 'Courier New', Courier, monospace;">/dev/mapper/fedora_</span><b style="font-family: 'Courier New', Courier, monospace;">XXX</b><span style="font-family: 'Courier New', Courier, monospace;">--root</span><br />
8. if there are questions about fixing, ignoring, forcing, salvage, etc, always answer <b><span style="font-family: Courier New, Courier, monospace;">y</span></b> (yes)<br />
9. repeat step 7 & 8 with --home & --swap just to be sure<br />
<br />
(if you found problems in my solutions, please correct me, also if you can share your solutions & fixes please do so. thanks. I wasn't been able to test other errors simply because I fixed my problem with solution #3, if ever I came across the same problem, I'll try the other methods)<br />
<br />
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com8tag:blogger.com,1999:blog-2255774173609198130.post-59440846298053207372013-12-30T16:16:00.001+08:002013-12-30T16:16:30.791+08:00HandyTools: Bat to Exe ConverterHey Guys,<br />
Check-out this latest find that I got, a .bat to .exe converter! Check it out in this link<br />
<a href="http://www.f2ko.de/programs.php?lang=en&pid=b2e">http://www.f2ko.de/programs.php?lang=en&pid=b2e</a><br />
<br />
I'll post a simple tutorial on how to use it later!renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-52692394659857270062013-12-28T09:14:00.001+08:002013-12-28T09:14:05.583+08:00HowTo: Get Exif Thumbnail from Images using Perl Gtk2<span style="font-family: Courier New, Courier, monospace;">thumbnail-extractor.pl</span><br />
<span style="font-family: Courier New, Courier, monospace;">- this will extract a thumbnail inside the exif metadata embedded in the jpeg file.</span><br />
<span style="font-family: Courier New, Courier, monospace;">- we use this technique to help speed up generating a thumbnail image by simply getting it instead of making a thumbnail yourself</span><br />
<span style="font-family: Courier New, Courier, monospace;">- this is for demonstration purposes only</span><br />
<span style="font-family: Courier New, Courier, monospace;">- written in windows using activeperl</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>#!/usr/bin/perl -w</b></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #8e7cc3;">use strict</span></b>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #8e7cc3;"><b>use </b></span>Gtk2 <span style="color: magenta;"><b>'-init'</b></span>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #8e7cc3;">use </span></b>Image::ExifTool <span style="color: magenta;"><b>qw(ImageInfo)</b></span>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my <b><span style="color: #6aa84f;">$exifTool</span></b> = Image::ExifTool</span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #76a5af;">new</span>();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #6aa84f;">$exifTool</span></b></span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Options(Binary => 1);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my <b><span style="color: #6aa84f;">$window</span></b> = Gtk2::Window</span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">new();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #6aa84f;">$window</span></b></span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">signal_connect(<b><span style="color: magenta;">'destroy'</span><span style="color: #cc0000;">=></span></b>sub{</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Gtk2</span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">main_quit();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>});</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my <b><span style="color: #6aa84f;">$image</span></b> = Gtk2::Image</span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #76a5af;">new</span>();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #6aa84f;">$image</span></b></span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">set(<b><span style="color: magenta;">'pixbuf'</span><span style="color: #cc0000;">=></span></b>load_thumbnail(<b><span style="color: magenta;">"c:\\test.jpg"</span></b>));</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #6aa84f;">$window</span></b></span><b style="font-family: 'Courier New', Courier, monospace; font-size: small;"><span style="color: #cc0000;">-></span></b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">add(<b><span style="color: #6aa84f;">$image</span></b>);</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #6aa84f;">$window</span></b>->show_all();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Gtk2->main();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #cc0000;">sub </span></b>load_thumbnail {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span></b>(<b><span style="color: #6aa84f;">$file</span></b>) = @_;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span><span style="color: #6aa84f;">$info</span></b> = <b><span style="color: #6aa84f;">$exifTool</span><span style="color: #cc0000;">-></span></b>ImageInfo(<b><span style="color: #6aa84f;">$file</span></b>, <b><span style="color: magenta;">'thumbnailimage'</span></b>);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span><span style="color: #6aa84f;">$data</span></b> = <b><span style="color: #6aa84f;">${$$info{ThumbnailImage}}</span></b>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span><span style="color: #6aa84f;">$loader</span></b> = Gtk2::Gdk::PixbufLoader<b><span style="color: #cc0000;">-></span></b><span style="color: #76a5af;">new</span>();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #6aa84f; font-weight: bold;">$loader</span><span style="color: #cc0000; font-weight: bold;">-></span><span style="color: #76a5af;">write</span>($data);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #6aa84f;">$loader</span><span style="color: #cc0000;">-></span></b><span style="color: #76a5af;">close</span>();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">my </span><span style="color: #6aa84f;">$pixbuf</span></b> = <b><span style="color: #6aa84f;">$loader</span><span style="color: #cc0000;">-></span></b>get_pixbuf();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #cc0000;">return </span><span style="color: #6aa84f;">$pixbuf</span></b>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span>renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-91213663002907070092013-12-27T09:00:00.000+08:002013-12-27T09:00:03.737+08:00HowTo: Play sounds in ActivePerl using Win32::Sounds<div>
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>Playing of sounds using Win32::Sound requires that you play the sound while the perl script is still running.</b></span><br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>If the perl script terminates, the playing of sound also terminates.</b></span><br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>The sound plays in this example because we are inside the Gtk2 main loop, the script does not terminate instantly because we are waiting for user inputs.</b></span><br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>Please take note of the difference between the 2 buttons, SND_ASYNC allows the Gtk2 to loop without waiting for the sound to finish playing.</b></span><br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b></b></span><br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>On the other hand, the one without the SND_ASYNC does not allow the Gtk2 loop to proceed until the sound has finished playing.</b></span><br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b><br /></b></span>
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b><br /></b></span>
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b>#!/usr/bin/perl -w</b></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #674ea7;"><b>use strict</b></span>;</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #674ea7;"><b>use </b></span>Gtk2 <span style="color: magenta;"><b>'-init'</b></span>;</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #674ea7;"><b>use</b> </span>Win32::Sound;</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #cc0000;"><b>my </b></span><b><span style="color: #38761d;">$window</span></b> = Gtk2::Window->new();</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #38761d;"><b>$window</b></span>->signal_connect(<span style="color: magenta;"><b>'destroy'</b></span><b><span style="color: #990000;">=>sub</span></b>{ Gtk2->main_quit();});</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my <b><span style="color: #38761d;">$vbox</span></b> = Gtk2::VBox->new();</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #38761d;">$window</span></b>->add(<b><span style="color: #38761d;">$vbox</span></b>);</span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my <span style="color: #38761d;"><b>$b1</b></span> = Gtk2::Button->new(<b><span style="color: magenta;">"NON BLOCKING"</span></b>);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$b1</span></b>->signal_connect(<b><span style="color: magenta;">'clicked'</span><span style="color: #990000;">=>sub</span></b>{</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Win32::Sound::Play(<b><span style="color: magenta;">'SystemExclamation'</span></b>,SND_ASYNC);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: blue;"># Win32::Sound::Play('c:\\foobaring.wav',SND_ASYNC);</span></b></span></div>
<div>
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span># you can also use the code above to play your own wav files</b></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>});</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$vbox</span></b>->pack_start(<b><span style="color: #38761d;">$b1</span></b>,0,0,0);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my <b><span style="color: #38761d;">$b2</span></b> = Gtk2::Button->new(<b><span style="color: magenta;">"BLOCKING"</span></b>);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$b2</span></b>->signal_connect(<b><span style="color: magenta;">'clicked'</span><span style="color: #990000;">=>sub</span></b>{</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Win32::Sound::Play(<b><span style="color: magenta;">'SystemExclamation'</span></b>);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: blue;"># Win32::Sound::Play('c:\\foobaring.wav');</span></b></span></div>
<div>
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span># you can also use the code above to play your own wav files</b></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>});</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><span style="color: #38761d;">$vbox</span></b>->pack_start(<b><span style="color: #38761d;">$b2</span></b>,0,0,0);</span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b><span style="color: #38761d;">$window</span></b>->show_all();</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Gtk2->main();</span></div>
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-7046206235528888222013-12-05T15:35:00.000+08:002014-01-11T07:42:49.275+08:00HowTo: Finding the Corners of a Rectangle using Image Magick and Perl<b>Problem:</b><br />
I need to find the x and y coordinates of the corner of a rectangle in an image. The rectangle in the image is may either be rotated or not. The background of the rectangle in the image should be transparent if it is angled.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-lRwkholfrPo/UqAm23Rtq0I/AAAAAAAAAHU/vSpYYJcTf0s/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-lRwkholfrPo/UqAm23Rtq0I/AAAAAAAAAHU/vSpYYJcTf0s/s200/1.png" height="160" width="200" /></a><a href="http://2.bp.blogspot.com/-2I58PPyOdgU/UqAm22zkajI/AAAAAAAAAHQ/2dFkc4NAfsE/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-2I58PPyOdgU/UqAm22zkajI/AAAAAAAAAHQ/2dFkc4NAfsE/s200/2.png" height="135" width="200" /></a></div>
<b>Solution: </b><br />
(I dont know if such algorithm like this exists, but if there is non, lets just call it Foobaring Rectangle Corner Detector Algorithm, hehehe)<br />
<br />
1. determine the width and height of the image<br />
2. inspect each pixel from upper left to lower right.<br />
3. check each pixel who has and opacity of < 1, get the coordinates with the biggest x, and get the coordinates of the pixel with the smallest y<br />
4. inspect each pixel again, but this time, you start from lower right going to upper left.<br />
5. check each pixel who has and opacity of < 1, get the coordinates with the smallest x, and get the coordinates of the pixel with the biggest y<br />
6. there you have it, you now have the coordinates of each of the corners of the rectangle<br />
<br />
<b>Sample Code:</b><br />
(written in perl, incomplete code, just showing you the idea, I used Image::Magick to access the pixels of the image)<br />
<br />
my $Ax = 0;<br />
my $Ay = 0;<br />
my $Bx = $width;<br />
my $By = $height;<br />
my $Cx = 0;<br />
my $Cy = $height;<br />
my $Dx = 0;<br />
my $Dy = 0;<br />
for(my $x = 0;$x<=$width;$x++){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for(my $y = 0;$y<=$height;$y++){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>my $pixel = $im->GetPixel('x'=>$x,'y'=>$y,'channel'=>'opacity');<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($pixel < 1){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span># big-x big-y<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($Ax <= $x){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Ax = $x;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Ay = $y;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($Cy >= $y){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Cy = $y;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Cx = $x;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
}<br />
for(my $x = $width;$x>=0;$x--){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for(my $y = $height;$y>=0;$y--){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>my $pixel = $im->GetPixel('x'=>$x,'y'=>$y,'channel'=>'opacity');<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($pixel < 1){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span># small-x small-y<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($Bx >= $x){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Bx = $x;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$By = $y;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($Dy <= $y){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Dy = $y;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$Dx = $x;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
}<br />
print "---- COORDINATES ----\n";<br />
print "($Ax,$Ay)\n";<br />
print "($Bx,$By)\n";<br />
print "($Cx,$Cy)\n";<br />
print "($Dx,$Dy)\n";<br />
<div>
<br /></div>
<div>
<b>Notes:</b></div>
<div>
1. The coordinates generated by this is code will not exactly give you a perfect rectangle, this is probably because of the anti-aliasing of the image. I think this will produce a perfect rectangle if used on an image without anti-alias and if the pixel count of the rectangle is a whole number. This is just a hunch, not proven yet.</div>
<div>
2. This code is a bit slow because I iterated through all the pixels of the image 2 times. If you can recommend a better way of doing this, feel free to comment.</div>
<div>
3. If you found circumstances where this is not applicable, please comment, thanks.</div>
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-20514015785106416332013-11-30T07:02:00.000+08:002013-12-17T09:02:07.723+08:00HowTo: ActivePerl cmd.exe Monitor [UPDATED]<b>Purpose:</b><br />
create a cmd.exe (command line) process that you can manipulate (write on its handle) and monitor (read on its handle) so that you can create programs that rely on the output of other programs without waiting for it to terminate. :)<br />
<br />
<b>How does it work:</b><br />
1. open2 will create a cmd.exe process<br />
2. Glib::Timeout will constantly calls the repeat_call sub<br />
- i did not use Gtk2::Helper because I am having problem with reading the output of the cmd.exe, I need to either move the mouse on the window for it to trigger the update, if anybody can help me, please comment.<br />
3. pressing the button DIR will send a "dir" command to the cmd.exe process<br />
4. pressing button TIME only prints "the current time"<br />
5. the repeat_call sub will then read the unread output of the command line and push all the output to @queue array<br />
6. action_call sub will then read 1 line from the @queue array and prints the result. action_call sub is called constantly even when the array is empty.<br />
7. the @queue array makes sure that you will get the correct chronology of the output.<br />
<br />
Below is the sample code I manage to whip up with lots and lots of help from the very nice and good MONKies of the www.perlmonks.org community! Check out our conversations at <a href="http://perlmonks.org/?node_id=1064595">http://perlmonks.org/?node_id=1064595</a><br />
<br />
<b>Sample Code:</b><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#!/usr/bin/perl -w</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use strict;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use Gtk2 '-init';</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use Gtk2::Helper;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use Data::Dumper;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use FileHandle;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use IPC::Open2;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use Win32API::File;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use Win32::API;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my @queue;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $api;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>die "PeekNamedPipe"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if ! ($api= Win32::API->Import("kernel32", "</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>BOOL PeekNamedPipe(</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>HANDLE hNamedPipe,</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>LPVOID lpBuffer,</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>DWORD nBufferSize,</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>LPDWORD lpBytesRead,</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>LPDWORD lpTotalBytesAvail,</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>LPDWORD lpBytesLeftThisMessage</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>);"));</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $wfh = FileHandle->new();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $rfh = FileHandle->new();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">open2($rfh,$wfh,"C:\\Windows\\System32\\cmd.exe");</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $hnd = Win32API::File::FdGetOsFHandle($rfh->fileno());</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">if($hnd == Win32API::File::INVALID_HANDLE_VALUE()){ die "bad hnd"; }</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $tag = Glib::Timeout->add(10,\&repeat_call);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $window = Gtk2::Window->new();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$window->signal_connect("destroy",sub{Gtk2->main_quit();});</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $hbox = Gtk2::VBox->new();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$window->add($hbox);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $button = Gtk2::Button->new("DIR");</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$button->signal_connect('clicked'=>sub{</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>print $wfh "dir\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>});</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$hbox->pack_start($button,0,0,0);</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$button = Gtk2::Button->new("TIME");</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$button->signal_connect('clicked'=>sub{</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>print $wfh "time /t\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>});</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$hbox->pack_start($button,0,0,0);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$window->show_all();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Gtk2->main();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sub repeat_call {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $bAvail = 0;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $ret = 0;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $buffer;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$bAvail = "\x00" x 4;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$ret = PeekNamedPipe($hnd,undef,0,undef,$bAvail,undef);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(!$ret) {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $err = Win32::GetLastError();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>die "PNP failed $err $^E";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$bAvail = unpack('L', $bAvail) . "\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if($bAvail > 0) {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>sysread($rfh,$buffer,$bAvail);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>chomp($buffer);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my (@q) = split(/\n/,$buffer);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>foreach my $qq (@q){</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>chomp($qq);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>push @queue, $qq;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>action_call();</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while (Gtk2->events_pending()) {Gtk2->main_iteration();}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 1;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sub action_call {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $count = @queue;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if($count){</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>my $line = shift(@queue);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>print $line . "\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span><br />
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<b>Note:</b><br />
If you have a better method please share, anybody can comment! :)renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-3474848161519377722013-11-27T07:19:00.000+08:002013-12-05T18:02:27.682+08:00HowTo: Install Epson L110 in FedoraStep 1: download Epson L110 driver on Epson's official website (you need to press the accept button to see all available files) <a href="http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=SG&CTI=4&PRN=L350%20Series&OSC=LX">http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=SG&CTI=4&PRN=L350%20Series&OSC=LX</a><br />
<br />
Step 2: select your system architechture (download only .rpm files)<br />
<br />
Step 3: open your terminal<br />
<br />
Step 4: su -<br />
<br />
Step 5: cd Downloads (or wherever you placed your downloaded files)<br />
<br />
Step 6: yum localinstall your-downloaded-file.rpm<br />
(ex. yum localinstall epson-inkjet-printer-201207w-1.0.0-1lsb3.2.x86_64.rpm)<br />
<br />
Step 7: tada! your Epson Printer Driver is now installed! You can now see the Epson L110 driver when you are installing your printer!<br />
<br />
** Notes **<br />
You need to install the driver for the printer to work properly, before I used Epson NX100 driver on an Epson L100 printer and it works fine, if you used the same driver on the L110, when you are printing a document, it will simply feed and eject your paper for many many times, maybe infinite!<br />
<br />
If somehow you cannot download from the link above, leave a comment and your email and i'll email to you a copy of the files, both i486 and x86_64renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-24078580879732250072013-10-22T10:21:00.000+08:002014-01-19T05:19:15.290+08:00HowTo: Install gphoto2 in windows 7<span style="line-height: 15.203125px;"><span style="background-color: black; font-family: inherit;">Step1:</span></span><br />
<span style="line-height: 15.203125px;"><span style="background-color: black; font-family: inherit;">download these files</span></span><br />
<span style="line-height: 15.203125px;"><span style="background-color: black; font-family: inherit;">libusb-win32</span></span><br />
<span style="line-height: 15.203125px;"><span style="font-family: inherit;"><a href="http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/" style="background-color: black;">http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/</a></span></span><br />
<span style="background-color: black;"><span style="line-height: 15.203125px;"><span style="font-family: inherit;"><br /></span></span>
<span style="line-height: 15.203125px;"><span style="font-family: inherit;">gphoto2</span></span></span><br />
<span style="line-height: 15.203125px;"><span style="font-family: inherit;"><a href="https://code.google.com/p/scan-manager/downloads/detail?name=gphoto-2.4.14-win32-build2.zip&can=2&q=" style="background-color: black;">https://code.google.com/p/scan-manager/downloads/detail?name=gphoto-2.4.14-win32-build2.zip&can=2&q=</a></span></span><br />
<span style="background-color: black;"><span style="line-height: 15.203125px;"><span style="font-family: inherit;"><br /></span></span><span style="line-height: 15.203125px;"><span style="font-family: inherit;">Step2: </span></span></span><br />
<span style="line-height: 15.203125px;"><span style="background-color: black; font-family: inherit;">extract both files and put them in drive c:\</span></span><br />
<span style="line-height: 15.203125px;"><span style="background-color: black; font-family: inherit;">-plug-in your camera and turn it on</span></span><br />
<span style="background-color: black;"><span style="line-height: 15.203125px;"><span style="font-family: inherit;">-open the folder </span></span><span style="line-height: 15.203125px;">C:\libusb-win32-bin-1.2.6.0\libusb-win32-bin-1.2.6.0\bin</span></span><br />
<span style="background-color: black; line-height: 15.203125px;">-double click on inf-wizard</span><br />
<span style="background-color: black; line-height: 15.203125px;">-select your camera on the list</span><br />
<span style="background-color: black; line-height: 15.203125px;">-press install button</span><br />
<span style="background-color: black; line-height: 15.203125px;">-press done</span><br />
<span style="background-color: black;"><br /></span>
<span style="background-color: black; line-height: 15.203125px;">Step3:</span><br />
<span style="background-color: black; line-height: 15.203125px;">-open command prompt and type the following</span><br />
<span style="background-color: black; line-height: 15.203125px;">cd c:\gphoto-2.4.14-win32-build2\win32</span><br />
<span style="background-color: black;"><span style="line-height: 15.203125px;"><br /></span>
<span style="line-height: 15.203125px;">(Choose between Step4a or Step4b)</span></span><br />
<span style="background-color: black; line-height: 15.203125px;">Step4a:</span><br />
<span style="background-color: black; font-family: inherit; line-height: 15.203125px;">set CAMLIBS=./camlibs</span><br />
<span style="font-family: inherit;"><span style="background-color: black; line-height: 15.203125px;">set IOLIBS=./iolibs</span></span><br />
<span style="background-color: black; line-height: 15.203125px;">gphoto2.exe</span><br />
<span style="background-color: black;"><span style="font-family: inherit;"><span style="line-height: 15.203125px;"><br /></span></span>
<span style="font-family: inherit;"><span style="line-height: 15.203125px;">Step4b:</span></span></span><br />
<span style="font-family: inherit;"><span style="background-color: black; line-height: 15.203125px;">gphoto2.bat</span></span><br />
<span style="background-color: black;"><span style="font-family: inherit;"><span style="line-height: 15.203125px;"><br /></span></span>
<span style="font-family: inherit;"><span style="line-height: 15.203125px;">Step5:</span></span></span><br />
<span style="line-height: 15.203125px;"><span style="background-color: black; font-family: inherit;">gphoto2.exe --auto-detect</span></span><br />
<span style="background-color: black;"><span style="line-height: 15.203125px;"><span style="font-family: inherit;"><br /></span></span>
<span style="line-height: 15.203125px;"><span style="font-family: inherit;">*your camera should be detected by gphoto2*</span></span></span>renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com25tag:blogger.com,1999:blog-2255774173609198130.post-62093883586030432032013-10-15T14:03:00.001+08:002013-10-15T14:03:40.261+08:00Fedora 18 and mount.cifs not mounting windows shareIf you are having problem mounting a window share in Fedora 18, saying "Permission Denied" just like the one below:<br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[root@localhost ~]# mount.cifs //192.168.0.50/customer /ian -o user=administrator</span><br />
<b><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Password for administrator@//192.168.0.50/customer: ***</span></b><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mount error(13): Permission denied</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)</span><br />
<br />
<br />
Try this solution: (add sec=ntlm on the option)<br />
<br />
<pre style="border: 0px; color: #222222; direction: ltr; line-height: 19px; overflow: hidden; padding: 0px; width: 867px;"><code style="display: inline-block; padding: 0.75em;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mount.cifs //192.168.0.50/customer /ian -o user=administrator,sec=ntlm</span></code></pre>
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-47578636699926598512013-03-28T12:34:00.003+08:002013-03-28T12:40:59.187+08:00HowTo: Post FarmVille2 Request to Selected FriendsStep1: click the "gear" button on the upper right portion of facebook and click on the Account Settings<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-dzVuvFpX82M/UVPG4ionP8I/AAAAAAAAAF8/4OY2iuRnXIw/s1600/00.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-dzVuvFpX82M/UVPG4ionP8I/AAAAAAAAAF8/4OY2iuRnXIw/s640/00.jpg" width="640" /></a></div>
<br />
Step2: click on the Apps in the menu at the right side<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-d_jYN9UR7TE/UVPHUPTTiuI/AAAAAAAAAGE/H4z4G5GD4Ic/s1600/01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-d_jYN9UR7TE/UVPHUPTTiuI/AAAAAAAAAGE/H4z4G5GD4Ic/s320/01.jpg" width="165" /></a></div>
Step3: edit the FarmVille2 app and modify the Visibility of app and posts and select custom<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6z7sqpttRro/UVPHfOXVy1I/AAAAAAAAAGM/JRaRaBFxYNU/s1600/02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="368" src="http://3.bp.blogspot.com/-6z7sqpttRro/UVPHfOXVy1I/AAAAAAAAAGM/JRaRaBFxYNU/s640/02.jpg" width="640" /></a></div>
<br />
Step4: modify the "These people or lists" under the "Share this with" and select "Specific People or Lists" and add your buddies names on the text box below. These people will be the only ones who will receive all your farmville2 post. Click the Save Changes button.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-OjQ5-ZkkK_Q/UVPHtEBcNUI/AAAAAAAAAGU/hybtn2dVFT0/s1600/03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="506" src="http://3.bp.blogspot.com/-OjQ5-ZkkK_Q/UVPHtEBcNUI/AAAAAAAAAGU/hybtn2dVFT0/s640/03.jpg" width="640" /></a></div>
** WARNING ** dont forget to add to this list all your new farmville2 friends so they may also receive your posts regarding FarmVille2!! Enjoy!renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-74126438684609200922013-03-15T12:07:00.000+08:002013-03-15T12:07:38.377+08:00HowTo:Google Chrome from Tagalog to EnglishStep1: open google chrome<br />
Step2: click the menu button on the upper right and click "Mga Settings"<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-_6g2_p5giSg/UUKb6cqwpyI/AAAAAAAAAFU/aAf5Yt9sFcU/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="http://4.bp.blogspot.com/-_6g2_p5giSg/UUKb6cqwpyI/AAAAAAAAAFU/aAf5Yt9sFcU/s640/2.png" width="640" /></a></div>
<br />
<br />
Step3: type "wika" in the search box and press enter and click on the "Mga setting ng wika at input" button<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-K-wa7ajiO5U/UUKcFEXHMgI/AAAAAAAAAFc/86p4boa3z78/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="http://4.bp.blogspot.com/-K-wa7ajiO5U/UUKcFEXHMgI/AAAAAAAAAFc/86p4boa3z78/s640/4.png" width="640" /></a></div>
<br />
<br />
Step4: drag the :"Filipino" at the bottom, and Drag the Ingles (Estados Unidos) at the top, then press the button "Ipakita ang google chrome sa wikang ito" and press the "Tapos na" button.<br />
**WARNING: DO NOT PUT THE Ingles at the top, always use Ingles (Estados Unidos)**<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-yaEt63I8nPY/UUKeTY5pjaI/AAAAAAAAAFo/pIhRhd6nOCY/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-yaEt63I8nPY/UUKeTY5pjaI/AAAAAAAAAFo/pIhRhd6nOCY/s640/6.png" width="640" /></a></div>
<br />
<br />
Step5: restart your browser!renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-28926697068112879752013-03-14T14:25:00.001+08:002013-03-14T14:25:37.198+08:00HowTo: Determine Motherboard in Windows7Step1: open command prompt<br />
Step2: type this<br />
wmic baseboard get product,Manufacturerrenegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-5131693221936851552013-03-08T20:58:00.003+08:002013-10-10T10:59:27.062+08:00HowTo: Install Gtk2 in ActivePerl in Windows 7This was tested in the ActivePerl 5.14.2 and 5.16.2<br />
Step1: open Perl Package Manager<br />
Step2: click on preferences (the gear thingy) on the upper right corner<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-lgEp-7yzDBU/UTneLGA4fTI/AAAAAAAAAEs/XVIzyyZOtas/s1600/ppm.jpg" imageanchor="1"><img border="0" src="http://1.bp.blogspot.com/-lgEp-7yzDBU/UTneLGA4fTI/AAAAAAAAAEs/XVIzyyZOtas/s1600/ppm.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Step3: select the sisyphusion :: Math, PDL, Gtk2 and other ad hoc and press Add button then press OK<br />
<br />
Name: sosyphusion<br />
Location: http://www.sisyphusion.tk/ppm<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-0xLxV3aS9B8/UTnfDy7nhJI/AAAAAAAAAE0/D_v4-kTfevU/s1600/preferences.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="http://3.bp.blogspot.com/-0xLxV3aS9B8/UTnfDy7nhJI/AAAAAAAAAE0/D_v4-kTfevU/s320/preferences.jpg" width="320" /></a></div>
<br />
<br />
Step4: follow the arrows from 1 to 5 in the diagram below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-vNkn8PHVRIQ/UTngT6KHedI/AAAAAAAAAE8/3iKX7EgDvQY/s1600/install.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-vNkn8PHVRIQ/UTngT6KHedI/AAAAAAAAAE8/3iKX7EgDvQY/s1600/install.jpg" /></a></div>
<br />
Step5: Gtk2 is now installed!!<br />
<br />
Thanks to one of our Commentor, (<cite class="user" style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; font-style: normal; font-weight: bold; line-height: 19px;">Anonymous</cite><span class="icon user" style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; font-weight: bold; line-height: 19px;"></span><span class="datetime secondary-text" style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; margin-left: 6px;"><a href="http://foobaring.blogspot.com/2013/03/howto-install-gtk2-in-activeperl-in.html?showComment=1372855988186#c1987481239033099374" rel="nofollow" style="color: #939393; text-decoration: none;">July 3, 2013 at 5:53 AM</a>)</span> suggested you do the following if your installation fails with this message <span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">"The package Gtk2 has already installed a file that package Pango wants to install."</span><br />
<span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;"><br /></span>
<span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">Anyway, in order to successfully install it under (at least) ActiveState Perl 5.16.3 you need to :</span><br />
<span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">Step 1 .. Step 3 : same as shown above</span><br style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;" /><span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">Step 4 : exit PPM GUI</span><br style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;" /><span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">Step 5 : on command line (cmd.exe) enter :</span><br style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;" /><br style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;" /><span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">ppm install Gtk2 --force</span><br style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;" /><br style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;" /><span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;">Step 6 : enjoy !</span><span style="background-color: white; color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px; text-align: justify;"><br /></span>
<div style="text-align: justify;">
<span style="color: #595959; font-family: 'Courier New', Courier, FreeMono, monospace; font-size: 14px; line-height: 19px;">** I tried this and it works like a charm ** thanks anonymous</span></div>
<div style="text-align: justify;">
<span style="color: #595959; font-family: Courier New, Courier, FreeMono, monospace;"><span style="font-size: 14px; line-height: 19px;"><br /></span></span></div>
renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com4tag:blogger.com,1999:blog-2255774173609198130.post-48152171502652910442013-02-22T07:28:00.002+08:002013-02-22T07:36:26.286+08:00HowTo: sort nautilus icons in fedora 18This will sort the folders first before the files.<br />
<br />
<div style="text-align: center;">
Before</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-4DuarOMpUis/USaujY2Z39I/AAAAAAAAAEU/4WZ91Xg_w_A/s1600/Screenshot+from+2013-02-22+07:31:02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="http://1.bp.blogspot.com/-4DuarOMpUis/USaujY2Z39I/AAAAAAAAAEU/4WZ91Xg_w_A/s320/Screenshot+from+2013-02-22+07:31:02.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
After</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-KxfrXUVOC10/USau5sDq-DI/AAAAAAAAAEc/C_Q-1NFStHw/s1600/Screenshot+from+2013-02-22+07:33:39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="http://3.bp.blogspot.com/-KxfrXUVOC10/USau5sDq-DI/AAAAAAAAAEc/C_Q-1NFStHw/s320/Screenshot+from+2013-02-22+07:33:39.png" width="320" /></a></div>
<br />
<b>Step 1:</b><br />
open terminal<br />
<br />
<b>Step 2:</b><br />
type this on the terminal<br />
<span style="background-color: yellow;"><span style="color: #444444; font-family: Courier New, Courier, monospace; font-size: x-small;">gsettings set org.gnome.nautilus.preferences sort-directories-first true</span></span>renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-45754524590074140612013-02-15T21:44:00.001+08:002013-02-18T11:42:55.466+08:00HowTo: fix linux cp always ask for overwriteDo you want to remove the overwrite feature of cp? use the command below when coping files.<br />
<br />
\cp -Rf filetocopy.txt destination.txt<br />
** simply add a slash at the front of the cp command because cp is aliased by default to cp -i **renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com0tag:blogger.com,1999:blog-2255774173609198130.post-57669735319919064862013-02-14T06:52:00.000+08:002013-02-14T06:52:04.777+08:00HowTo: Install Alacarte on Fedora 18go to terminal and type the following<br />
su -<br />
yum install -y alacarte<br />
(horay your done!)renegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com1tag:blogger.com,1999:blog-2255774173609198130.post-72698078237505928102013-02-08T15:13:00.000+08:002013-02-15T21:06:45.019+08:00HowTo: Install WinRAR in Fedora 18Step1:<br />
download <b style="background-color: white; font-family: Arial, sans-serif; font-size: 13px;"><a href="http://www.rarlab.com/rar/rarlinux-x64-4.2.0.tar.gz" style="background-color: white; font-family: Arial, sans-serif; font-size: 13px;">RAR 4.20 for Linux x64</a></b><br />
or you may get this at <a href="http://www.rarlab.com/download.htm">http://www.rarlab.com/download.htm</a><br />
<br />
Step2:<br />
open your file browser and go to your Downloads folder<br />
extract rarlinux-x64-4.2.0.tar.gz<br />
this will create a rar folder<br />
<br />
Step3:<br />
open a terminal and type<br />
su -<br />
cd /home/**username**/Downloads/rar<br />
make<br />
make install<br />
<br />
<br />
<b>How To Use:</b><br />
Nautilus File Browser<br />
a) you can now start un-rar-ing things by right clicking on them and press on extract**<br />
<br />
Terminal<br />
a) to extract files to the directory you are currently at<br />
unrar e file.rar<br />
<br />
b) to extract files to the Desktop<br />
unrar e file.rar /home/user/Desktoprenegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com4tag:blogger.com,1999:blog-2255774173609198130.post-46066183974169692372013-01-31T09:11:00.001+08:002013-02-05T09:37:00.095+08:00HowTo: Enable Desktop in Fedora 18This settings will give your Fedora 18 a much more familiar look and feel. This will move you to <b>fallback mode </b>and enable your desktop.<br />
<br />
Step 1:<br />
open terminal and type the following (double check your typings!!)<br />
<br />
<div class="yui_3_7_2_16_1359595622570_59" id="yiv1342638796yui_3_7_2_17_1359595305148_54" style="font-family: arial, helvetica, sans-serif;">
<span id="yui_3_7_2_16_1359595622570_95" style="font-size: 13px;"><span style="color: #999999;"><span id="yui_3_7_2_16_1359595622570_106" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">gsettings set org.gnome.desktop.session session-name gnome-fallback</span></span></span></div>
<div id="yiv1342638796yui_3_7_2_17_1359595305148_54" style="font-family: arial, helvetica, sans-serif;">
<span id="yiv1342638796yui_3_7_2_17_1359595305148_104" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px;"><span style="color: #999999;"><span id="yiv1342638796yui_3_7_2_17_1359595305148_113">gsettings set org.gnome.desktop.background show-desktop-icons true</span></span></span></div>
<div class="yui_3_7_2_16_1359595622570_61" id="yiv1342638796yui_3_7_2_17_1359595305148_54" style="font-family: arial, helvetica, sans-serif;">
<span style="font-size: 13px;"><span style="color: #999999;"><span id="yui_3_7_2_16_1359595622570_90" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">gnome-session-quit</span></span></span></div>
<div>
**your desktop will be logged out**</div>
<div>
<br /></div>
<br />
Step 2:<br />
log back in<br />
<br />
<br />
<b><u>How To Return Back:</u></b><br />
<br />
Step 1:<br />
open terminal and type the following (double check your typings!!)<br />
<br />
<div class="yui_3_7_2_16_1359595622570_59" id="yiv1342638796yui_3_7_2_17_1359595305148_54" style="font-family: arial, helvetica, sans-serif;">
<span id="yui_3_7_2_16_1359595622570_95" style="font-size: 13px;"><span style="color: #999999;"><span id="yui_3_7_2_16_1359595622570_106" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">gsettings set org.gnome.desktop.session session-name gnome</span></span></span></div>
<div id="yiv1342638796yui_3_7_2_17_1359595305148_54" style="font-family: arial, helvetica, sans-serif;">
<span id="yiv1342638796yui_3_7_2_17_1359595305148_104" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px;"><span style="color: #999999;">gsettings set org.gnome.desktop.background show-desktop-icons false</span></span></div>
<div class="yui_3_7_2_16_1359595622570_61" id="yiv1342638796yui_3_7_2_17_1359595305148_54" style="font-family: arial, helvetica, sans-serif;">
<span style="font-size: 13px;"><span style="color: #999999;"><span id="yui_3_7_2_16_1359595622570_90" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">gnome-session-quit</span></span></span></div>
<div>
**your desktop will be logged out**</div>
<div>
<br /></div>
<br />
Step 2:<br />
log back inrenegadexhttp://www.blogger.com/profile/08281620890917099983noreply@blogger.com3