Copy on select and right-click paste in Linux (Gnome) terminal

Windows/Putty users get easily into a habit of automatic copying of selected text into clipboard (select to clipboard) and pasting it via right-click. You can see similar features in other terminals, so I was expecting it will eventually land in a Linux GUI terminals as well.

Please note – if you are running Gnome terminal in Centos7, you can jump straight into Dependencies sections below.

I was slightly unpleasantly surprised when I found that for example developers of gnome terminal won’t add this feature – not even as an option – https://bugzilla.gnome.org/show_bug.cgi?id=739215 So I saw it as a challenge with two choices – either to fork it (with all the maintenance overhead) or to create on-the-fly “patch” by using scripting language with a bonus that it would be easily adaptable to other terminals as well. I decided for a second choice. As on Windows there exist quite powerful scripting tools, I expected there must something be even better on Linux too… The short answer is: There isn’t. It is most likely because Linux is open-source, so things can be tweaked in multiple ways… In final I decided to go for python-xlib. Also please note that X has multiple clipboards, which bear the names CLIPBOARD, PRIMARY, SECONDARY. In final I created two separate scripts (daemons), where each does it’s separate job:

terminal_copy_on_select.py – copies selected text immediately from PRIMARY to CLIPBOARD in terminal window if PRIMARY clipboard is changed
terminal_right_click_paste.py – swaps middle and right click buttons if terminal window is activated and restores them back when other window is activated (so you can actually still access former right-click properties via middle button)

I also tried to create systemd startup files and I sort of got them working, but then I realised that I need to start my scripts after user logs into window manager (WM) and not before and in my view at the current stage the systemd is not ready yet to support this task, so I created xdg autostart files instead. Also I wanted to create daemons (scripts) which will NOT periodically look for changes – and eat CPU and battery – but which will be event driven – so script will only make an activity in case of event from WM. (I also found that popular parcellite is NOT event driven and even if you do nothing, it eats CPU and battery). Let’s start:

Tested environment:
First of all – scripts I created are tested on Centos7 Gnome3 install with Gnome terminal, but they should work on other OSes and terminals as well. The key point is that your terminal application contains word “term” in it’s WM class name (more on that in Tuning section below). Scripts are written and tested in Python 2.7, and should work fine in Python 3 as well. Please let me know if you used them successfully in other conditions – such as Ubuntu or other terminals.

Dependencies:
– python
– python-xlib

Before you install any package, verify it is not already installed.
On .rpm based distributions (Fedora,CentOS,Redhat,Suse) you do it via:
$ rpm –q python
$ rpm –q python-xlib

On .deb based distributions (Ubuntu,Mint,Debian) you do it via:
$ dpkg -l python
$ dpkg -l python python-xlib

You will have python most likely installed, but python-xlib is not part of default Centos7 install so you need to download it for example from here:
http://pkgs.org/centos-7/epel-x86_64/python-xlib-0.15-0.8.rc1.el7.noarch.rpm.html
Then install it (as root):
# rpm -ivh python-xlib-0.15-0.8.rc1.el7.noarch.rpm

You can find python-xlib packages for other distributions here: http://pkgs.org/download/python-xlib

Installation:
Download file terminal_copy_paste.tar.gz file from my GitHub page – https://github.com/jj999/linux_terminal_copy_on_select_right_click_paste/raw/master/terminal_copy_paste.tar.gz
Then install it (as root):
# tar -C / -pxvzf terminal_copy_paste.tar.gz

Above command will unpack below files into these folders:
/usr/local/bin/terminal_copy_on_select.py
/usr/local/bin/terminal_right_click_paste.py
/usr/local/bin/terminal_window_testing.py
/etc/xdg/autostart/terminal_copy_on_select.desktop
/etc/xdg/autostart/terminal_right_click_paste.desktop

