Scratch: simple editor by elementaryOS devs

elementaryOS is quite in news now a days and well it deserve that spot. It is one of those OS which really need praise and backup. The guys behind this OS are simply awesome, they are not full time developers but still managing it quite well. Luna is on its way, still in beta stage. What elementaryOS make different from other distributions is easy to use interface, clean UI, fast and reliable and finally some of their newly created apps. One of them is a text editor and called Scratch. It is very simple text editor but very nicely done by the devs with having nice UI and simple to use menu.

Scratch

From the preferences, one can easily change the settings like show line numbers, highlight current line, enabling some extensions like file manager, terminal etc. Quite useful if some one want to work with it.

Scratch-settings

Another nice feature is, if you open a system file which you can’t edit/save under normal user, you can easily save it any where and check it out.

Scratch-save-as-alt

One more nice feature is to compress the file from the editor. You can directly compress it from the save menu at the right hand side.

Scratch-compress

And the most impressive one i should say is the auto save feature, when ever you type some thing it will automatically save the changes to the file.

Well, there are more nice and simple features which depends on user needs. Did i miss some thing?

Give it a shot, you will not be disappointed.

Artha: offline dictionary for linux

Artha is nice and well written dictionary application for Linux. The good thing about it is that it can work offline, which means it will pull the database during installation so that it can work offline. So next time if you are not connected to internet and want to search some word meaning, Artha will do the job well.

Artha-offline-dict

How to install it in elementary/Ubuntu, fire up terminal and type:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

sudo apt-get install artha

[/cc]

How to install it in openSUSE, type in terminal after became root by su – :

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

zypper install artha

[/cc]

And there you have it.

Configure switchable graphics in Elementary/Ubuntu [Luna/12.04]

Currently running Elementary Luna on my laptop with switchable graphic cards. Laptop some time goes hot near the touch pad area with fan noise and hotness. Did a bit research and find out that it was ATI card ON by default. Battery usage was 1 to 1.30 hours on ATI by default. I have ATI 6600M with Intel integrated graphic card. From my previous openSUSE experiments, tried some solutions and can say things are much better now with Intel card[switched]. Battery life goes from 1/1.30 to 4/5 hours dramatically, no more heat issue and noise. Temperature dropped to around 50C for CPU and around 47C for HDD, which i still think is a bit high(working on it). So here is what i did.

Just for monitoring purpose, install lm-sensors and hddtemp. Sudo apt-get install in terminal will do it.

sensors-hddtemp

Now edit the following file with sudo(assumed terminal is open):

sudo vim /etc/rc.local

Add the following lines before exit 0.

chown -R $USER:$USER /sys/kernel/debug
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Reboot, and see if that helps. You can view in terminal which graphic card is active now:

sudo cat /sys/kernel/debug/vgaswitcheroo/switch

IGD = Intel
DIS = ATI [Discrete]
Sample result:

0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0

Even can switch back to ATI [need to logout and login for this to take affect, discrete card will be active(ATI)](not tested):

echo DIS > /sys/kernel/debug/vgaswitcheroo/switch

To turn OFF the in-active card:

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

I will do more research on this to minimize the heat. Will share my findings here. Stay tune.

Restore/Re-install grub in Elementary/Ubuntu [Luna/12.04]

There are some cases, where we play with the system and suddenly realizes that we messed up some thing. This post is about grub in Elementary Luna based on Ubuntu 12.04. So the process is the same for both. Lets a take a simple scenario that you have messed up your grub and now when you boot your system you see this error:

error: no file found: …
grub rescue>

This can be different, like: error: no device found. So now the questions is how to restore it. Well, this is simple. Yes, i know there are many tuts and threads about this issue over the net, but i did not find most of them very easy to follow OR is confusing. I will follow the easy way. So lets begin, shall we?.

Boot your system from Live CD of Elementary/Ubuntu. Open terminal and type:

sudo fdisk -l

Sample output:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4f431832

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    83970047    41984000    7  HPFS/NTFS/exFAT
/dev/sda2        83970048    84174847      102400    7  HPFS/NTFS/exFAT
/dev/sda3   *    84174848   190670847    53248000   83  Linux
/dev/sda4       190672894   976773119   393050113    5  Extended
/dev/sda5       190672896   317648895    63488000    7  HPFS/NTFS/exFAT
/dev/sda6       317650944   968376319   325362688   83  Linux
/dev/sda7       968378368   976773119     4197376   82  Linux swap / Solaris

From the above command, note the partition where your OS is installed. Now lets create a directory to mount the root partition in it.

sudo mkdir /media/sda3

You can create this directory anywhere you want, like in your home directory etc. sda3 is the partition where your system is installed. Not necessary, you use sda3, can be any named directory, like /media/temp etc. Now lets mount the partition in the directory we created:

sudo mount /dev/sda3 /media/sda3

After mounting, we will install the grub by running this command:

sudo grub-install --root-directory=/media/sda3 /dev/sda

The /dev/sda  is your hard disk name, which is shown from the output of fdisk -l. And that’s it, grub is installed. Reboot and things will be normal this time.

If every thing is cool, skip the following lines. The following are just extra steps in case some one face it.

——————————————————————————————

If you see the following error after booting:

Error: unknown command ‘gfxmode’

No worries, in latest Ubuntu 12.04, grub relies on a function in linux script which is in /etc/grub.d/ProxifiedScripts. BTW, this error is not a show stopper, you can still boot to your OS. The best way to avoid is install grub-customizer and enable ‘script code’.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Open grub customizer and tick the check box in front of ‘script code‘. And that will do it.

grub-customizer

——————————————————————————————

Good luck!

Elementary OS Luna Screen Shots

Luna is the upcoming release of elementary OS, which is still in development stage. Here are some of the screen shots taken from a live session from a 20120504 build. Builds can be downloaded from here. Most of them are pre-release builds, so it could be broken or will not work on your system. Try it on your own risk.

Enjoy the simplicity and awesomeness.