Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

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

How to customize the font and color of the panel clock in Ubuntu and Linux Mint Mate

If you are using the Mate edition of Linux Mint ( either 13 or 14), the default clock at the right corner will look like this
I will show you a small trick to change the font and color of this clock widget to make it look somehow like this:
The trick is pretty simple. First, you will need to get the Digital font. Just download it here then install it.

Next, create a file named .gtkrc-2.0 in the home folder and copy-paste the following lines into it:
 style "my-panel-clock"  
 {  
 fg[NORMAL] = "#272727"
 font_name = "DS-Digital Bold 12"  
 }  
 widget "*.clock-applet-button.*" style "my-panel-clock"  

After that, just hit Alt+F2 and run the following command to reset the bottom panel:
 pkill mate-panel  

Note: You can edit the font, size and the color code in the .gtkrc-2.0 file to meet your preference.


source: http://www.linuxandlife.com/

Open the terminal in a specific size and position in Ubuntu/ Linux Mint

In Ubuntu or Linux Mint and many other distros, when you open the terminal, the window will appear at the top left corner of the desktop screen and I usually have to drag it down to the bottom left of the desktop. If you dont like the default position and size of the start up window, you can edit it easily.


There are in fact many methods to customize the start up position of the terminal, but in this article I will show you a simple way to do the task without installing anything. In Ubuntu or Linux Mint Cinnamon, just open the terminal and run the following command:

sudo gnome-desktop-item-edit /usr/share/applications/gnome-terminal.desktop

If you use MATE, the command will be

sudo mate-desktop-item-edit /usr/share/applications/mate-terminal.desktop

After you hit enter, you will see the properties window of the launcher for the terminal.
 

In the command tab, just append this option after the part "mate-terminal" (or "gnome-terminal"):
 
--geometry=100x50+800+300

 What this means:
100: the width of the terminal ( in characters)
50: the height ( in lines)
800: x position of the terminal when you open it up
300: y position


Just change the numbers into whatever values you prefer then click on the Close button and everything is done. Next time you open the terminal, the terminal window will appear at the new position instead of the top left corner of the desktop screen  


source http://www.linuxandlife.com

Change The Purple Background (Splash Screen) Ubuntu 12.04

In this tutorial we will see how to change the background image (splash screen) of the GRUB boot loader under Ubuntu 11.10/12.04 or older.



When you start your system, a boot menu will show up containing an ordered list of operating systems and kernels. This boot menu is black by default and can be customized as follows:

Start the Ubuntu terminal and install first the grub2-splashimages package with this command:
sudo apt-get install grub2-splashimages
GRUB spalsh images are stored in the /usr/share/images/grub folder, you can access it with this command:
sudo nautilus /usr/share/images/grub
If you want to use a custom image, make sure it is in the TGA format, then place it in that folder. After deciding which image to use as splash screen for the GRUB2 boot loader, edit now the /etc/default/grub file with this command:
sudo gedit /etc/default/grub
At the end of the file, add this line:
GRUB_BACKGROUND=/usr/share/images/grub/YOUR-IMAGE.tga
Replace YOUR-IMAGE.tga with your custom image name.



When you finish, press CTRL+Q and save your file. Run now this command:
sudo update-grub
Restart now your computer to see if changes are successful (hold down the SHIFT key to bring up the GRUB boot screen while rebooting).                                                                                                                              Source 

OR

The Best And Easy Way....

Install Grub Customizer, every settings are under Preferences.
 


Grub Customizer (2.5.7) Installation


For Ubuntu 12.04/Linux Mint 13, you can easily install Grub Customizer with the following commands:


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




For openSUSE 12.1 or older, run the following commands:

(openSUSE 32-bit)


wget -O grub-customizer-2.5.7-i686.rpm http://goo.gl/vE2Ev
su
zypper in grub-customizer-2.5.7-i686.rp

(openSUSE 64-bit)


wget -O grub-customizer-2.5.7-x86_64.rpm http://goo.gl/1GL6
su
zypper in grub-customizer-2.5.7-x86_64.rpm

