How to auto-close the terminal after a certain period of inactivity

I will show you a little trick to close the terminal automatically after a certain period of inactivity. The trick is very simple, just use any text editor ( as root) to open the file /etc/profile, in Ubuntu or Linux Mint Cinnamon, the command will be:

sudo gedit /etc/profile 

Once the file is open, just append the following lines to the end of the file:

 TMOUT=seconds
 export TMOUT


Change the "seconds" in the variable part of TMOUT to any number you prefer, this is the maximum idling time the terminal can last before getting closed. I will use 200 as the example here, just add the lines into the end of the file /etc/profile like this:

Then save the file and close the text editor.  After that, run the following command to apply the new change and your terminal will be automatically closed after 200 seconds of inactivity:

 source /etc/profile

Ubuntu Dark Themes Fixs For Mozilla Firefox

Here is a userstyle for Stylish that implements the CSS fix.

Install both of it.

Open Firefox --> Tools ---> Adds-on  ---> User Styles ----> High Contrast Inverse Google Fix  ----> Edit

Replace  content
@-moz-document domain(google.com)
{ input { -moz-appearance: none !important; color: #000000 !important; } }

with this
input[type="text"],
input[type="password"],
textarea
{
  -moz-appearance: none !important;
  background: white;
  color: black;

  border-radius: 5px;
  border: 1px solid #BBB;
  background-color: white;
  padding: 3px;
  color: black;
}
Save.
 
Enjoy the new look.
 
source  
 

Make Your PDF File Smaller

Shrinkpdf: shrink PDF files with Ghostscript

The simplest shell script in the world to shrink your PDFs (as in reduce filesize) under Linux with Ghostscript. Inspired by some code I found in an OpenOffice Python script (I think). It feeds an existing PDF through Ghostscript, downsamples the images to 72dpi, and does some other stuff. Pretty straightforward.

shrinkpdf.sh

    #!/bin/sh

gs -q -dNOPAUSE -dBATCH -dSAFER \
 -sDEVICE=pdfwrite \
 -dCompatibilityLevel=1.3 \
 -dPDFSETTINGS=/screen \
 -dEmbedAllFonts=true \
 -dSubsetFonts=true \
 -dColorImageDownsampleType=/Bicubic \
 -dColorImageResolution=72 \
 -dGrayImageDownsampleType=/Bicubic \
 -dGrayImageResolution=72 \
 -dMonoImageDownsampleType=/Bicubic \
 -dMonoImageResolution=72 \
 -sOutputFile=out.pdf \
  $1
Usage
Download the script by clicking the filename at the top of the box.
If it's not downloading just right click and 'save link as', make sure the file are in 'home' folder.

Then run:

sh shrinkpdf.sh yourfile.pdf
This produces a shrunken file named out.pdf in the current directory.
Sorry, Windows users; this one is Linux only. Ghostscript does run under Windows, but I don't know much about Windows scripting. You could try typing all these parameters on the commandline by hand.

You can increase the quality by changing the '72' number in the script to what ever number you want (ex: 120) for better image quality.

Good Luck.

Credit goes to http://www.alfredklomp.com/programming/shrinkpdf/

Faster Boot Time Ubuntu 12.04

1)Remove unwanted Startup Application
(most of info recomend this)
make hidden startup applications visible in the manager
sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop
Click the Start Menu.
Click Startup Applications...
Uncheck any unwanted application  


 

2)Speed Up Ubuntu Booting Time via Grub
(Source = Ubuntubuzz)
here's to do it, open your grub configuration file (/etc/default/grub) and find this line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, do as follows :

sudo gedit /etc/default/grub
replace
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
 with 
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash profile”
save and exit

sudo update-grub2
sudo reboot

Grub does a search for all the necessary drivers to load, Instead of making Grub search for required drivers, the profiling actually makes Grub remember every necessary driver to work, This action will cutting down all of the driver load times.

after your system up, edit /etc/default/grub and remove some option  which we have added before.

sudo gedit /etc/default/grub
 replace 
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash profile”
with
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
save and exit
sudo update-grub2

3)Disabling Hibernation Option
(source=ossdoc)
To disable Hibernation menu type this command:
 sudo gedit /etc/initramfs-tools/conf.d/resume
it will open the editor. Disable hibernation by adding hastag (#) before the line. See this sample:

Before:
RESUME=UUID=7c53534d-2a6f-49de-b825-74106a681594
After:
#RESUME=UUID=7c53534d-2a6f-49de-b825-74106a681594
Close and save the editor. Hibernation is disabled.

4) Disabling Grub Menu
Disabling grub menu will speed up your computer. You have to set grub time out value as 0. Type this command on Your terminal:

sudo gedit /etc/default/grub


when the editor opened, set GRUB_TIMEOUT value as 0.  Close and save.


Adjust Your Swappiness 

First, chek your swappinnes. The default value is 60. check it using this command:
cat /proc/sys/vm/swappiness
open your editor and edit the value. try this command to edit:
sudo gedit /etc/sysctl.conf 
add this line to into the file:
vm.swappiness=10

That's it. Good luck.

CPU-G ANOTHER CPU-Z ON UBUNTU

You must have known CPU-z, a windows application that lets you to find out Hardware information of your system. Now we have similar application named CPU-G with actually have same function and 'interface' that's run on ubuntu.
How to install CPU-G on Ubuntu

First before you install it, download CPU-z source installer (*.deb) here, wait until download process finish, go to CPU-G download directory then type following command in your terminal
   
    sudo dpkg -i cpu-g_0.9.0_i386.deb 
    sudo apt-get -f install 

change "cpu-g_0.9.0_i386.deb" with CPU-G file installer you have download.

How to run CPU-G on Ubuntu

How to install it is quiet simple, open your terminal or type ALT + F2. then type "cpu-g" there. The CPU-G should running on. [thanks to tahutek.net]




source http://www.ubuntubuzz.com/

Find Us On Facebook

Related Posts Plugin for WordPress, Blogger... Linux Directory