If you do not need one of the features (for example because you use custom clipboard manager or your terminal program supports one of the features), feel free to delete file you do not need (especially .desktop file).
Now you can log-off and log-back in into your Window manager and both programs should be running (you do not need to restart the computer, just log-off/log-in).

Testing:
After you log back in, you can open terminal and test copy/past functions. If it works as desired, you are done now and you can skip the rest.

For more detailed test, check if daemons are running:
$ ps -ef | grep python | grep terminal_

You should see two lines with process information displayed. If nothing is displayed, there is a problem. In that case, try to start terminal_right_click_paste.py daemon manually as in below example (as normal user) and check for error:
$ /usr/local/bin/terminal_right_click_paste.py

Error will be most likely related to missing dependency – check that section. If you are just testing you can interrupt this daemon with Ctrl+C. Also please note you cannot terminate terminal_copy_on_select.py with Ctrl+C, because it is graphical daemon (without visible GUI elements) so to interrupt it, you need to kill it via another terminal window – to do that check first two steps of Removal/Uninstall section below.

Tuning:
If you wish to adapt both daemons to different terminal (which does not have word “term” in it’s WM class name, then run script which will display the WM class name of your terminal:
$ /usr/local/bin/terminal_window_testing.py
It will also display WM class names of other windows as well as you switch between them. So you can see when the program sees the window change and when it does not.
Once you have the new WM class name of your terminal, replace word “term” to the calss name you found in variable terminal_classs_name at the beginning of below two script:
/usr/local/bin/terminal_copy_on_select.py
/usr/local/bin/terminal_right_click_paste.py

Removal/uninstall:
1. find process numbers of running daemons (as normal user or root) – they will be in the second column in output of below commands:
$ ps -ef | grep python | grep terminal_
2. kill them (as normal user or root):
$ kill found_process_number1
$ kill found_process_number2
3. remove installed files (as root):
# rm /usr/local/bin/terminal_copy_on_select.py
# rm /usr/local/bin/terminal_right_click_paste.py
# rm /etc/xdg/autostart/terminal_copy_on_select.desktop
# rm /etc/xdg/autostart/terminal_right_click_paste.desktop
4. you may restore your mouse buttons after terminal_right_click was terminated (as normal user or root) – this step is optional:
$ xmodmap -e “pointer = 1 2 3”

Caveats:
I tested programs for different scenario and so far I found one:
When you right-click on terminal window frame showing it’s name, menu for resizing/moving will be displayed, and when you right-click again from this menu to the terminal, right-click will be set to middle-button. However if you click second time with left-click, right-click will be OK… Let me know if you find anything else.

Enjoy, leave comments and support… 😉

Posted in gnome terminal, Linux | Tagged , , , , , , , , | Leave a comment

3 unconventional tips to keep your laptop cooler and to extend the battery time

To my surprise I found many tips on the web regarding this topic, but none of them mentioned tips I have for you. So assuming you are following good practice already – such as adding more ram, disabling screen saver (and enabling display turn off instead of it), changing the screen brightness and  setting power options – below are my new tips.

These tips are for laptop users of Linux, Windows and even Apple Macbook users and the first tip does not apply for people who need maximum CPU performance for gaming or heavy computations. However it is fine for “normal” users – you can try it yourselves:

Tip 1: Disable Intel Turbo Boost feature (or do not enable AMD Turbo Core) in BIOS. Modern CPUs have “Turbo” feature which (under some conditions) enables automatic overclocking of CPU cores thus increasing performance. Especially Intel CPUs (Intel Core i3, i5, i7) have Intel Turbo Boost enabled by default. But if you are not doing intensive gaming nor computations, then you do not need extra CPU performance, so you do not need to overclock CPU, so you can disable Turbo Boost.

On most of the PCs it can be disabled in BIOS. In case you do not have that option in BIOS or if you have MacBook, here are the tips for your operating system – on Windows and Linux it is achieved by setting maximum CPU frequency/frequency scaling:

Disabling Turbo Boost can make your laptop 10 – 15 °C cooler – which is noticeable difference. If you are not sure about your CPU demands – you can try it and if you are not happy you can enable it any time.

Another thing you can experiment with (especially in BIOS) is to disable hyper-threading or some of the CPU cores if you have too many of them and you do not use them 😉

Tip 2: Install NoScript extension into your browser
Despite of my First of all let me clarify – this tip is for Firefox users, but in the last two paragraphs of this tip there are links to script for Google Chrome and Safari users as well.

I like Javascript very much and I think we will see it more and more on the websites. However there are still some websites which do not need it for it’s function, so why to enable it? By disabling javascript and other not vital scripts, you extend laptop battery time and it is also good from security point of view – the less complexity on the website, the less can go wrong, so the more secure it is :)