For Fedora 17 or older, you can install with these commands:

(Fedora 32-bit)

wget -O grub-customizer-2.5.7-i686.rpm http://goo.gl/vE2Ev
sudo yum install grub-customizer-2.5.7-i686.rpm

 (Fedora 64-bit)

wget -O grub-customizer-2.5.7-x86_64.rpm http://goo.gl/1GL6B
sudo yum install grub-customizer-2.5.7-x86_64.rpm

That's it!                                                                                                                                 source

Disable Apport Error Report Dialog in Ubuntu 12.04

In fresh Ubuntu 12.04 installation, it keeps popping up annoying apport error report dialog on every log-in even after sending the error report. This simple tutorial will show you how to disable this dialog in Ubuntu.


Open up terminal from the dash home or press Ctrl+Alt+T, edit “/etc/default/apport” file with this command: 

sudo gedit /etc/default/apport
Set enable=0:
enable=0

Save the file, and done!

Install Latest Chromium Browser 21 in Ubuntu 12.04 and Linux Mint

Chromium web browser, the open source version of Google Chrome has reached version 21. The Chromium daily build ppa has stopped updating the packages after version 18 was released. Tobias Wolf created a new ppa (for now) providing latest Chromium package for Ubuntu 12.04 Precise.
How to install the latest Chromium 21 in Ubuntu 12.04:
Open terminal from the dash home or press Ctrl+Alt+T, execute this command to add ppa:chromium-daily/ppa:

sudo add-apt-repository ppa:towolf/crack

Update source:
 
sudo apt-get update 
sudo apt-get install chromium-browser
If you have an old chromium installed, run this instead:
 
sudo apt-get upgrade

Install apt-fast Download Accelerator in Ubuntu 12.04/11.10/10.04

apt-get command is a normal way to download and install packages and update system. apt-fast is a shellscript wrapper for apt-get that can drastically improve apt download times by downloading packages in parallel, with multiple connections per package. It uses axel or aria2c as a download manager.

Once you’ve setup apt-fast, you can use it like apt-get. To install a single package, make sure your database is up to date (apt-fast update), and run apt-fast install packagenamehere. Watch it download with incredible speed, and install your requested packages. To upgrade or dist-upgrade, do the same thing. Just use apt-fast dist-upgrade or apt-fast upgrade.

Install and set up apt-fast in Ubuntu:
apt-fast got an official PPA provides packages for Ubuntu 12.04, 11.10, 11.04, and 10.04. You can use a graphical way installing apt-fast from ppa:apt-fast/stable

Or, open up a terminal (Ctrl+Alt+T) window and just execute following commands:

sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast axel
 
After installation, configure apt-fast to use axel as download manager:
  • edit the configuration file:
    sudo gedit /etc/apt-fast.conf
  • remove # before following “_DOWNLOADER” line and save the file
    # axel:
    _DOWNLOADER=’cat /tmp/apt-fast.list | xargs -l1 axel -n ${_MAXNUM} -a’ # axel
Now, run this command and then you can use apt-fast as apt-get

sudo apt-fast update

How to Make Firefox Faster on Linux Mint

Before making any changes, please make a backup of .mozilla/firefox/--------.default/prefs.js for your own safety. prefs.js is a file that stores all of your history and bookmarks from Firefox. 
  •  First open Firefox. 
  • Type "about:config" (without quotes) in the Firefox address bar and then click "Enter". This command opens a configuration page that allows the user to change advanced system settings in Firefox.
  • Speed up page loading/rendering time in Firefox. Right-click anywhere in the "about:config" window, click on "New" and then select "String". Name the string "nglayout.initialpaint.delay" (without quotes). Enter a value of "0" and then click "OK". This tweak decreases the amount of time Firefox waits to render a page from 250 milliseconds to zero. Make the same process and name the string "content.notify.interval" and enter a value of "0".
  • Force Firefox to release reserved system RAM when the browser is minimized. Right-click anywhere in the "about:config" window, click on "New" and then select "Boolean". Name the entry "config.trim_on_minimize" (without quotes). Change the value to "True" and then click "OK". This setting forces Firefox to only reserve about 10 MB of system memory while minimized.
  • Normally Firefox only sends one or two tunnels to the website. However, the more tunnels you use the faster you go. To change this, type in filter bar "network.http.pipelining.maxrequests" and change the value to "150".
  • Attention: The more tunnels you use, the more bandwidth you use, meaning you could use as tunnels as you want but that would probably kill the sites bandwidth if everyone did that. 150 is a very good value.
  • Type "network.http.pipelining" in filter bar, and set it to "True" by double clicking it.
  • Type "network.http.proxy.pipelining" in filter bar, and set it to "True" by double clicking it.

