4/17/13

Increase your Bash History Size


Increase your Bash History Size

Using the history command (for example joined with a grep) lets you relax your brain and fingers. Sure, even more relaxed is the usage of the reverse-search-history function (Ctrl-R).

To make sure the history's brain isn't to small, you should increase its size. The following lines need to be added to your ~/.bashrc file. It increases the history to the last 10.000 commands, erases previous duplicates and makes sure that the commands are appended (and do no override) on shell exit:

1export HISTSIZE=10000
2export HISTCONTROL=erasedups
3shopt -s histappend

4/10/13

HOWTO: Disable Suspend and Hibernate in UBUNTU 12.04



For some people, such as myself, the suspend/hibernate features in Ubuntu cause trouble, in my case, a lockup, or just general misbehaviour of the system. And in the power menu, it’s all too easy to click one instead of another. So it makes sense to disable the features from the power menu.  The idea for this post, and the method for Ubuntu 10.04 comes from this threadover on UF.
Ubuntu 10.04
Open a Terminal from Applications>Accessories>Terminal. Type in the following, and hit enter. When prompted, provide your password
1
gksudo gedit  /usr/share/polkit-1/actions/org.freedesktop.upower.policy
There are two sections in this file, the first for suspend and the second for hibernate. Near the end of each section will be a line with:
1
yes</allow_active>
Change this entry from “yes” to “no” to disable hibernate/suspend.
1
no</allow_active>
Ubuntu 9.10
The only difference between the process for 10.04 and 9.10 is the location of the file. Use the following line instead to open the file.
1
gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy
That’s it! The hibernate and suspend options will no longer be shown in the power menu in Gnome, so no more accidental lockups for you!
Or me… ;)