Another motivation to disable javascript or other scripts is security. You can find many references about malicious web-sites/scripts, cross-site scripting etc on the web.
I have also written my previous blog post – an idea – about disabling scripts in the browser in inactive tabs – that would be a good thing to do if it was supported…

There are similar extensions for Google Chrome as well:
There used to be extension NotScripts,  but per Wikipedia, it was removed from Chrome extension store in 09/2014 and it’s replacement is supposed to be ScriptBlock, but it was last time updated in 07/2013 which makes Wiki advice a bit odd… But there is another extension called ScriptSafe.

Also for Apple Safari users, there is extension called Javascript Blocker.

Tip 3: Check which process is eating your CPU resources
Check what is using your CPU permanently by using task-manager in your operating system. For example in Windows you can use task manager and minimize it into tray – but do not keep the current speed – change update speed to low, otherwise task manager (taskmgr) itself can eat CPU… Or you can use alternative system – such as process explorer – but change the update speed to 5 seconds. In other systems I recommend to set the update speed between 3-5 seconds – we are not interested in CPU spikes, but about average long term CPU load – if it is not close to zero and computer is idle (you know you are not watching video or doing anything CPU intensive), then you know there is some process unnecessary eating your CPU = battery. For example – such a graph in process explorer is suspicious and it tells me, something is not completely right –  process-explorer

The prolonged status like this task-manager in the task manager tells me the same thing.
Linux systems have system monitor where you can see the same thing.

So I recommend to have such a system monitor in your tray bar and watch it from time-to-time. By checking it you will also learn when is your system idle and when it is busy. When you realize it is busy, just open your task manager and sort tasks by CPU load and you will find the one eating the CPU permanently. Then you can decide what do to – close that window if you do not need it, change the setup of that program or in the worst case you can uninstall it.

So those are my 3 unconventional advices about saving battery life on your laptop or netbook. Let me know if they were helpful in the comments 😉

 

 

Posted in Apple, Browsers, Firefox, IT, Linux, MacOS, Windows | Tagged , , , , , , , , , , | Leave a comment

Linux Mint Update CLI

I like Linux Mint. The only thing which I was missing was command line version of mintUpdate, so I decided to write one.

First I started to analyze existing version of mintUpdate (in version 17.1 “Rebecca”) and then I “converted” it into CLI version.

So here it is – brand new mintUpdateCLI.py – I placed it on github where you can DOWNLOAD it. Please take it as proof of concept, it has a version number 0.1 and I wanted to try if I can write it at all. I tried to implement all the functions GUI version has and I tried to do it with minimal number of changes to the original code (I took slightly more relaxed approach at the end). It is a pitty mintUpdate does not have it’s algorithms in separate library, to create mintUpdateCLI would be much faster and easier, but it wasn’t as bad at the end considering I managed to do it in several weeks in my free time only.

Also before I show you how to use it, let me explain about updates. Linux Mint updater (mintUpdate.py) groups packages into groups. Grouped updates are called just “updates” but I introduced term “package group” so it is more clear what kind of update it is – if it is single package update or group update which may include one or more single packages.