Monitor System Resources in Ubuntu 12.04 LTS

This tutorial shows how to monitor your Ubuntu system resources such as usage of processor, memory, network, hard disk and also cpu/motherboard temperature, cpu fan speed.
There’s a good system load indicator for Ubuntu monitoring cpu usage, cache, memory, network, etc. And psensor is a gtk+ application monitoring temperatures and fan speeds.

1. Install system load indicator

Open up a terminal (Ctrl+Alt+T) and install it from ppa:indicator-multiload/stable-daily. You can use graphical way adding ppa

sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload
 


 
2. Install psensor to monitor temperatures and fan speeds

First install lm-sensor, and start detect hardware sensors:

sudo apt-get install lm-sensors sudo sensors-detect

Install Psensor from this ppa:jfi/ppa

sudo apt-add-repository ppa:jfi/ppa
sudo apt-get update
sudo apt-get install psensor

 
3. Launch startup applications from the dash, add the two indicator as auto-start at login.
in command area:
  • system load monitor use indicator-multiload
  • psensor use psensor

Speed up your Ubuntu 12.04 with preload

Preload is nice little application that could make your linux system a lot faster. Preload is an adaptive readahead daemon. It monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times.

Preload packages are available for almost all linux distributions. And it is available by default in the Synaptic Package Manager and Ubuntu Software Center in Ubuntu. Alternatively, you can install it via Terminal. Type this command

 sudo apt-get install preload

Thats it. Preload will run silently in the background. If you want to further tweak Preload, conf file is available at /etc/preload.conf.

Note that installing preload will not make your system boot faster and that preload is a daemon that runs with root priviledges.

And see the difference.

How to: Enable screen lock in Linux Mint 13

In Linux Mint 13, the screen lock feature is disabled by default. After being idle for a while, the screen will be dimmed and you can re-activate it by moving the mouse or hit a key. For security reasons, you may want to enable the screen lock feature. Here is how to do it:

Hit Alt + F2 and run "mateconf-editor" to open the Mate configuration window. Go to apps > mate-screensaver then check the line "lock_enabled". You can also edit the line idle_delay to change the minutes of inactivity time before the screen lock is activated.

Ubuntu 12.04 Applications Shortcuts


Here are Ubuntu 12.04 Applications shortcuts. Key combos for LibreOffice, Gwibber, Shotwell, Firefox, Rhythmbox and more are covered in the comprehensive document.
To Download zip file scroll down. 

Source: OmgUbuntu


 Here are Unity Shortcuts which is useful for Ubuntu 12.04 Unity.

 Download Unity and Apps Shortcuts

Remove White Dots from Login Screen of Ubuntu 12.04 Precise Pangolin

ome People don't like white dots in Ubuntu 12.04 Login screen, So here is a tweak you can easily remove these dots from login screen.


To Remove White Dots from Ubuntu 12.04 login Screen open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:
  • sudo xhost +SI:localuser:lightdm 
  • sudo su lightdm -s /bin/bash 
  • gsettings set com.canonical.unity-greeter draw-grid false 
 Here are more tweaks for Ubuntu 12.04 Precise Pangolin. Important Tweaks and Some more Tweaks. That's it, Enjoy

Visit on Site http://www.noobslab.com

How to check hardware specification in Linux

