Fixing Android shutting down on screen lock

There are many reasons that can cause Android 4.x versions to shut down on screen lock. If you start facing this problem, then the first thing that you should do is revert the most recent changes - change in settings, newly installed applications etc. - and check if it fixes the problem.

Some known reasons for this issue are -

Enabling/disabling auto start up services in Ubuntu

Services which are automatically started on boot-up can be enabled or disabled using the BootUp Manager (BuM) application in Ubuntu. BuM can also be installed via apt-get -
sudo apt-get install bum
Instructions for other ways to install BuM are provided on the project's homepage linked above.

Also check this great answer on askubuntu for other ways to accomplish this. The upstart method of creating override files described in that answer also works great.

Some typical services which don't necessarily need to be started on boot are -
  • mysql
  • apache(2)
  • postgresql/postgres-xc (if installed)
  • vsftpd - a FTP daemon
  • zramswap -  might not be required on systems with sufficient RAM (~ 4GB or higher)
  • bluetooth 
All services that are disabled from auto-start can be manually started when required using this command -
sudo service <service-name> start

Making Ubuntu Software Center work with KDE Plasma Desktop

After installing the KDE Plasma Desktop on top of Ubuntu 12.10, the Ubuntu Software Center is unable to install or remove any applications. On performing these operations, the software center gives this error message - 

Authentication Error
Software can't be installed or removed because the authentication service is not available. (org.freedesktop.PolicyKit.Error.Failed: ('system-bus-name', {'name': ':1.184'}): org.debian.apt.install-or-remove-package

To fix this issue, install the PolicyKit Authentication Agent for KDE -

sudo apt-get install polkit-kde-1

You might need to logout or restart for the changes to take effect.

Reference -

Adding a volume indicator to the KDE panel in Ubuntu

The volume indicator does not show up in the KDE panel after installing it on Ubuntu 12.10. Installing kmix fixes this issue -

sudo apt-get install kmix

Reference - https://answers.launchpad.net/ubuntu/+question/79037

Why you shouldn't download Wordpress themes and plugins from non-trusted websites

Wordpress themes and plugins might seem harmless and especially impossible to use as a means for spreading trojans and malwares since they mostly consist of text files (PHP, Javascript, CSS, HTML etc) and images. But that assumption would be wrong.

Recently, during a boot time scan of my system using Avast, some files were identified as infected with malware and trojans. The most striking part of this was that the footer.php file of a Wordpress theme was detected as being infected by a Trojan (PHP:Agent-FQ [Trj])! The same theme was installed across 2 local Wordpress installations and the footer.php file was infected in both places.

The theme files were infected due to some base64 encoded text present in them. This does not mean that all encrypted/encoded text is bad. Some free themes have the license/copyright information and the creator's details (name, link etc.) in base64 encoded text in the footer along with some required HTML and PHP code so that removing the copyright information becomes difficult. But this might not be the case everytime.

Leland Fiegel has written a very good article over at Theme Lab which also discusses some measures to check themes with encrypted or encoded code if their use cannot be avoided.

Also, apart from Wordpress, this advice would also apply to any text/ASCII file in general containing encoded or encrypted text.

Tips to speed up Eclipse IDE

Allocate more heap size: This is the most useful tip. This can be done by editing the -Xms and -Xmx JVM flags in the eclipse.ini file which can be found in the same directory as the eclipse.exe file.

Disable breadcrumbs: This will speed up switching between files.

Disable theme animations: Go to Window -> Preferences -> General -> Appearance -> uncheck the 'Enable Animations' checkbox.

Switch to the classic theme: Go to Window -> Preferences -> General -> Appearance -> select the classic theme. Restart eclipse once if you do not see any immediate changes or performance improvement.

Upgrade to a latest version: Juno (version 4.2.x) had several issues but many of these have been addressed and fixed in version 4.2.2.

Disable unnecessary plugin load on startup: Go to Window -> Preferences -> General -> Startup and Shutdown -> uncheck all plugins which don't need to be loaded on startup.

Use the latest JDK for launching Eclipse.

Minimalize file editors: This tip will speed up switching between files and is especially important for Java file editors. Try to disable file editor features which you don't use - e.g. hide line number, disable code folding, disable range indicators.

These settings can be controlled via Window -> Preferences -> General -> Editors -> Text Editors.

Disable automatic builds: This preference might vary from project to project. Automatic builds might not affect small projects but can cause a major hindrance for huge projects. This setting can be toggled from Project -> Build Automatically.

Close unused projects: Right click on a project -> Close Project.

Increase the autocomplete/content-assist timeout:  Java content assist is known to timeout very often in Eclipse Juno. This is a reported bug and should be fixed in newer Juno releases. Until then, the content assist timeout can be increased by setting this flag in the eclipse.ini file: -vmargs -Dorg.eclipse.jdt.ui.codeAssistTimeout=60000.

Also check this.

More references -

Zenburn - A pleasant color scheme for PuTTY

PuTTY's ("Putty" henceforth) default color scheme doesn't work for everyone. Especially, the (pure) blue color used for listing folders; that looks terrible on the black background.

On searching for better color schemes for Putty, I stumbled upon this blog post which shows two color schemes for Putty. Out of these, I settled for the Zenburn color scheme.

Steps to modify Putty's color scheme and saving it to new or already loaded sessions can be found here.

Putty RGB colors/options for the Zenburn color scheme are as follows -
  • Default Foreground - 255/255/255
  • Default Background - 51/51/51
  • ANSI Black - 77/77/77
  • ANSI Green - 152/251/152
  • ANSI Yellow - 240/230/140
  • ANSI Blue - 205/133/63
  • ANSI Blue Bold -135/206/235
  • ANSI Magenta - 255/222/173 or 205/92/92
  • ANSI Cyan - 255/160/160
  • ANSI Cyan Bold - 255/215/0
  • ANSI White - 245/222/179
In addition to the above colors, I applied two more changes to the font (Putty -> Window -> Appearance -> Font Settings) - 
  • Font - Consolas, 10-point
  • Font quality - Default (you can play around with this option to see what suits your screen/display best).

Zenburn theme in a PuTTY console.

Edit: If you're on Windows, check out this Github repo which contains ready made registry files for installing the Zenburn scheme in Putty.

More on the Zenburn color scheme -