Usage is simple – download it, change permissions so it is executable and run it.

basic usage is:

mintUpdateCLI.py list – lists package groups for update

mintUpdateCLI.py update
– updates all packages available (as per levels specified)

mintUpdateCLI.py install packagegroup1 packagegroup2 ... – installs only specified package groups

If you do not specify any arguments, help with all options is displayed. I will post some screenshots as well.

It will ask for user password whenever it needs it. It also uses apt-get instead of synaptic (as it is CLI version). I was also surprised to find out apt-get does not support the list of packages to be installed in form of a file – command line is the only option. Luckily Linux Mint command line limit is huge – 262144 bytes (it can be checked by getconf ARG_MAX) and it can be adjusted as kernel parameter if needed.

In my view consolidation of mintUpdate and mintUpdateCLI is a phase 2, where common shared library containing only algorithms is more than desired. Otherwise if any bugs are fixed/new logic is introduced it would have to be changed twice – once for GUI, second time for CLI part. Also I left interaction between CLI and GUI versions open – for example once the system is updated via CLI part, it could send for example sighup to the GUI part so it performs refresh (or performs refresh at the time user interacts with it again).

I’m looking forward for feedback.

Enjoy :)

——————————————–Bottom line:——————————————–
Whilst working on it, I found several Linux and programming anti-patterns.

The first anti-pattern is that there was no CLI version of mintUpdate. In my view every GUI basic component should have CLI equivalent – that’s one of the things which makes Linux different from Windows right? I feel I can allow myself this small rant as I’m actually fixing this by providing CLI version. By the way – NetworkManager started in the same way…

Other anti-patterns regarding mintUpdate are related to programming. I was surprised to find out how are data, algorithms and gtk code mixed together. Another surprise was related to logging. I found nice example describing python logging here. Luckily we live in open-source World, so this can be fixed as well :)

 

Posted in Linux, Linux Mint | Tagged , , , , , | 5 Comments

Hard-drive partitioning tips for small server running Linux

There are many advices how to partition your hard-drives/SSDs on a small server. However I have learned a lesson which I want to share with you, so you won’t do the same mistake. I do not want to tell you exactly how much space to reserve for what partition under particular OS.

Separate /var /usr and /root or not?

For desktop, you do not need it, for small server – it depends… I’m from “old school” when we used to have separate partitions for /root /usr and /var, however times are changing and differences between these partitions are diminishing. Why? Because for example consider you run virtual machines. These include /usr code, but images are stored in /var. Also consider for example DNS server bind – your domains will be stored in /var/named. Not to mention if you run named-chroot, then even your /etc/named configuration will actually be stored in /var partition. Also I do not think there is any risk of running out of space of the /usr partition and by combining partitions together – you actually save the storage space. So I would not go for separate root /usr and /var anymore. Also there is an argument to mount /var with noexec,nodev,nosuid flags, however you will run into problem with most of the chroot implementations (postfix/named etc…), so if you use chroot, you cannot do it anyway… I also tried to search for another arguments for separate /var – I cannot find them – or more precisely – I cannnot find an explanation how will the full root (+usr) partition harm the system? For example Debian manual says "Any partition which can fluctuate, e.g. /var (especially /var/log) should also be on a separate partition." - although it mentions other factors as well – it doesn’t explain why… The only advantage of separate /var (but not /usr) under CentOS I can see is that you can mount it with nosuid flags – as mentioned in CentOS Wiki.

Separate /home however is a good practice. And separate /tmp – maybe or use tmpfs with noexec,nodev,nosuid flags.

I  suggest – follow the advice of your OS/distribution, but also consider your requirements and restrictions – for example – answer the questions:

1.What storage do you have / plan to buy – SSDs or HDDs?

2. Do you want to use software(hardware) raid? (and what type do you want/can afford – 1 or 5 or…)

