Sunday, June 3, 2007

How to make the 'less' command not clear screen after exit?

You can use the use option:
-X or --no-init

e.g. alias less='less -X'
If you want to use it long term, the PAGER is a useful variable to set in your .bashrc files:
export PAGER='less -X'
To make less exit if the content fits on one screen, use:
-F or --quit-if-one-screen

export ACK_PAGER='less -RFX'

Thursday, May 3, 2007

How to Stop ssh from Clearing Console on Exit?

It was not obvious but there is an explicit clear command in the logout script that clears the content of the terminal. This is what my .bash_logout file looks like:
# ~/.bash_logout

/usr/bin/clear
Commenting the line, /usr/bin/clear, will do the trick.

Monday, April 2, 2007

How to Stop Windows XP Rebooting Automatically after an Update

If you are using Windows XP, you may notice sometimes it restarts itself after an overnight update. This could be quite annoying if you were like me, always left some applications open overnight. Fortunately, this annoyance can be deactivated. Just follow these steps below:
  1. Go to the "Run Command" dialog and enter "gpedit.msc".
  2. Expand to "Local Group Policy\Computer Configuration\Administrative Template".
  3. Double click on "Windows Components".
  4. Double click on "Windows Update" on the right side.
  5. Right click on "No auto-restart for scheduled Automatic Updates Installations", and select "Properties".
  6. Select "Enable", and click "OK" to close the dialog box
  7. Click "Yes" to save this settings.
  8. Restart your computer. You should be good to go.