You may at times need to know about the hardware information of you computer for many reasons, such as to find a correct driver or to check everything when you want to buy a used computer. In Windows, the only tool I know is Speccy but in Linux, I'm quite familiar to some different tools. In this article, I will introduce the tools that are used with the command line only, so you wont find any tool with a graphic interface here. Also, I assume that these tools are not preinstalled in your distro by default (since I'm using Arch Linux) so just skip the installation part if you already have these tools in your system.


1 - check the /proc/ folder

The /proc/ folder has many useful files to check hardware info. The most popular files are /proc/cpuinfo (about processor info), /proc/meminfo (about RAM memory) and /proc/partitions (a full list about all disk partitions). To check these files, you can go directly to the folder and open these files with the default text editor. You can also run the "cat" command to display these files on the terminal. For example, you can run the following command to display processor info on the terminal:

 cat /proc/cpuinfo  

2 - lshw

lshw is a small tool (just about 1MB) to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. Last time I checked, lshw is preinstalled in Ubuntu by default so you can skip the installation part (but I'm not so sure about that). To install lshw in Ubuntu and other Debian based distros, run this command:

 sudo apt-get install lshw  

If you use Arch Linux, run the following command to install it.

 sudo pacman -S lshw  

If you want lshw to give a full list of hardware info in details, just run this command (the list is quite long so it may take a little time to scan and display the info )

 sudo lshw  

If you just need a short list about hardware, you can use the following command

 sudo lshw -short  

The image below is the hardware info of my laptop after I run the short lshw command:



linuxandlife.com how to find hardware info

To find the info of one specific class with lshw, say the processor, you can run the following command

 sudo lshw -class processor  

linuxandlife.com how to check hardware info

3 - hwinfo

Hwinfo is another useful tool to get hardware info. It is used to probe for the hardware present in the system and can be used to generate a system log. Hwinfo is my favorite tool so far – it gives more detaiks about the system hardware specification than lshw and the report is very well organized and easily accessible through command line switches.

To install hwinfo in Ubuntu and other Debian based distros, run this command:

 sudo apt-get install hwinfo  

If you use Arch Linux, use the following command:

 sudo pacman -S hwinfo  

The way you use hwinfo is quite analogous to that of lshw (however, you dont need to use the command as root for hwinfo). To get a complete report in details about all hardware components, serial number, model number, device class, descriptions, vendor, features ..., you can run this command:

 hwinfo  

If you just want the info about a particular class of hardware such as memory, processor or bios you can run a command like this:

 hwinfo --bios  

linuxandlife.com how to get hardware info

4 - dmidecode

Dmidecode is a very small tool (only 0.05MB) used for displaying table contents of a computer's DMI in an easy-to-read format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.

To install dmidecode in Ubuntu and other Debian based distros, run the following command:

 sudo apt-get install dmidecode  

To install dmidecode in Arch Linux, run the following command:

 sudo pacman -S dmidecode  

To use dmidecode, just like lshw, you need to run the command as root. To get a full report about hardware info, you can run the following command:


 sudo dmidecode  

To get details about particular hardware classes you can run the commands like the example below

linuxandlife.com tools to find hardware info

Resolve slow connexion when using wifi in ubuntu 11.04, 11.10 and LinuxMint 11

After installing or upgrading to Ubuntu 11.04 or 11.10 Oneiric Ocelot  you noticed that the connexion is too slow when using the wifi, this is a simple solution. This solution works also for LinuxMint.

1- First method : You need to disactivate IPv6, to do that, open terminal and enter the following commands:

echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf

Then restart your system.

If you still have the issue, follow also instructions on step 2.

2- Second method :  A second solution for this issue can be by using the following :

Open terminal and enter the following command:

sudo -s
gksu gedit /etc/modprobe.d/ath9k.conf


at the end of the file add this:

options ath9k nohwcrypt=1

Save an restart your OS. 

Speed Up Your Internet Connection On Ubuntu

In this tip, we are going to apply a simple modification that can help you speed up your Internet connection and optimize page load time. The modification will be made to the nsswitch.conf file and it is valid for Ubuntu, Debian Squeeze & Wheezy.

Open the Terminal and run one of these commands to edit the nsswitch.conf file:

sudo gedit /etc/nsswitch.conf
or
sudo nano /etc/nsswitch.conf

Locate this line:
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

And add just below it this line:
hosts:          files dns

Save now the file and close it.





You will now see an improvement in your Internet connection speed, but don't expect a major improvement. Good Luck!

How To Enable Numpad Automatically At Ubuntu Login Screen (LightDM) - Ubuntu 11.10

LightDM is the new display manager used by Ubuntu 11.10 Oneiric Ocelot that allows users to submit their account credentials to login to a session. The problem with this display manager is that at logon screen, the numpad is locked and you are obliged to enable it manually to be able to submit your password.

To solve this, open the terminal (Ctrl+Alt+T) and run this sequence of commands:

sudo apt-get install numlockx

echo "greeter-setup-script=/usr/bin/numlockx on" | sudo tee -a /etc/lightdm/lightdm.conf

Reboot now your system to check if it worked.

Good luck!

How to Reset Ubuntu Password Using LiveCD

This trick should not be used for doing something bad with someone else. The main purpose of this trick is to recover your lost Ubuntu password.

 Now, prepare your Ubuntu Live CD and boot your computer from it until the desktop appears. Once, the desktop is ready, open Terminal and type the following command:

    . gksudo nautilus


Now, at the left sidebar, navigate to the root partition of your installed Ubuntu system, NOT the root partition of the Live CD.

 For the example, I'll reset password of the user "hok00age". Open file "/etc/shadow" with your favorite text editor and then search for line containing the username:

  . hok00age:$1$2TUdk8Z0$tb2Fn6Idgo8dq9EgYv4xZ0:13721:0:99999:7:::

Look at that code! All you need to do is replace the weird phrase "$1$2TUdk8Z0$tb2Fn6Idgo8dq9EgYv4xZ0" with another weird phrase "U6aMy0wojraho". If you did it well, you'll see the line is changed like the below one:

  . hok00age:U6aMy0wojraho:13721:0:99999:7:::


It will, replace your old password with newly BLANK password. So, if you want to log in your computer just leave the password field empty.

 Now, reboot your computer and login with the BLANK password.

 Video:





source : http://www.ubuntubuzz.com 

Install Backtrack 5 Application in Ubuntu

For those of you who focus on computer/network security and love being Ubuntu user, You do not need to consider switching to other distros because you can Install any security application which available on Backtrack 5 on your Ubuntu. You can add Backtrack 5 repository to your ubuntu following this :

Add Backtrack 5 Menu to Ubuntu Repository

1. Download the key, here (*if first link not work change with this here)

2. Add the key you have download through synaptic (or terminal), Open your Synaptics then go to Repositories > Authentication > Import key file

3. Add following Backtrack 5 Ubuntu repository

    .  deb http://all.repository.backtrack-linux.org revolution main microverse non-free testing
    .  deb http://32.repository.backtrack-linux.org revolution main microverse non-free testing
    .  deb http://64.repository.backtrack-linux.org revolution main microverse non-free testing
    .  deb http://source.repository.backtrack-linux.org revolution main microverse non-free testing


If repository above not work, you can use following repository (taken from indonesian backtrack community)

   .  deb http://backtrack.indowebster.com/repo/all revolution main microverse non-free testing
   .  deb http://backtrack.indowebster.com/repo/32 revolution main microverse non-free testing
   .  deb http://backtrack.indowebster.com/repo/source revolution main microverse non-free testing

How to Limit Apt-Get Download Speed

This trick is useful when you're sharing your Internet connection among your friends or family. With this trick, you can perform such apt operation (install or upgrade) without interrupting the other members of your network.


In case, you want to limit your apt-get download speed at 20kb/s, so you should run the following command to perform apt-get operation (install or upgrade):

sudo apt-get -o Acquire::http::Dl-Limit=20K install package_name

Please take a look at statement "Acquire::http::Dl-Limit=20K", replace "20K" with your desired download speed. This trick was tested and worked well on Ubuntu 11.10 Oneiric Ocelot Beta 2, but it should works on other versions of Ubuntu too.

Find Us On Facebook

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