3. What file systems do you want to use? LVM+EXT4 or BTRFS or even ZFS? You need to consider point 1 here as well.

4. Do you want to use encryption? If yes, what type – only “home”/”data” or full disk encryption? If you decide to go for full disk – please note you will have to enter password on each reboot.

Now I have two advices here:

Advice 1 – why to use encryption: Consider you harddrive or ssd which fails. You need to send it to manufacturer for replacement if it is under warranty or you need to throw it away if it is out of warranty. Please note that even if harddrive/ssd is faulty, it is still possible to obtain data from it. You also do not know what will manufacturer do – they may fix electronics and resell it as refurbished… You know when files are deleted on harddrives/SSDs, they are just “unlinked”, but data are still stored on the media, so this is the reason why to encrypt your storage.

Advice 2 – Create “shadow” system – No matter how you split partitions, for your system, I suggest you to create it twice – or at least reserve the same amount of space and structure as you reserve for your system. An example – Let’s say you go for full storage encryption – well – it is never “full” as you need to boot from something which is not encrypted, so your /boot will stay unencrypted. So if you are partitioning your storage space – reserve for example 1.5GB for /boot and reserve the 1.5GB for another /boot (you do not have assign mount point at that time – you will do it later). Also please note, that especially for /boot the more is better – OSes seem to increase minimal /boot requirements frequently. And then when you for example reserve 30GB for the rest of your system, create additional 30GB partition as well. Also repeat this for any other system partition you decided to have on separate partition. This will allow you to “clone” your existing system partition into the backup partitions and the only thing you need to update in order to boot from backup is grub (also if your system uses UUIDs, then you need to change UUIDs manually after cloning). If you decide you can even install new system into the backup area.

Problem with my server I encountered is that by using LVM on top of luks, I found it is not trivial to resize physical LVM volume and even less trivial to resize luks partition…

Let me know your experience… But as I have to sort it out, my next post can be about it…

Let me know your thoughts or comments.

Posted in disk partitioning, Linux, Security | Tagged , , , , , | Leave a comment

Five Million Gmail Accounts and Passwords leaked

Only today I noticed on CNN news that 5 million of gmail passwords were leaked online. I did some investigation and I found that this leak was originally reported on Russian bitcoin forum. They also published list of e-mail addresses without passwords, but what is even more interesting

– they published the list “gmail.zip” (and inside “gmail.txt”) of e-mail addresses with the first letter of the password.

To download it to check if they had your e-mail and possibly correct password, open forum:

https://forum.btcsec.com/index.php?/topic/9426-gmail-meniai-parol/page-4

Then find an entry from user “tvskit” and search for “Вот тут файл с логинами и первый символ пароля, скачать” which says “That’s where a file with logins and the first character of the password , download”.

User “tvskit” says in his PS something like “There is no password, won’t distribute , won’t give , won’t sell.” – Let’s hope his attitude will last – especially in country like Russia…

Also many users seem to report that passwords are old. “tvskit” also says in his last post at the moment: “I was approached by people (Russia, Brazil, Italy , India , USA , etc. ) in order to check the password , gave them the first and the last character of the password , type “k ****** 0″. It turned out that of the ten tested , one had a working password . The remaining nine people reported that passwords were old and ranged in age from 1-6 years.”

I have to admit, I found one of my e-mails on the list, but first letter does not match – at least something.

Good luck with yours!

(Google translate was used in creation of this post)

 

Posted in gmail, IT, Security | Tagged , , , , | Leave a comment

Installing Sublime Text 3 under CentOS6

I found some guides which did not work for me. Here are steps which worked for me:

1. Download tarball from http://www.sublimetext.com/3 into your home directory.

2. Unpack (alter name as per your build version):

tar -xjvf sublime_text_3_build_3059_x64.tar.bz2

3. Move to desired destination, /opt is default:

sudo mv sublime_text_3 /opt

4. Update below file with your favourite editor, I use vim:

