tag:blogger.com,1999:blog-1366590451233262722024-02-19T19:20:56.835+11:00My Meaningless Scribbles ...Unknownnoreply@blogger.comBlogger184125tag:blogger.com,1999:blog-136659045123326272.post-18001819818863158532013-10-18T16:38:00.000+11:002013-10-18T16:38:23.872+11:00Ubuntu 13.10 PHPMyAdmin - mcrypt extension is missing<div dir="ltr" style="text-align: left;" trbidi="on">
I am setting up a new Drupal installation with LAMP on Ubuntu (Saucy Salamander - 13.10). Installing the LAMP server and PHPMyAdmin was like a breeze. I just needed the following command:<br />
<blockquote class="tr_bq">
<div style="text-align: left;">
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install lamp-server^ phpmyadmin</span></div>
</blockquote>
Once I logged into the fresh PHPMyAdmin interface, I realized that "mcrypt" module is missing in default Ubuntu installation. The error I found at the bottom of the PHPMyAdmin page simply page said:<br />
<br />
<b>"The mcrypt extension is missing. Please check your PHP configuration."</b><br />
<br />
After doing a quick "apt-cache search", I found the right php5-mcrypt module that I was missing. So I issued:<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install php5-mcrypt</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo service apache2 restart</span></blockquote>
Interestingly, even after this I had the "mcrypt missing" error. So I took a quick look inside my /etc/php5/ directory and found the "mcrypt.ini" inside /etc/php5/conf.d. Now for apache2 PHP5 module, the configuration files are located inside /etc/php5/apache2/conf.d (not in /etc/php5/conf.d). So I realized that although mcrypt was installed for PHP5, it was not being loaded fro Apache.<br />
<br />
So the fix was as shown below. Basically I am just creating a symlink for mcrypt.ini inside PHP5's Apache configuration directory.<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">cd /etc/php5/apache2/conf.d </span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo ln -s ../../conf.d/mcrypt.ini 30-mcrypt.ini</span><br /><span style="font-family: "Courier New",Courier,monospace;">sudo service apache2 restart</span></blockquote>
Hope you find it useful too!</div>
Unknownnoreply@blogger.com11tag:blogger.com,1999:blog-136659045123326272.post-41194755369431650742013-05-16T14:11:00.002+10:002013-05-16T14:11:26.004+10:00Disabling LightDM Lock-screen on Ubuntu 13.04<div dir="ltr" style="text-align: left;" trbidi="on">
I have a custom LXDE on a Lubuntu installation. After the most recent upgrade to 13.04 (Raring Ringtail), I realized all my custom Compiz shortcuts were all overwritten. I used to use Ctrl+Alt+L as a shortcut to launch xscreensaver to lock my screen, which worked coherently with <a href="http://synergy-foss.org/" target="_blank">Synergy</a> that allows me to use my laptop's keyboard and touch-pad to control other machines in the same network. Not surprisingly after the upgrade Ctrl+Alt+L stopped launching xscreensaver and the same key-combination would fire-up LightDM lock-screen. LightDM's lock-screen is actually quite nice and I would love to keep it if it would work with Synergy, but it doesn't. So I had to disable it. Here's how you do it:<br />
<blockquote class="tr_bq">
<span style="color: #3d85c6; font-family: Courier New, Courier, monospace;"><b>gsettings set org.gnome.desktop.screensaver lock-enabled false</b></span></blockquote>
After disabling LightDM, I can launch xscreensaver as shown below to lock my screen:<br />
<blockquote class="tr_bq">
<span style="color: #3d85c6; font-family: Courier New, Courier, monospace;"><b>xscreensaver-command -lock</b></span> </blockquote>
Hope it helps someone in my situation. </div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-136659045123326272.post-76210753930983021152012-12-12T14:18:00.001+11:002012-12-14T15:05:23.815+11:00Disable HP EliteBook Laptop Keyboard HotKey Popups<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<b>Source:</b> <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03462568&jumpid=em_alerts_us-us_Aug12_xbu_all_all_1910438_125555_laptopsandnetbookstablets_critical_000_0">HP Tech. Support</a></div>
<br />
Basically HP is providing some registry keys to preferably enable/disable pop-ups that appear when Caps-Lock, Num-Lock, volume or brightness control buttons are pressed. The pop-ups are very annoying, takes longer than multiple seconds to disappear and appears on top of all other windows.<br />
<br />
So, if you are alike me and want to stop the pop-ups from appearing forever, just download/save the following registry file and import into your registry (Saving the text below into a *.reg file and double-clicking should do the trick in case you haven't ever done it before).<br />
<br />
P.S.<br />
I just realized, the registry trick doesn't work if you have an older version of "HP Hotkey Support" module installed. According to the source page, the latest version can be downloaded from here: <a href="ftp://ftp.hp.com/pub/softpaq/sp57501-58000/sp57879.exe">ftp://ftp.hp.com/pub/softpaq/sp57501-58000/sp57879.exe</a><br />
<br />
<br />
<script src="https://gist.github.com/4264547.js"></script>
</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-136659045123326272.post-57395156626505904822012-09-24T19:29:00.002+10:002012-09-24T19:30:25.845+10:00MiKTex 2.9: Packages and Styles Not Found Error on Windows 8<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNmK-w27EvVy1d22lMEtsNK8OxSb6j6erl5DadcMypJTqNxmYygTy8coG_d1dcOJWsQqLiIXihr9OQaVmVrG-5RWaJruqMuOE7D-H_sOHtlVTHU9xgqYk8Fo-QRDkcZqa7_IpDsp0S78A/s1600/Capture.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNmK-w27EvVy1d22lMEtsNK8OxSb6j6erl5DadcMypJTqNxmYygTy8coG_d1dcOJWsQqLiIXihr9OQaVmVrG-5RWaJruqMuOE7D-H_sOHtlVTHU9xgqYk8Fo-QRDkcZqa7_IpDsp0S78A/s320/Capture.PNG" width="308" /></a></div>
I just tried to compile one of my old Latex documents (which compiles fine on my Linux boxes) on my freshly installed Windows 8 machine with MiKTeX 2.9 and all hell broke loose with different a million "missing package" and "missing styles" error. My document is a IEEE conference paper. So it all started with a "IEEEtran.sty missing" error. Interestingly, although I had "Install missing packages on the fly" set to "Yes" (as can be seen on the screenshot), still I was getting this error.<br />
<br />
A little bit of debugging through the error messages reveals - it's all about file write permission. Windows 8 has a stricter ACL set for the installed programs on write access. Therefore, the "on the fly" installable packages, although were being fetched, were failing to get installed.<br />
<br />
The trivial solution was to launch the "command prompt" (cmd.exe) as administrator and do a "pdflatex document.tex". This time all my missing styles and packages were fetched and installed!<br />
<br />
P.S.<br />
<ul style="text-align: left;">
<li>To manually install Latex packages on Windows 8, run "<i>C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\mpm_mfc_admin.exe", </i>select and install your package.</li>
<li><i> </i>To set your packages to install automatically, run "<i>C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\mo_admin.exe" </i>and set "Install missing packages automatically" to "yes" as shown in the screenshot.</li>
</ul>
</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-136659045123326272.post-30353869740961627772012-09-10T13:38:00.001+10:002013-02-18T12:29:21.268+11:00Fix Error Code 2503/2502 on Windows 8<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqSsUVpyQznr_nCpC3iGV3J6m4Ru1kZI5kYI3unh_wjRdTj8LNYzWNocxvfB4T2Gzga7Dfswv3iXMWJr89TKi0OQnx6qKLOeBPNPDCLqS6VKKOrLLTKxCINhVOqx7aH1t2D7DnlKzSw10/s1600/error-code-2503.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqSsUVpyQznr_nCpC3iGV3J6m4Ru1kZI5kYI3unh_wjRdTj8LNYzWNocxvfB4T2Gzga7Dfswv3iXMWJr89TKi0OQnx6qKLOeBPNPDCLqS6VKKOrLLTKxCINhVOqx7aH1t2D7DnlKzSw10/s320/error-code-2503.PNG" width="320" /></a></div>
I have decided to give Windows 8 a few more days of my life (before deciding if I am going back to Windows 7). So I am re-installing many of the programs that I used everyday on my Windows 7 setup. Some of them are giving me this - "<b>Error code 2503</b>" dialog box followed by one more with "Error code 2502" while installation.<br />
<br />
It appears that these installation packages lack required permissions to access and deploy files necessary files due to Windows 8's strict security model. Right-clicking the installer (MSI or EXE) and selecting <b>"Run as Administrator"</b> solves the issue.<br />
<br />
<b>P.S.</b><br />
Just realized that some of you might still be struggling to find the option <b>"Run as Administrator" </b>in the context menu. Try right-clicking on you MSI or EXE with the <b>Shift</b> button pressed (<b>Shift+Right Click</b> that is), you should have the option now.<br />
<br />
The second option would be to search for the file through Window 8's unified start-button-search.<br />
<ol style="text-align: left;">
<li>Press the Windows key </li>
<li>Type part of the file name and navigate to the file</li>
<li>Now press <b>Ctrl+Shift+Enter</b></li>
</ol>
This will run your MSI or EXE as administrator. Cheers.</div>
Unknownnoreply@blogger.com14tag:blogger.com,1999:blog-136659045123326272.post-43321818301413747202012-09-05T18:14:00.001+10:002012-09-06T01:50:39.964+10:00The Quickest way to edit environment variables in Windows 8<div dir="ltr" style="text-align: left;" trbidi="on">
I am trying to setup my Android development environment on my freshly installed Windows 8 machine and quite obviously I needed to add "tools" and "platform-tools" directory from the Android SDK into my %PATH% environment variable. It took me a good couple of minutes to figure out how to do it under Windows 8. So I thought why not save someone else from wasting 2 minutes of his life. Thankfully it really is a 3 step process once you know how to get there:<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDR3YYAqAQ6rTNbunkqfeAui-o8ILs_clNY0S8Ahah-M0oSA-iKzW3C133DS0oXGziZusS4dG1mG9FKRme9mg0ARjyLOHEYV55tGwcPh-Td4nf2XtqUKuWCKMdAn-BQ3ddT0Re0v5ZHKM/s1600/control-panel.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDR3YYAqAQ6rTNbunkqfeAui-o8ILs_clNY0S8Ahah-M0oSA-iKzW3C133DS0oXGziZusS4dG1mG9FKRme9mg0ARjyLOHEYV55tGwcPh-Td4nf2XtqUKuWCKMdAn-BQ3ddT0Re0v5ZHKM/s320/control-panel.png" width="320" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUDzR2Xq9F2FaE2myBUUY5e4PY0piRmLrSiI3yDU9zco3lInfbw6uxydWJ0Bd2XcrG9mBPC2E2I79J6dK1mJhIOq5F3YroX5HN-JAtLhVj1gkO1E3h1ZC49rDsyH9LXj-FPCYw8ilDOU0/s1600/Untitled2.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUDzR2Xq9F2FaE2myBUUY5e4PY0piRmLrSiI3yDU9zco3lInfbw6uxydWJ0Bd2XcrG9mBPC2E2I79J6dK1mJhIOq5F3YroX5HN-JAtLhVj1gkO1E3h1ZC49rDsyH9LXj-FPCYw8ilDOU0/s320/Untitled2.png" width="310" /></a><br />
<ol style="text-align: left;">
<li>Press the Windows key and just type "control panel" followed by Enter to quickly navigate to Control-Panel.</li>
<li>Now press F3 and type "environment"</li>
<li>That's it, now you should have found a link waiting to be clicked saying "Edit the system environment variables" as shown in the screenshot on the right hand side. Click on that to open the window titled "System Properties" with the "Environment Variables..." button.</li>
</ol>
<div>
<br /></div>
<div>
<b>UPDATE:</b></div>
<div>
<ul style="text-align: left;">
<li>Looks likes it's actually a 2 step process :-). You can simply press Windows key, type "Environment" and navigate to "Settings". It will give you the options to edit both system environment or the user environment variables. Cheers!</li>
</ul>
</div>
</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-136659045123326272.post-24392443315337965152012-08-15T12:51:00.001+10:002012-08-16T00:18:37.129+10:00PDroid (1.32) patch for Android Jelly Bean (AOSP 4.1.1)<div dir="ltr" style="text-align: left;" trbidi="on">
Hi Guys, I ported the PDroid ICS patch to apply against AOSP Jelly Bean source. Here is the <a href="https://github.com/gsbabil/PDroid-AOSP-JellyBean" target="_blank">GitHub repository</a> hosting the patch. I built Jelly Bean with the patch for Motorola Xoom (wingray) and Nexus S (crespo). Everything seems to work! You'll find the build instructions for Ubuntu on GitHub. Cheers!<br />
<br />
[1] <a href="https://github.com/gsbabil/PDroid-AOSP-JellyBean">https://github.com/gsbabil/PDroid-AOSP-JellyBean</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGncthgRp9Y68825QHHzv8P955FG5jzB8gsp6OilzBu3380nRXgW1_DhkS3ujhiJQ3kX3xbYQgsFCd77GruYS_JcWF_4F-A79D5W8-60nVNKtIpOkNT2GH44bRldQJzgOGlgIuJMXIxdg/s1600/device-2012-08-08-202016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="PDroid with Android Jelly Bean on Motorola Xoom Tablet (wingray)" border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGncthgRp9Y68825QHHzv8P955FG5jzB8gsp6OilzBu3380nRXgW1_DhkS3ujhiJQ3kX3xbYQgsFCd77GruYS_JcWF_4F-A79D5W8-60nVNKtIpOkNT2GH44bRldQJzgOGlgIuJMXIxdg/s640/device-2012-08-08-202016.png" title="PDroid with Android Jelly Bean on Motorola Xoom Tablet (wingray)" width="640" /></a></div>
</div>
Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-136659045123326272.post-61296642275428191142012-08-06T16:52:00.002+10:002013-06-05T18:16:04.889+10:00AntiTaintDroid (a.k.a. ScrubDroid)- Escaping Taint Analysis (and stealing private information) on Android for Fun and Profit<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6QlwJG_4ZsYxa4rwCiB6GzkyS5tMO10fek0-M6IU__IRFAQSExSpioT1v1FetjcHBsAL5aTbMD40JJyCFIlbpqjatC1Ziwt4m9suma0iW0YWGwXye04ZvTp5SmuQSBGJRiPdb1XvreJ0/s1600/professor.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6QlwJG_4ZsYxa4rwCiB6GzkyS5tMO10fek0-M6IU__IRFAQSExSpioT1v1FetjcHBsAL5aTbMD40JJyCFIlbpqjatC1Ziwt4m9suma0iW0YWGwXye04ZvTp5SmuQSBGJRiPdb1XvreJ0/s200/professor.png" width="149" /></a></div>
<div style="text-align: left;">
<span style="background-color: yellow;"><b>UPDATE:</b> source code published on <a href="http://gsbabil.github.io/AntiTaintDroid/" target="_blank">Github</a> [2, 5]</span></div>
Good news Everyone! I wrote an app that bypasses <a href="http://appanalysis.org/" target="_blank">TaintDroid</a>'s [1] privacy monitoring features (Taint analysis) in more than a few ways. I will share the app on my <a href="https://github.com/gsbabil" target="_blank">GitHub</a> [2] account very soon. Currently the app is capable of collecting private information such as Android device ID, Google account ID, network ID, IMEI etc. and send it to a pre-configured server (of course without raising any TaintDroid alert). If anyone is interested while I fine-tune my app (add support for reconfigurable server among other small things), please drop me a line in the comments. I would be happy to share how and what I have done.<br />
<br />
To know more about how TaintDroid and Taint analysis works, please read their publications <a href="http://appanalysis.org/pubs.html" target="_blank">here</a> [2]. If you <a href="http://www.google.com.au/search?q=TaintDroid" target="_blank">Google for TaintDroid</a>, you will also find a fair amount of information on what it is and how it works. Thanks for reading my Blog. I will update this post as soon as the next bit is ready.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbSH3llbjiT40yxVtddYNQbF1_TtZ1iyrDiLaqgUYB0MBEpwFYtGd5wYHEU8oNDFBGZDZUAgmX1RstmrOEqosq452gN2ZRBDJro2p2LyYduF6Si43V61DhUwttWSAVu5aRhyphenhyphen9eMS1mey0/s1600/device-2012-08-06-164953.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbSH3llbjiT40yxVtddYNQbF1_TtZ1iyrDiLaqgUYB0MBEpwFYtGd5wYHEU8oNDFBGZDZUAgmX1RstmrOEqosq452gN2ZRBDJro2p2LyYduF6Si43V61DhUwttWSAVu5aRhyphenhyphen9eMS1mey0/s400/device-2012-08-06-164953.png" width="240" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeEBVXiMbVvu16IQ9YLpqAlkffjpmZ3ii7nvOzd3VrazanZiAdl2x7826MCNDoSX7gZYxiZlEFe6pAO-uPw14VAg4JbBy33J_K3-pnUzRPyVlkmEvk77OWx1hXBVKQ9iu73nt1hONhjIQ/s1600/device-2012-08-06-165622.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeEBVXiMbVvu16IQ9YLpqAlkffjpmZ3ii7nvOzd3VrazanZiAdl2x7826MCNDoSX7gZYxiZlEFe6pAO-uPw14VAg4JbBy33J_K3-pnUzRPyVlkmEvk77OWx1hXBVKQ9iu73nt1hONhjIQ/s400/device-2012-08-06-165622.png" width="240" /></a></div>
<br />
<br />
[1]<a href="http://appanalysis.org/" target="_blank"> http://appanalysis.org/</a><br />
[2] <a href="https://github.com/gsbabil">https://github.com/gsbabil</a><br />
[3] <a href="http://appanalysis.org/pubs.html">http://appanalysis.org/pubs.html</a><br />
[4] <a href="http://www.google.com.au/search?q=TaintDroid">http://www.google.com.au/search?q=TaintDroid</a><br />
[5] <a href="http://gsbabil.github.io/AntiTaintDroid/">http://gsbabil.github.io/AntiTaintDroid/</a><br />
</div>
Unknownnoreply@blogger.com813 Garden St, Eveleigh NSW 2015, Australia-33.895426 151.197152-33.8970735 151.1946845 -33.8937785 151.19961949999998tag:blogger.com,1999:blog-136659045123326272.post-44664868185601777482012-06-18T13:30:00.000+10:002012-06-18T13:30:02.022+10:00Android emulator gives "SDL init failure" error on Ubuntu/Linux<div dir="ltr" style="text-align: left;" trbidi="on">
If you are getting the following error:<br />
<blockquote class="tr_bq">
<span style="color: #e06666; font-family: 'Courier New', Courier, monospace;"><b>SDL init failure, reason is: No available video device</b></span></blockquote>
from Android emulator on a Unix/Linux platform, this typically indicates your shell's DISPLAY variable is not pointing to the correct <a href="http://en.wikipedia.org/wiki/Environment_variable" target="_blank">X11 Display</a>. Try launching the Android emulator as shown below. You may add your own parameters as needed as long the <b><span style="font-family: 'Courier New', Courier, monospace;">DISPLAY=:0</span></b> is there.<br />
<blockquote class="tr_bq">
<b><span style="color: #38761d; font-family: 'Courier New', Courier, monospace;">DISPLAY=:0 emulator -kernel your_zImage </span></b><b><span style="color: #38761d; font-family: 'Courier New', Courier, monospace;">-system your_system.img </span></b><b><span style="color: #38761d; font-family: 'Courier New', Courier, monospace;">-ramdisk your_ramdisk.img </span></b><b><span style="color: #38761d; font-family: 'Courier New', Courier, monospace;">-sdcard your_sdcard.img</span></b></blockquote>
<br />
<div>
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-73175281928533163502012-06-13T11:45:00.001+10:002012-06-13T14:22:53.222+10:00Disable New Tab Page in Firefox 13<div dir="ltr" style="text-align: left;" trbidi="on">
Firefox 13 introduced something called "New Tab Page" which shows a history of 9 most visited pages in a tile interface, much like the way Google Chrome does. Actually it looks like the picture below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.extremetech.com/wp-content/uploads/2012/06/firefox-13-new-tab-page-640x439.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="272" src="http://www.extremetech.com/wp-content/uploads/2012/06/firefox-13-new-tab-page-640x439.jpg" width="400" /></a></div>
<br />
But, there are two problems with it. First, if you don't want your browsing history to be shoulder-surfed (someone looking at your browser over your shoulder), this is not a good thing. Second, it actually makes the new tab open a slighter slower than before for which the reason must be obvious.<br />
<br />
Anyway, since there's no point-and-click kind of configuration options anywhere in Firefox 13 to turn this feature off, we need to edit Firefox's hidden global configuration settings. This settings interface can be reached by typing "<a href="http://kb.mozillazine.org/About:config" target="_blank"><b><span style="font-family: 'Courier New', Courier, monospace;">about:config</span></b></a>" in the address bar and pressing enter. It will show you a plethora of Firefox's internal options. Most of these options are explained in "<a href="http://kb.mozillazine.org/" target="_blank">Mozilla Knowledge Base</a>". In order to turn off the new tab page, the two relevant options are:<br />
<ol style="text-align: left;">
<li>browser.newtab.url</li>
<li>browser.newtabpage.enabled</li>
</ol>
You can quickly locate these two by typing "newtab" in the search bar. As the name suggests, the first option is set to "<b style="font-family: "Courier New",Courier,monospace;">about:newtab</b>" as default which is the page that displays the 9 most visited page links in tiled interface. We can set it to "<b style="font-family: "Courier New",Courier,monospace;">about:blank</b>" to force disable the new tab page feature. The second option is better is setting it to "<b><span style="font-family: 'Courier New', Courier, monospace;">false</span></b>" (by right clicking and selecting "Toggle" from the menu) will disable new tab. Next time we click the plus icon in the tab-bar or press Ctrl+T, Firefox will open new tab page without the tiled history links. Cheers!<br />
<br /></div>Unknownnoreply@blogger.com15tag:blogger.com,1999:blog-136659045123326272.post-2057560378321268152012-06-07T14:29:00.001+10:002013-08-28T15:48:36.204+10:00Ubuntu 12.04 – How to use VNC even at the login prompt<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
I have a partially headless desktop machine on my desk only connected with a monitor. I typically use this machine for heavy duty computation or simulation. The machine is more than decent hardware wise. But I have a decent enough laptop where I like to keep all my day to day stuffs. Given the scenario, if I should ever have to use keyboard and mouse on the desktop machine, I would typically use <a href="http://synergy-foss.org/" target="_blank">Synergy</a> to control the desktop using the keyboard and mouse from my laptop. Since the desktop has a much larger screen, it is quite convenient that way for many specific things. The desktop runs a SSH server. So, I can login over SSH and start the Synergy client which would connect back to the Synergy server running on my laptop. The setup is actually quite handy.<br />
<br />
Now, there’s a catch. The problem is that synergy refuses to bind to the keyboard and mouse on the desktop machine due to missing X authentication credentials at the login prompt. Since at the login prompt, the user (me@desktop) hasn’t logged in yet. So, he (me@desktop) doesn’t have a proper X credential yet. Apparently, there is no easy way to pass the custom <a href="http://en.wikipedia.org/wiki/MIT-MAGIC-COOKIE" target="_blank">MIT-MAGIC-COOKIE</a> to synergy. Therefore, I decided to fall back to <a href="http://en.wikipedia.org/wiki/Vnc" target="_blank">VNC</a>, which is also occasionally useful when I am working remotely.<br />
<br />
Ubuntu 12.04 Precise Pangolin (I think 11.10 too) comes with <a href="http://www.freedesktop.org/wiki/Software/LightDM" target="_blank">LightDM</a> as the login and display manager. Therefore, the desktop environments such as GNOME, KDE or LXDE would be started by LightDM only after the login has been successful. As mentioned before, Synergy can’t work in this phase because the X server authentication credentials from LightDM can not be passed easily. Therefore, to type in the password at LightDM login prompt, I use <a href="http://en.wikipedia.org/wiki/X11vnc" target="_blank">x11vnc</a>. On Ubuntu, a quick “<b><span style="font-family: 'Courier New', Courier, monospace;">apt-get install x11vnc</span></b>” will install it. The reason I like it a lot is mostly because it can be used like a regular console utility to start-up the VNC service. For example, I could just do “<span style="font-family: 'Courier New', Courier, monospace;"><b>x11vnc –display :0</b></span>” to quickly setup a VNC session over SSH and then login remotely over VNC. The additional benefit would be that VNC will be passed thru SSH (by means of SSH port forwarding), it will be way more secure than just plain VNC. So, coming back to where we were - to start x11vnc at the login prompt, a typical “<b><span style="font-family: 'Courier New', Courier, monospace;">x11vnc –display :0</span></b>” wouldn’t work. Because the X server will refuse authentication as we need the authentication credentials for the LightDM service which is started as “<b><span style="font-family: 'Courier New', Courier, monospace;">root</span></b>”. x11vnc provides an “-auth auto” option. But, it will also mostly likely fail because the “<b><span style="font-family: 'Courier New', Courier, monospace;">.</span></b><span style="font-family: 'Courier New', Courier, monospace;"><b>Xauthority</b></span>” file wouldn’t be found.<br />
<br />
To get around this, we need to locate the right “<b><span style="font-family: 'Courier New', Courier, monospace;">.Xauthority</span></b>” file where the <a href="http://en.wikipedia.org/wiki/MIT-MAGIC-COOKIE" target="_blank">MIT-MAGIC-COOKIE</a> is saved. After some snooping around on my file-system, it appears that the LightDM service stores it’s files in “/<b><span style="font-family: 'Courier New', Courier, monospace;">var/lib/lightdm</span></b>” directory. Great! now if we just do a “<span style="font-family: 'Courier New', Courier, monospace;"><b>sudo x11vnc –display :0 –auth /var/lib/lightdm/.Xauthority</b></span>” x11vnc will run in the login prompt and we will be able to use VNC even after login .<br />
<br />
So, to recap, the steps are:<br />
<br />
<ul style="text-align: left;">
<li><span style="font-family: 'Courier New', Courier, monospace;"><b>apt-get install x11vnc openssh-server</b></span></li>
<li>Reboot the machine (or log-out). In my case it’s my desktop.</li>
<li><b><span style="font-family: 'Courier New', Courier, monospace;">ssh user@desktop</span></b>. I would do it from my laptop.</li>
<li><b><span style="font-family: 'Courier New', Courier, monospace;">sudo x11vnc –display :0 –auth /var/lib/lightdm/.Xauthority</span></b></li>
<li>Now, from my laptop I can use any VNC viewer to connect my desktop even in the login prompt.</li>
</ul>
<br />
<br />
<ol><span style="font-size: small;">
</span></ol>
<span style="font-family: Cambria; font-size: small;"> </span> </div>
Unknownnoreply@blogger.com16tag:blogger.com,1999:blog-136659045123326272.post-36436665803499213332012-03-10T22:59:00.001+11:002012-03-11T00:17:47.855+11:00Recovering from repeated crash at Firefox (11 Beta 7) start-up<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<b>Quick Solution</b><br />
<b> </b> </div>
Delete<br />
<ul style="text-align: left;">
<li>session.js</li>
<li>sessionstore.bak</li>
<li>files inside sessions folder</li>
</ul>
from inside your Firefox profile directory. Follow <a href="http://kb.mozillazine.org/Profile_folder_-_Firefox">this page</a> to find out where you profile directory is located.<br />
<div>
<br />
<div style="text-align: left;">
<b>How I found what caused the crash</b></div>
<div style="text-align: center;">
<span style="font-size: large;"><b> </b></span> </div>
After quite few "unresponsive script" error inside Firebug 1.9.1 (mostly on LifeHacker.com and Boston.com) and repeatedly selecting "Stop Script" with no apparent benefit, I chose to kill Firefox from <a href="http://en.wikipedia.org/wiki/Windows_Task_Manager">Windows Task Manager</a> [1]. For those who don't know that it is - try pressing "CTRL+Shift+Esc" on your keyboard or just right-click on your task-bar and select "Start Task Manager". It looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://pcwizkidstechtalk.com/images/stories/windows7taskmanagerprocesses.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://pcwizkidstechtalk.com/images/stories/windows7taskmanagerprocesses.jpg" /></a></div>
<br />
I didn't realize the fun is just about to begin. To my surprise, upon the next restart Firefox started as usual and but quickly crashed. It kept happening much like flashing the Firefox's main window for a second or two and boom, it crashed! This behavior was already a good indication that it might be caused by a corrupted file, most probably a <a href="http://en.wikipedia.org/wiki/Sqlite">SQLite</a> [2] database and this must have happened due to my killing Firefox forcefully using the Windows Task Manager. So, I started to digging around for a resolution.<br />
<br />
First, I tried to start Firefox in <a href="http://kb.mozillazine.org/Safe_Mode" target="">"Safe Mode"</a> with all add-ons disabled as suggested here [3] with "-safe-mode" flag. It didn't work! From my all previous experience, Firefox's safe-mode always seemed the best way to solve crash related problems, buggy extensions and add-ons. But, in this case it kept crashing even in safe-mode.<br />
<br />
Then, I tried to open Firefox in "Private Browsing" mode with the "-private" flag. On Windows 7 (I guess on Vista too), this can be done with right-clicking the Firefox task-bar icon and selecting "Enter Private Browsing". Interestingly, Firefox was able to start in this so-called incognito mode! This was another strong hint that some files must be corrupted in my <a href="http://kb.mozillazine.org/Profile_folder_-_Firefox">"Firefox Profile Folder"</a> [4].<br />
<br />
To try the theory, I closed all running instances of Firefox and I renamed Firefox's <a href="http://kb.mozillazine.org/Profiles.ini_file">"profiles.ini"</a> [5] to "profiles.ini.bak" to force Firefox into creating a fresh new profile. I started Firefox and it successfully created a new profile in my "%APPDATA%\Mozilla\Firefox" directory. The new profile directory was named "an9pz0cj.default". By the way, if you are like me and you love your Firefox's plethora of customized settings and very longs list (77 in my case) of plugins only to profoundly avoid reinstalling them, <i>don't</i> forget to regularly backup your profile directory. My default previous profile directory was called "yn0z15ze.default" and I backed it up in a RAR archive. After generating a fresh profile, which also generated a new profiles.ini, I copied all files (not folders, I decided to try them in the second iteration) from "an9pz0cj.default" and pasted them in "yn0z15ze.default". Windows 7's copy and paste is great. It kept showing me all the conflicts due to size, date-time of source and destination files. I kept the list of the files where the file-size was different. In my case, the list looked like the following:<br />
<ul style="text-align: left;">
<li>cert8.db - SSL certificates are stored here.</li>
<li>chromeappsstore.sqlite -- HTML5 local data store.</li>
<li>content-perfs.sqlite -- Individual settings for pages.</li>
<li>permissions.sqlite -- Permission database for cookies, pop-up blocking, image loading and add-ons installation.</li>
<li>search.sqlite -- Information about search plugins</li>
<li>sessionstore.bak -- saved sessions.</li>
<li>sessionstore.js -- saved previous session</li>
<li>signons.sqlite -- Encrypted saved passwords</li>
<li>TestPilot.log -- Log file.</li>
<li>webappsstore.sqlite -- DOM local storage.</li>
</ul>
I Google'd up on the name of the files and got a rough idea of what they are meant for and how they are used inside Firefox. So, at this point I my preferred profile "yn0z15ze" is working but with some default files which means I must have lost some data, may be some customizations too as the list contains cert8.db, search.sqlite and signons.sqlite etc.<br />
<br />
Now comes the final part - I have to test each of the files above one by one and figure out which one was causing the crash. As you may have gotten the idea already - I love my Firefox and my customizations. So, I wanted to make sure that I lose minimum amount of data due to the crash.<br />
<br />
So, I renamed my previously moved "profiles.ini.bak" to "profiles.ini". By the way, profile.ini looks like below: <br />
<blockquote class="tr_bq" style="font-family: "Courier New",Courier,monospace;">
[General]<br />
StartWithLastProfile=1<br />
<br />
[Profile0]<br />
Name=default<br />
IsRelative=1<br />
Path=Profiles/an9pz0cj.default<br />
Default=1</blockquote>
So, I could have just replaced "an9pz0cj" with "yn0z15ze" and saved profile.ini to achieve switching between profiles. Anyways, I did that anyhow and started copying files as shown on the bulletted list above from "yn0z15ze" RAR archive to now running "yn0z15ze" with some fresh files of "an9pz0cj". I kept restarting Firefox each time to check if Firefox is crashing. After a few iterations of stopping Firefox, copying fresh files into "yn0z15ze" and restarting, I stopped at "sessionstore.js". I copied this file and Firefox crashed!<br />
<br />
Wow, so now I know which file was causing my Firefox to crash! Also, now that I know this file only contains a list of my tabs which I was browsing before the very initial task-manager kill, I can safely disregard this file now ;). Phew, so the case is solved. If you happen to come across a situation like mine, try deleting the "session.js" and/or "sessionstore.bak" and/or files inside "sessions" folder. It's weird that even in Firefox's safe-mode the problem managed to persist. Time for a bug report I guess :). Hope you find it useful.<br />
<br />
[1] http://en.wikipedia.org/wiki/Windows_Task_Manager<br />
[2] http://en.wikipedia.org/wiki/Sqlite<br />
[3] http://kb.mozillazine.org/Safe_Mode<br />
[4] http://kb.mozillazine.org/Profile_folder_-_Firefox<br />
[5] http://kb.mozillazine.org/Profiles.ini_file</div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-57151398161780631692012-01-20T13:05:00.002+11:002012-01-20T13:16:37.254+11:00GTK Theme is not being followed by all GTK Applications (on LXDE)<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Verdana,sans-serif;">On my LXDE (Ubuntu Oneiric 11.10) setup, I have recently discovered that not all GTK applications are getting themed with the GTK theme (Adwaita) of my preference. </span><br />
<br />
<span style="font-family: Verdana,sans-serif;">My first obvious attempt was to reset theme with <i>LXDE Menu > Preferences > Customize Look and Feel</i>. I set Adwaita in the "Gadget" tab. That Didn't help. Many "sudo" applications along with some other normal GTK-3.0 applications (e.g. evince) stills stayed un-themed.</span><br />
<span style="font-family: Verdana,sans-serif;"><br /></span><br />
<span style="font-family: Verdana,sans-serif;">Ubuntu repository apparently has two tools to set GTK-2.0 themes:</span><br />
<ol style="text-align: left;">
<li><span style="font-family: 'Courier New',Courier,monospace;">gtk-chtheme</span></li>
<li><span style="font-family: 'Courier New',Courier,monospace;">gtk-theme-switch</span></li>
</ol>
<div>
<span style="font-family: Verdana,sans-serif;">Gtk-chtheme is much better in my opinion. So, I gave it a shot and selected "Adwaita" from the list of installed GTK theme. Still no change.</span></div>
<div>
<span style="font-family: Verdana,sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana,sans-serif;">Then as a last resort, I wanted check which GTK theme files are actually being accessed during the initialization of the applications. For that, I started Evince from the console with </span><span style="font-family: 'Courier New',Courier,monospace;">strace</span><span style="font-family: Verdana,sans-serif;"> as below:</span></div>
<blockquote class="tr_bq">
<span style="font-family: 'Courier New',Courier,monospace;">strace -e trace=access evince 2>&1 | less</span></blockquote>
<span style="font-family: Verdana,sans-serif;">After a quick checking through the output it was obvious that my GTK-3.0 themes are not being found by the applications and the theme files are being searched for both in:</span><br />
<ol style="text-align: left;">
<li><span style="font-family: 'Courier New',Courier,monospace;">/home/USER-NAME<user_name>/gtk-3.0</user_name></span></li>
<li><span style="font-family: 'Courier New',Courier,monospace;">/home/USER-NAME<user_name>/.config/gtk-3.0</user_name></span></li>
</ol>
<div>
<span style="font-family: Verdana,sans-serif;">On Ubuntu, GTK themes are installed in </span><span style="font-family: 'Courier New',Courier,monospace;">/usr/share/themes</span><span style="font-family: Verdana,sans-serif;">. So, the quick, easy and clean solution to the problem was to create a sym-link to the GTK-3.0 theme of my preference as shown below:</span></div>
<div>
<span style="font-family: Verdana,sans-serif;"><br /></span></div>
<div>
<span style="font-family: 'Courier New',Courier,monospace;">ln -s /usr/share/themes/THEME-NAME<theme_name>/gtk-3.0 /home/USER-NAME<user_name>/gtk-3.0</user_name></theme_name></span></div>
<div>
<span style="font-family: 'Courier New',Courier,monospace;">ln -s /usr/share/themes/THEME-NAME<theme_name>/gtk-3.0 /home/USER-NAME<user_name>/.config/gtk-3.0</user_name></theme_name></span></div>
<div>
<span style="font-family: Verdana,sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana,sans-serif;">After creating the sym-links, I restarted Evince and voila! it's perfectly themed with Adwaita now.</span><br />
<span style="font-family: Verdana,sans-serif;"><br /></span><br />
<span style="font-family: Verdana,sans-serif;">P.S.</span><br />
<span style="font-family: Verdana,sans-serif;">If you ware selecting another themes other than Adwaita, make sure </span><span style="font-family: 'Courier New',Courier,monospace;">/usr/share/themes/THEME-NAME</span><theme_name style="font-family: 'Courier New', Courier, monospace;">/gtk-3.0 </theme_name><theme_name><span style="font-family: Verdana,sans-serif;">actually exists. Not all themes in </span><span style="font-family: 'Courier New',Courier,monospace;">/usr/share/themes/</span><span style="font-family: Verdana,sans-serif;"> are GTK-3.0 compatible and they will miss the </span><span style="font-family: 'Courier New',Courier,monospace;">gtk-3.0</span><span style="font-family: Verdana,sans-serif;"> directory inside the theme folder.</span></theme_name></div>
<br /></div>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-136659045123326272.post-12663117524620737202011-11-11T15:20:00.001+11:002012-03-10T23:12:53.563+11:00Compile NS-2.34 and 2.35 with GCC-4.6<div dir="ltr" style="text-align: left;" trbidi="on">
I stumbled into the compilation issue after upgrading to Ubuntu Oneiric 11.10. The error occurs in "mac-802_11Ext.h" saying something like the following:<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><b>mac/mac-802_11Ext.h</b>: In member function 'u_int32_t PHY_MIBExt::getHdrLen11()':mac/mac-802_11Ext.h:175:19: error: expected primary-expression before 'struct'mac/mac-802_11Ext.h:175:41: error: 'dh_body' was not declared in this scopemac/mac-802_11Ext.h:175:51: error: 'offsetof' was not declared in this scope</span></blockquote>
I found the solution in Ubuntu's patched version of NS-2.35-RC6. The direct link to the patch is here: <a href="http://launchpadlibrarian.net/74445224/ns2_2.35%7ERC6-4_2.35%7ERC6-4ubuntu1.diff.gz">http://launchpadlibrarian.net/74445224/ns2_2.35~RC6-4_2.35~RC6-4ubuntu1.diff.gz</a><br />
<br />
It's really simple. All you have to do is to add <b style="font-family: "Courier New",Courier,monospace;"><span style="background-color: yellow;">#include cstddef<cstddef> </cstddef></span></b> as shown below:<br />
<blockquote class="tr_bq">
#ifndef ns_mac_80211Ext_h<br />
#define ns_mac_80211Ext_h<br />
<span style="background-color: yellow;">#include cstddef<cstddef></cstddef></span><br />
#include "marshall.h"<br />
#include "timer-handler.h"
</blockquote>
Now, NS-2.34 should compile fine with GCC-4.6. Enjoy your simulation!<br />
<br />
P.S. BlogSpot is simply terrible for posting code snippets. For clarity, here's a screenshot of what the code should look like.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/hMUCc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.imgur.com/hMUCc.png" /></a></div>
</div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-136659045123326272.post-6543438737903666622011-10-21T17:09:00.000+11:002011-10-27T16:37:41.403+11:00Google Chrome (Chromium) font anti-aliasing is wrong on LXDE (L)Ubuntu Oneiric (11.10)<div dir="ltr" style="text-align: left;" trbidi="on">
The solution was to add the following in the ~/.fonts.conf<span style="font-size: x-small;"><span style="font-family: 'Courier New',Courier,monospace;"> </span></span><br />
<ul style="text-align: left;">
<li><span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace; font-size: x-small;"><a href="https://gist.github.com/1318856">https://gist.github.com/1318856</a></span></li>
</ul>
<span class="Apple-style-span" style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"></span><br />
<pre class="csharpcode" style="font-family: Consolas, 'Courier New', Courier, monospace; font-size: small;"><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">xml</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">version</span><span class="kwrd" style="background-color: white; color: blue;">="1.0"</span><span class="Apple-style-span" style="background-color: white; color: black;">?</span><span class="kwrd" style="background-color: white; color: blue;"><span class="Apple-style-span" style="color: black;">></span><span class="html" style="background-color: white; color: maroon;">DOCTYPE</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">fontconfig</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">SYSTEM</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="kwrd" style="background-color: white; color: blue;">"fonts.dtd"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">fontconfig</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">match</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">target</span><span class="kwrd" style="background-color: white; color: blue;">="font"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">edit</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">mode</span><span class="kwrd" style="background-color: white; color: blue;">="assign"</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">name</span><span class="kwrd" style="background-color: white; color: blue;">="rgba"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">const</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">none</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">const</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">edit</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">match</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">match</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">target</span><span class="kwrd" style="background-color: white; color: blue;">="font"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">edit</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">mode</span><span class="kwrd" style="background-color: white; color: blue;">="assign"</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">name</span><span class="kwrd" style="background-color: white; color: blue;">="hinting"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">bool</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">true</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">bool</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">edit</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">match</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">match</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">target</span><span class="kwrd" style="background-color: white; color: blue;">="font"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">edit</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">mode</span><span class="kwrd" style="background-color: white; color: blue;">="assign"</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">name</span><span class="kwrd" style="background-color: white; color: blue;">="hintstyle"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">const</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: yellow; color: black;">hintslight</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">const</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">edit</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">match</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">match</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">target</span><span class="kwrd" style="background-color: white; color: blue;">="font"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">edit</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">mode</span><span class="kwrd" style="background-color: white; color: blue;">="assign"</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">name</span><span class="kwrd" style="background-color: white; color: blue;">="antialias"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">bool</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">true</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">bool</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">edit</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">match</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">match</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">target</span><span class="kwrd" style="background-color: white; color: blue;">="font"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">edit</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">mode</span><span class="kwrd" style="background-color: white; color: blue;">="assign"</span><span class="Apple-style-span" style="background-color: white; color: black;"> </span><span class="attr" style="background-color: white; color: red;">name</span><span class="kwrd" style="background-color: white; color: blue;">="lcdfilter"</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">const</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">lcddefault</span><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">const</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">edit</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="html" style="background-color: white; color: maroon;">match</span><span class="kwrd" style="background-color: white; color: blue;">></span><span class="Apple-style-span" style="background-color: white; color: black;">
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><span class="kwrd" style="background-color: white; color: blue;"><</span><span class="html" style="background-color: white; color: maroon;">/fontconfig</span><span class="kwrd" style="background-color: white; color: blue;">></span></span></span></pre>
<br />
One may have to play around with the "hintstyle" to get it right. The available options are:<br />
<ul style="text-align: left;">
<li><span style="font-size: small;">hintslight</span></li>
<li><span style="font-size: small;">hintmedium</span></li>
<li><span style="font-size: small;"> hintfull</span></li>
<li>none </li>
</ul>
</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-136659045123326272.post-3796085759002267192011-10-19T14:10:00.001+11:002011-10-19T14:24:46.215+11:00Ubuntu Oneiric (11.10) DPKG error removing old Linux kernel<div dir="ltr" style="text-align: left;" trbidi="on">
I stumbled into another trouble removing my obsolete packages after upgrading into Ubuntu Oneiric 11.10 with Linux kernel 3.00-12. The problem is with removing the old 64bit kernel 2.6.35-24. The Debian package name is 2.6.35-24. The error I got is following:<br />
<blockquote>
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">[13:41:34] user@machin:[/var/lib/dpkg/info]$ sudo apt-get -f install<br />Reading package lists... Done<br />Building dependency tree <br />Reading state information... Done<br />The following packages will be REMOVED:<br /> linux-image-2.6.35-24-generic<br />0 upgraded, 0 newly installed, 1 to remove and 31 not upgraded.<br />1 not fully installed or removed.<br />After this operation, 139 MB disk space will be freed.<br />Do you want to continue [Y/n]? <br />(Reading database ... 248250 files and directories currently installed.)<br />Removing linux-image-2.6.35-24-generic ...<br />Examining /etc/kernel/postrm.d .<br />run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.35-24-generic /boot/vmlinuz-2.6.35-24-generic<br />update-initramfs: Deleting /boot/initrd.img-2.6.35-24-generic<br />run-parts: executing <span style="color: magenta;">/etc/kernel/postrm.d/zz-extlinux</span> 2.6.35-24-generic /boot/vmlinuz-2.6.35-24-generic<br />P: Checking for EXTLINUX directory... found.<br />P: Writing config for /boot/vmlinuz-3.0.0-12-generic...<br /><span style="color: magenta;">E: /usr/share/syslinux/debian/extlinux: No such file or directory</span><br />run-parts: <span style="color: magenta;">/etc/kernel/postrm.d/zz-extlinux</span> exited with return code 1<br />Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.35-24-generic.postrm line 328.<br />dpkg: error processing linux-image-2.6.35-24-generic (--remove):<br /> subprocess installed post-removal script returned error exit status 1<br />Errors were encountered while processing:<br /> linux-image-2.6.35-24-generic<br />E: Sub-process /usr/bin/dpkg returned an error code (1)</span> </blockquote>
<div>
The highlighted lines told me the error is caused by the <i><b>postrm</b></i> script called <i><b>zz-extlinux </b></i>located in <i><b>/etc/kernel/postrm.d/</b>. </i>I don't know how I managed to have <i><b>extlinux</b></i> installed on my system. If I am not mistaken booting is still managed by <b><i>grub-2</i></b>. So, I decided to remove both extlinux and linux-image-2.6.35-24-generic. But, since my DPKG is already going crazy removing linux-image-2.6.35-24-generic and failing on zz-extlinux, I have to remove the old Linux image first. I quickly patched the zz-extlinux script with an "exit 0" at top followed by an "sudo apt-get -f install". One could also make it non-executable as following as a solution, followe:<br />
<blockquote>
<b><span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;">sudo chmod -x /etc/kernel/postrm.d/zz-extlinux; sudo apt-get -f install</span></b></blockquote>
</div>
<div>
This solved my problem removing the Linux image. Now, I guess one can also remove extlinux considering Grub-2 is the bootloader.</div>
<blockquote>
<span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"><b>sudo apt-get remove --purge extlinux</b></span></blockquote>
<div>
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-13193734193433434312011-10-18T17:18:00.002+11:002011-10-18T17:18:56.934+11:00Changing Gnome-Screensaver Background on Lubuntu 11.10 (Oneiric)<div dir="ltr" style="text-align: left;" trbidi="on">
I had to find a way on Lubuntu flavoured LXDE to lock/unlock the current running desktop session. The obvious easy way is to use xscreensaver and/or gnome-screensaver and do one of the following:<br />
<blockquote>
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;"><b>xscreensaver-command -lock</b></span></div>
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><b>gnome-screensaver-command --lock</b></span></blockquote>
I chose to keep with gnome-screensaver since it is prettier. But immediate annoyance was after locking screen, gnome-screensaver would not retain the same background as current Lubuntu session. After trying so many options (gconf, editing files in /etc), finally I figured - the solution is rather easy.<br />
<br />
It appears Lubutu session keeps a separate sets of options from LXDE. When gnome-screensaver is launched, it takes the background option of LXDE (not Lubuntu). To match same background both on LXDE and Lubuntu, which also matches gnome-screensaver background inside Lubuntu session, the steps are below:<br />
<ol>
<li>Set preferred desktop background on running Lubuntu session by right-click > Desktop Preferences > Background.</li>
<li>Log-out from Lubuntu session.</li>
<li>On the log-in prompt, select LXDE as desktop session to log into.</li>
<li>Once inside LXDE, you'll see the desktop background that gnome-screensaver uses as background.</li>
<li>From the right-click menu, change the background to match your preference.</li>
</ol>
That's all !!! Now, you can log in back into Lubuntu and lock screen by initiating gnome-screensaver (I use a Compiz command shortcut with Ctrl+Alt+L which triggers "gnome-screensaver-command --lock") and desktop background will match.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-66011259621745603672011-10-18T15:33:00.000+11:002011-10-19T14:25:29.909+11:00Ubuntu Oneiric 11.10 - problem with package dictionaries-common<div dir="ltr" style="text-align: left;" trbidi="on">
I started getting troubles with <b>dictionaries-common </b>package right from the beginning of upgrading into Ubuntu Oneiric (11.10). The error message looks kind of like the following:<br />
<br />
<blockquote>
<span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace; font-size: x-small;">
</span><br />
<pre><span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace; font-size: x-small;">Setting up dictionaries-common (1.11.5ubuntu1) ...
update-default-wordlist: Question empty but elements installed for class "wordlist"
dictionaries-common/default-wordlist: return code: "0", value: ""
Choices: , Manual symlink setting
shared/packages-wordlist: return code: "10" owners/error: "shared/packages-wordlist doesn't exist"
Installed elements: american (American English)
Please see "/usr/share/doc/dictionaries-common/README.problems", section
"Debconf database corruption" for recovery info.
update-default-wordlist: Selected wordlist ""
does not correspond to any installed package in the system
and no alternative wordlist could be selected.
dpkg: error processing dictionaries-common (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of xscreensaver-data-extra:
xscreensaver-data-extra depends on dictionaries-common; however:
Package dictionaries-common is not configured yet.
dpkg: error processing xscreensaver-data-extra (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
dictionaries-common
xscreensaver-data-extra
E: Sub-process /usr/bin/dpkg returned an error code (1)
</span></pre>
<span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace; font-size: x-small;">
</span></blockquote>
<div>
May be I was too quick to have skimmed over the error message and did not realize what is missing. It looks like the problem actually is that I do not have any word-list installed (or, somehow uninstalled during the distribution upgrade process) on my machine for the dictionary to point to. The quick solution is to install the preferred word-list as following:</div>
<blockquote>
<b><span class="Apple-style-span" style="color: #0b5394;">sudo apt-get install wamerican-insane</span></b></blockquote>
This should remove fix the package installation error with dictionaries-common package.<br />
<div>
<b><span class="Apple-style-span" style="color: #0b5394;"><br /></span></b></div>
<div>
<b><span class="Apple-style-span" style="color: #0b5394;"><br /></span></b></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-42622344372734967502011-10-18T14:16:00.001+11:002011-10-18T15:37:06.835+11:00Compiz Config Settings Manager (CCSM) crashes with SIGSEGV on (L)ubuntu Oneiric (11.10)<div dir="ltr" style="text-align: left;" trbidi="on">
On my latest Lubuntu 11.10 installation, CCSM stumbles into a segmentation violation (SIGSEGV) if "Desktop Cube" is enabled in Compiz plugins and I try to disable it through CCSM. Since, I managed to convince myself that "Expo" is capable of providing what I really need, I needed a way to disable it without using CCSM. So, for my own future reference and someone who's going through the same kind of nagging crash, the Compiz config file is located here:<br />
<blockquote>
<b><span class="Apple-style-span" style="color: #0b5394; font-family: 'Courier New', Courier, monospace;">/home/$USER/.config/compiz-1/compizconfig/Default.ini</span></b></blockquote>
My list of enabled plugins are below:<br />
<blockquote>
<span class="Apple-style-span" style="color: #0b5394; font-family: 'Courier New', Courier, monospace; font-size: x-small;"><b> [core]</b></span>
<br />
<span class="Apple-style-span" style="color: #0b5394; font-family: 'Courier New', Courier, monospace; font-size: x-small;"><b>s0_active_plugins = core;detection;gtkloader;composite;opengl;copytex;decor;mousepoll;commands;imgjpeg;regex;addhelper;annotate;resize;grid;compiztoolbox;place;imgsvg;imgpng;notification;dbus;gnomecompat;resizeinfo;opacify;wobbly;move;text;loginout;scale;animation;kdecompat;thumbnail;workarounds;scaleaddon;scalefilter;animationaddon;expo;ezoom;switcher;</b></span></blockquote>
All one has to do is remove "cube" (or whichever is causing trouble) from "s0_active_plugins".</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-12053918378989452222011-10-18T11:37:00.001+11:002012-01-20T13:17:50.350+11:00LightDM Fails to Load with (L)ubuntu Oneiric (11.10)<div dir="ltr" style="text-align: left;" trbidi="on">
After my migration from default Ubuntu with Unity and Gnome3 to Lubuntu with LXDE and OpenBox, I realized I have managed to sacrifice beautiful LightDM, the new default login manager on 11.10 and instead, running not so pretty LXDM.<br />
<br />
After realizing that LightDM is missing the first thing to do was obviously:<br />
<blockquote>
<b style="color: #0b5394;"><span style="font-family: 'Courier New', Courier, monospace;">sudo apt-get install lightdm</span></b></blockquote>
Followed by:<br />
<blockquote>
<div style="color: #0b5394; font-family: "Courier New",Courier,monospace;">
<b>sudo dpkg-reconfigure lightdm</b></div>
<div style="color: #0b5394; font-family: "Courier New",Courier,monospace;">
<b>sudo service lxde stop</b></div>
<b style="color: #0b5394;"><span style="font-family: 'Courier New', Courier, monospace;">sudo service lightdm start</span></b></blockquote>
Not much to my surprise on 11.10, LightDM didn't start. After a little digging through the log files located at <b><span style="font-family: 'Courier New', Courier, monospace;">/var/log/lightdm</span></b>, I came across the following:<br />
<br />
<b style="color: #0b5394;">"lightdm can not write to <span style="font-family: 'Courier New', Courier, monospace;">/var/lib/lightdm/.Xauthority</span>"</b> <br />
<br />
Time to check <span style="font-family: 'Courier New', Courier, monospace;">/var/lib/lightdm</span> directory:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: 'Courier New', Courier, monospace;">[11:13:26] user@machine:[/var/lib/lightdm]$ sudo ls -alh</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">total 44K</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwxr-x--- 9 109 130 4.0K 2011-10-14 20:08 .</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwxr-xr-x 74 root root 4.0K 2011-10-17 16:56 ..</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwx------ 4 119 136 4.0K 2011-10-14 15:28 .cache</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwx------ 4 119 136 4.0K 2011-10-14 15:28 .config</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwx------ 3 119 136 4.0K 2011-10-14 15:28 .dbus</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">-rw------- 1 119 136 16 2011-10-14 15:32 .esd_auth</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwx------ 2 119 136 4.0K 2011-10-14 18:29 .gconf</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">-rw------- 1 119 136 0 2011-10-14 19:55 .goutputstream-54JJ3V</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwx------ 2 119 136 4.0K 2011-10-14 15:28 .gvfs</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwxrwxr-x 3 119 136 4.0K 2011-10-14 15:32 .local</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">drwx------ 2 119 136 4.0K 2011-10-14 16:22 .pulse</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">-rw------- 1 119 136 256 2011-10-14 15:32 .pulse-cookie</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: 'Courier New', Courier, monospace;">-rw------- 1 119 136 0 2011-10-14 20:08 .Xauthority</span></span><br />
<br />
After checking <span style="font-family: 'Courier New', Courier, monospace;">/etc/passwd</span> and <span style="font-family: 'Courier New', Courier, monospace;">/etc/group</span>, it confirmed that somehow user-id 119 and groupd-id 136 has gone missing from my system. So, as a quick roll-back, I did the following:<br />
<br />
<b style="color: #0b5394; font-family: "Courier New",Courier,monospace;">sudo apt-get remove --purge lightdm </b><br />
<div style="color: #0b5394; font-family: "Courier New",Courier,monospace;">
<b>sudo mv /var/lib/lightdm /var/lib/lightdm.bak</b></div>
<div style="color: #0b5394; font-family: "Courier New",Courier,monospace;">
<b>sudo apt-get install lightdm</b></div>
<div style="color: #0b5394; font-family: "Courier New",Courier,monospace;">
<b>sudo service lxdm stop</b></div>
<div style="color: #0b5394; font-family: "Courier New",Courier,monospace;">
<b>sudo apt-get remove --purge lxdm</b></div>
<b style="color: #0b5394; font-family: "Courier New",Courier,monospace;">sudo service lightdm start</b><br />
<br />
Voila, LightDM showed up with a nice log-in prompt. Re-installing LightDM, added a new user and group with ids 109 and 130 respectively. Also, the <b style="font-family: "Courier New",Courier,monospace;">ls</b> output in <span style="font-family: 'Courier New', Courier, monospace;">/var/lib/lightdm</span> looks correct.<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">[11:33:08] user@machine:[/var/log/lightdm]$ sudo ls -al /var/lib/lightdm/<br />total 44<br />drwxr-x--- 9 lightdm lightdm 4096 2011-10-18 11:14 .<br />drwxr-xr-x 74 root root 4096 2011-10-18 11:15 ..<br />drwx------ 4 lightdm lightdm 4096 2011-10-18 11:14 .cache<br />drwx------ 3 lightdm lightdm 4096 2011-10-18 11:14 .config<br />drwx------ 3 lightdm lightdm 4096 2011-10-18 11:14 .dbus<br />-rw------- 1 lightdm lightdm 16 2011-10-18 11:14 .esd_auth<br />drwx------ 5 lightdm lightdm 4096 2011-10-18 11:15 .gconf<br />d????????? ? ? ? ? ? .gvfs<br />drwxrwxr-x 3 lightdm lightdm 4096 2011-10-18 11:14 .local<br />drwx------ 2 lightdm lightdm 4096 2011-10-18 11:14 .pulse<br />-rw------- 1 lightdm lightdm 256 2011-10-18 11:14 .pulse-cookie<br />-rw------- 1 lightdm lightdm 49 2011-10-18 11:14 .Xauthority</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span><br />
<b style="background-color: yellow;">Edit (20 Jan 2012):</b><br />
I stumbled into another problem with LightDM after uninstalling <span style="font-family: 'Courier New', Courier, monospace;">gnome-settings-daemon</span>. It looks like the background file to set for LightDM is requested through gnome-settings-daemon for some reason on my system. So, if you have the same problem, a quick <b><span style="color: #0b5394; font-family: 'Courier New', Courier, monospace;">apt-get install gnome-settings-daemon</span></b> will solve the problem.</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-136659045123326272.post-48297528244289401262011-09-27T13:24:00.001+10:002011-10-02T20:55:30.378+11:00Removing "RC" packages on Debian/Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
If you do <i>"dpkg -l"</i>, sometimes you will get to see a long list of packages with the following details:<br />
<ul style="background-color: white; color: #e06666; text-align: left;">
<li><b>rc</b> package-name 0.4-3 package-details</li>
</ul>
Note the "rc" status at the beginning of the package description. Some packages will show up in the <i>"dpkg -l" </i>output even after removing them. The reason behind this is - packages with "rc" status indicate that the packages have been removed but some configuration files for those packages are left on the system.<br />
<br />
To remove these packages, do the following:<br />
<ul style="text-align: left;">
<li><b><span style="color: blue;">sudo dpkg --purge package-name</span></b></li>
</ul>
For a list of packages, run the following:<br />
<ul style="text-align: left;">
<li><b style="color: blue;">dpkg -l | grep ^rc | cut -d ' ' -f3 | xargs sudo dpkg --purge</b></li>
</ul>
<br />
<span style="color: blue;"><b><br /></b></span><br />
<span style="color: blue;"><b><br /></b></span><br />
<span style="color: blue;"><b><br /></b></span><br />
<span style="color: blue;"><b><br /></b></span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-50543169371492646172011-09-02T16:58:00.001+10:002011-09-02T16:59:05.803+10:00Forcing Vim's syntax highlighting (for odd file extensions)<div dir="ltr" style="text-align: left;" trbidi="on">
I often tend to keep backup copies of my C/C++ source files with odd extensions (i.e. something that does not end with CC or C). If these files are opened with Vim, they wouldn't be recognized as they should, which means my CTAGS extension and colored syntax highlighting would both refrain to work. The quick solution to this problem is to tell Vim explicitly about the file type. Here is how one can do it:
<b></b><br />
<blockquote>
<b><i><span class="Apple-style-span" style="color: purple;">:setfiletype c</span></i></b></blockquote>
More information on it, as always:
<b></b><br />
<blockquote>
<b><i><span class="Apple-style-span" style="color: purple;">:help setfiletype</span></i></b></blockquote>
<b>
</b></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-33482804881427648772011-08-24T12:27:00.003+10:002011-08-24T12:35:45.556+10:00Remove Firefox add-ons installed by 3rd Party ApplicationsThe list of add-ons with pointers to the <a href="http://en.wikipedia.org/wiki/XPI">XPI</a> code is here:
<br />
<br /><span style="border: 2px; border-color:#000; font-weight: bold; font-style: italic; color: rgb(153, 51, 153);">HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions</span>.
<br />
<br />Just remove the unwanted entry from the list. Cheers :).
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-25251568661861488772011-08-23T17:57:00.002+10:002011-08-23T18:11:00.128+10:00Multiple Java Console add-on in FirefoxI recently discovered more than one Java console add-on inside my add-ons manager in my Windows 7 machine. Since I only had only one version of JRE (Java Runtime Environment) updated to the latest version, this did not make sense. To make it more of an eye-sore, these add-ons did not have an associated "<span style="font-style: italic;">Remove</span>" button in the add-on manager.
<br />
<br />Some Google-ing revealed these are Java update left-overs. They do not have the "<span style="font-style: italic;">Remove</span>" button because they are installed inside the <span style="font-style: italic;">%ProgramFiles(x86)%\Mozilla Firefox</span> and not inside the <span style="font-style: italic;">%AppData%\Mozilla\Firefox</span> profile directory.
<br />
<br />In my installation, I had the following directories inside %<span style="font-style: italic;">ProgramFiles(x86)%\Mozilla Firefox</span>\<span style="font-style: italic;">extensions</span> directory:
<br /><ul><li>{CAFEEFAC-0016-0000-00<span style="font-weight: bold; font-style: italic; color: rgb(51, 51, 255);">26</span>-ABCDEFFEDCBA}</li><li>{CAFEEFAC-0016-0000-00<span style="font-weight: bold; font-style: italic; color: rgb(51, 51, 255);">23</span>-ABCDEFFEDCBA}</li><li>{CAFEEFAC-0016-0000-00<span style="font-weight: bold; font-style: italic; color: rgb(51, 51, 255);">17</span>-ABCDEFFEDCBA}</li></ul>The blue numbers are indicative to the Java versions. To remove older left-overs, just keep the folder with associated with the latest Java version, which usually is the highest number in the list and delete the others.
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-136659045123326272.post-44028973292025728182011-07-14T15:19:00.003+10:002011-07-14T15:36:14.259+10:00Evince would not start over SSH X-forwarding<span style="font-family:georgia;font-size:100%;"><span style="font-weight: bold;">Evince</span>, which is the primary PDF and PostScript viewer on Ubuntu, recently stopped working on my Ubuntu/Natty (11.04) over SSH X-forwarding. It works flawlessly inside 'gnome-session'. But, would not run as a regular application (e.g. xpdf or gv) over X-forwarded SSH.<br /><br />After digging up a little bit, I found a lots of these message in my </span><span style="font-weight: bold; font-family:georgia;font-size:100%;" >dmesg</span><span style="font-family:georgia;font-size:100%;"> output:<br /><br /><span style="font-style: italic;"><span style="color: rgb(51, 51, 255);">[1305902.871825] type=1400 audit(1310620543.587:75): apparmor="STATUS" operation="profile_remove" name="/usr/bin/evince" pid=20166 comm="apparmor</span></span><span style="font-weight: bold; font-style: italic;"><br /><br /></span>It was obvious that <span style="font-weight: bold;">apparmor</span> [1] was blocking Evince to run outside Gnome session over SSH. A solution to disable the AppArmor block on Evince over SSH connection was suggested here [2]<span style="font-weight: bold; font-style: italic;">:<br /><code class="prettyprint"><br />#inside the gnome-terminal<br />sudo ln -s /etc/apparmor.d/usr.bin.evince /etc/apparmor.d/disable<br />sudo /etc/init.d/apparmor restart<br /></code><br /><br /></span><span>And voila! Now Evince can again be launched over SSH.</span><span style="font-weight: bold; font-style: italic;"><br /><br /></span><span style="font-style: italic;">[1] <a href="http://en.wikipedia.org/wiki/AppArmour">http://en.wikipedia.org/wiki/AppArmour</a></span><span style="font-weight: bold; font-style: italic;"><br /></span><span style="font-style: italic;">[2] <a href="http://ubuntuforums.org/showthread.php?t=1472642">http://ubuntuforums.org/showthread.php?t=1472642</a></span><span style="font-weight: bold; font-style: italic;"><br /></span><br /></span>Unknownnoreply@blogger.com4