sudo vim /opt/sublime_text_3/sublime_text.desktop

In your editor change the occurrences of “/opt/sublime_text/” to  “/opt/sublime_text_3/”. If you installed sublime into different directory than /opt, then you need to update /opt part as well.

Also change Icon entry :

Icon=/opt/sublime_text_3/Icon/48×48/sublime-text.png

5. Create symlink so you see the editor in your desktop GUI (Gnome/XFCE)

ln -s /opt/sublime_text_3/sublime_text.desktop /usr/share/applications/

 

Posted in Editor, IT | Leave a comment

Review of SlimSaber ROM 4.4.3 06/16 on Galaxy S2/GT-i9100

Hello,

I still have Samsung Galaxy S2/i9100 and I used ROM CyanogenMod cm-10.1.3-i9100 “stable” which is JellyBean based. My main reason for upgrade was that I not very happy with the battery life and also my internal 1.97GB partition got filled and uninstalling apps did not help, so I decided it is time for re-flash.

I did quite a lot of research and I found that there up to hundred of ROMs for my phone to choose from… Many of them focus on tons fancy features, but I have different priorities.

My main expectations of the new ROM were better battery life and security feature to set individual permissions per application. So in final I decided to try SlimSaber ROM:

[ROM][4.4.3][06/16] SlimSaber – i9100 [SlimKat Unofficial Builds] – in following text I consider this link as it’s “homepage”.

So here are my first impressions:

– After first reboot I was impressed that I see TWRP and not CWM. Whilst doing ROM research I wanted to install TWRP on my phone but I actually discovered that it is not supported on i9100 by checking supported HW list on their site – http://teamw.in/twrp_view_all_devices … Well if you install SlimSaber you will have TWRP 😉

There was no issue with the first boot into SlimSaber (first boot in every custom ROM takes longer time which is expected – see deodexed vs odexed).

First think I wanted to change was DPI. Apparently SlimKat ROM has the settings for DPI in system settings/interface, but this is not ported into SlimSaber. I could save myself time if I read FAQ on SlimSaber homepage which recommends to use “Texdroider DPI” app. I first tried to set set value of ro.sf.lcd_density in /system/build.prop to 240 (from SlimSaber default of 180) manually by mounting /system and copying this file to sd cards, updating it and copying back – DON’T DO IT!! It will break build.prop permissions and your phone will not boot. TWRP however works, and as I made backup of whole /system I managed to restore it without the need of second re-flash.

Then I tried two apps I found in play store “LCDDensity” and “LCD Density moderer”. First one works but only if you reboot the phone via the app itself. If you reboot manually, DPI is back – very annoying. Also they sell paid version which is waste of money. So you can either use free “Texdroider DPI” which I haven’t tried or you can use great free app I found – “BuildProp Editor” – it can set DPI and also any other value in build.prop – and the change sustains reboot 😉

Once DPI was set, I thought I have USB connection problem, but there is none. There are just two USB notification lines if you want to use it as mass storage. First you have “Connected as installer” where you can select if you prefer Media device (MTP) or Mass storage (first one is more modern and does not have drive letters in Windows, second one is older and it has drive letters), then “standard” notification will appear “Turn on USB storage” – so you need to do that as well in order to have USB mounted as mass storage.

I experienced and (partially) resolved these issues:

– Media scanner is eating my battery – yes some advices are described in FAQ, but there is no universal fix/solution. As you can see in my previous post of CyanogenMod 10.1.3 review, I experienced the same problem there. And it was JellyBean system… To my dissapointment, the problem was not fixed it KitKat. Actually it gets worse – Both”Rescan Media Root” nor “Rescan Media” do not work under SlimSaber – both crash :( However after some reasearch I found app “Media Scan Switch” – you can find paid version in the marked and free version on xda forums. I used free version only and it works, however GUI is a bit strange and I have to turn media scan manually after every reboot. Also I have to note that SlimSaber has “Media Scanner behavior on boot” option under Settings/Advanced options – even if I set “Do not scan media” – it does not seem to work for me.

– Our “old friend” “system_server” has the same disease as in the CyanogenMod JellyBean. Yes – it is eating battery more when auto-rotate is enabled!!! This is second battery drainage issue which survived from JellyBean into KitKat, however – I’m using custom ROM with it’s own custom kernel, so perhaps something is fixed in stock releases… I would expect screen rotation is done based on some interrupt and not by process constantly polling the sensor… Also I would prefer screen rotation “auto” change when I shake the phone… I let you know when I found out how to do it (without battery drain).

– I’m not signed to Google+ however I noticed that google plus app for some reason eaten almost as much battery as display. So I uninstalled it and it resolved this problem.

– As per SlimSaber web-site recommedation I tried to use CPU governor with “zzmoove” with profile 2 (and I/O scheduler row – which I think was set as default), however with these options I experienced one random phone shut-down (during inactivity) and 2 shutdown during viber call. All of those happened within 2 days. Once I set governor to “ondemand” and I/O scheduler to “noop” I had no shutdown since (for about 5 days).

In final I experience an issue which I was not able to resolve yet:

– Microphone sound is too sensitive and I’m not able to influence it. I noticed in logs of previous versions of SlimSaber that some users complained that mic is too quite. On my phone however it is too sensitive and it is picking sounds which it did not before. My friend who I called could hear cars, planes and when I was in quiet are, she could hear my steps and even my headphone cable touching my jacket while I walked. It is very invonvenient but I did not find a solution to fix it yet… (in the worst case I can recompile…)

What I like on this ROM is for example an option to program behaviour of the right button so when I press it during the call, it won’t terminte the call, it will just turn off the display – very handy.

Overall having experience with this ROM for about 2 weeks – it is nice and stable ROM (if you do not use zzmoove) and once I find the solution how to change the microphone sound, I think I will be happy user for months to come.

-ja

PS. If you are interested, here are my detailed flashing notes:

– I followed instructions on SlimSaber homepage and I came to two points where I was not completely sure if things are going well:

  • Full wipe: data, cache, dalvik cache.

With dalvik cache wipe, I got an error:
E:unknown volume for paht [/sd-ext]:

I found explanation here, that actually there is no concern about it:
http://forum.xda-developers.com/showthread.php?t=1659203

  • Mount system and format system partition manually.

At first I was not sure where to do it, but I have done it in CWM.

 

Posted in Android, custom ROMs, Mobile, Samsung Galaxy S2 GT-I9100 | Tagged , , , , , | Leave a comment

Small review of CyanogenMod cm-10.1.3-i9100 on Samsung Galaxy S2

When trying this “stable” mod, I experienced two battery drainage issues:

1. Media scanner drains battery. Apparently common problem. I found different solutions but the best one I found was to install app called “Rescan Media Root” which disables media scanner completely. I used to re-scan media “on demand” only when I needed.

2. Just by enabling “Show CPU usage” in developer options I discovered there was a another process system_server eating my battery. After doing some research, I found it is caused because my “Auto rotate screen” option is on. Once I disabled auto-rotate, this process stopped eating the battery. I normally do not have rotate screen on, so this was fix I could live with.

Also I appreciate per-app “incognito” mode, but I would prefer to have more granular permission control.

So there was time to move on, so check the review of my next Rom…

Posted in Android, Mobile | Tagged , , , | Leave a comment

Comparison: Samsung Galaxy SII – good phone, but could be more original…

After I realized that 192MB of RAM on my HTC Dream/Google G1 is not sufficient for ever growing apps and my battery died, I decided to look around for a new phone. I got a good deal from my provider (T-Mobile in the UK) and I checked that hardware in Samsung Galaxy SII is powerful and 1GB of RAM plentiful, so I decided to go for it. I was quite happy with this phone until I got iPhone4 into my hands.

I discovered that Samsung Galaxy SII resembles Apple’s iPhone4 in quite many details. I highlighted them on the following picture and I describe them below:

Samsung Galaxy SII

Similarities of Samsung Galaxy SII with iPhone4 from Apple

  1.  One front facing button. One can say that Galaxy SII has also back and settings buttons at each side of the home button but they are not physical buttons and you can even turn off their backlight completely, so they can be completely invisible.  I would rather have track ball (mechanical or optical) instead of one simple button. For that reason one big square button placed in the center below the touch-screen resembles iPhone.
  2. Second similarity with iPhone is line shaped speaker placed above the touch-screen.
  3. Third similarity with iPhone is software phone button used to make calls. The similarity is striking: It is one of the 4 control buttons placed on the bottom of the touch-screen. It is at the first position. It’s color is green. It has white handset placed vertically. It’s color, shape and placement is exactly the same as the one on the iPhone. And it’s description is the same as on the iPhone – it says ‘Phone’.
  4. In order to display which virtual screen is active Samsung decided to use white dots as iPhone4 does. Their function is the same, Samsung only added numbering and you can also tap on any dot to get quickly on particular virtual screen. Extensions are nice, but the idea isn’t original at all.
  5. If you create folder on the screen and you add apps into it, miniaturised icons of those apps will appear on the folder. Possibly it is Android’s feature but Apple has it on it’s iPhone4 as well. That’s why this feature is also not original.
  6. Missing hardware camera button. Many users complained iPhone4 does not have hardware camera button and now they have it in iPhone4S so very likely we will get them in Samsung Galaxy SIII as well… I believe Samsung ‘copied’ no hardware camera button from Apple as well – which was not very good idea… At least those bottom menu buttons can be changed so you can replace one for camera app although the way how to do it is not intuitive and I had to google it.
  7. The final similarity is the fact that on each virtual screen you can place 4 icons on the row and 4 icons in the column.  Also on the bottom of each virtual screen you have four fixed icons – I described the phone icon in the point 3 above. The function of other 3 icons is different to iPhone4 but their colors are similar again – on iPhone4 you have 2 blue and one orange button, on Galaxy SII (from T-Mobile UK) you have two orange and one blue button. The description of the icons is in white color as well.

In final I post here a picture where you have both phones next to each other. As I did not take the picture of both phones at once, the ratio of the size of one phone to another is only approximate.

Samsung Galaxy S2 vs Apple iPad4

Samsung Galaxy SII vs Apple iPhone4

Final words: I don’t think software patents are a good idea, but by looking at both phones I understand why is Apple upset about Samsung about copying of their ideas. I think that Android system is original and powerful enough and can be tweaked in many unique ways which do not resemble iPhone. If I wanted iPhone I would buy it, I do not need iPhone look-alike with Android under the hood. Luckily Galaxy SII is not tightly closed phone and you can install alternative Android system on it – such as CyanogenMod. I like the fact that Samsung also donated some phones to Cyanogen team. However Samsung’s default system should be more original and they should stop copying Apple look. What about to put CyanogenMod to one of the future phones?

Posted in Android, Apple, iPhone4, IT, Mobile | Tagged , | Leave a comment

An idea: Support of stopping/sleeping javascript in inactive tabs in browser

I think this stopping or sleeping of the javascript or any other script (like flash) in inactive browser tab or window would have lot of benefits:

– It would save CPU load which would have additional benefits:

– saving batteries on notebooks

– saving the money for electricity bills

– (for people with green brains it could perhaps save the World)

The disadvantage is that some scripts may have a problem with this behaviour. But browser based scripts work fine on smart phones which stop any running application after some idle time, so maybe it is not a huge problem.

Anybody wants to create plugin for it? 😉

Posted in Browsers, IT, Thoughts ideas suggestions | Tagged , , , | Leave a comment