Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, February 5, 2012

How To Display Network Upload / Download Speed On The Panel In Ubuntu 11.04/11.10?

Indicator-Sysmonitor (System Monitor Indicator) is a really interesting Ubuntu indicator because it allows you to display pretty much anything on the Unity (or GNOME) panel by using a simple command or a bash script.
(Speaking of Indicator-Sysmonitor: a recent update brought sensors support (make sure you install hddtemp and lm-sensors), but this post isn’t about that)
Currently there is no AppIndicator to display the actual network usage as in the actual values on the Unity panel in Ubuntu 11.04. We have Indicator Multiload but it only displays a graph so I wrote a script for Indicator-Sysmonitor to display the network upload/download speed as well as CPU and Memory usage (Indicator Sysmonitor already has CPU and Memory usage but if you want to use a script, you must get your script to display the CPU and Memory usage independently).

Saturday, February 4, 2012

How to download whole website for offline use using single command in LINUX?


Hi,friends...

Many of you have thought that if i could download whole w3school website or other tutorial site on my computer then it will be super duper thing..

so lets do it.

1.Open your linux terminal by pressing ALT+CTRL+T.

arpan@arpan-NV44 ~ $ wget -r [website_address]

HERE: -r IS OPTION FOR RECURSIVE DOWNLOAD.
FOR MORE INFO ABOUT WGET COMMAND PUT “man wget” in terminal without quotes.

2.it will be saved in home folder with folder name site which you have downloaded.
To access site :Open index.html or index.php

How to know Internet usage of any process in Ubuntu/Mint/Debian?


To know,which process is using your internet in your system hiddenly then you have to follow below steps.

1.Install nethogs tool by putting this command into terminal.

    sudo apt-get install nethogs

2.Then you have to use it.
put this commands to check internet usage of the processes.

                   sudo nethogs [connection_type]
[connection_type]=ppp0 for mobile internet,eth0 for broadband/ethernet,wlan0 for wifi internet
example: sudo nethogs ppp0

Friday, February 3, 2012

How to install LAMP or Apache tomcat server in Ubuntu by single command

If you want to install LAMP or apache tomcat server in any version of Ubuntu than follow below steps
1.Open terminal and Type the command : (PRESS ALT+CTLR+T)

sudo apt-get install tasksel

2.Now to install LAMP, type the taskel command in terminal :

sudo  tasksel

And select LAMP Server:




Saturday, November 12, 2011

Ubuntu vs other Linux Distros




As per Distrowatch.com, I have taken 4 Linux distro.(Top 5 Linux Distro) to compare with Ubuntu.

Ubuntu
Fedora
OpenSUSE
Debian
Mint
Installation
Very Easy
Easy
Easy
Easy
Same as Ubuntu
Hardware Support
Large no. of hardware support(Dell is official sponsor of Ubuntu)
Lesser than Ubuntu and mainly Red hat tested devices
Lesser than Ubuntu
Larger support
Same as ubuntu
Community support
Second after debian
After Ubuntu(3)
Less than Ubuntu…(3)
Its best than ever in world
Very less
Desktop**
Unity launcher
KDE,GNOME shell
KDE,GNOME shell
GNOME 2.3
GNOME 2.3
Performance
2
2
2
1
2
Package Management
DEB
(1)
RPM
(3)
DEB
(2)
DEB
(2)
DEB
(2)
Security
==
==
==
==
==
(*)=Indicates Ranking

**Desktop Environment Comparisons:
KDE:
  • Very Popular Desktop Env.
  • More functionality,Highly customizable
  • Require more Video RAM
  • Widgets support, High Animation

GNOME Shell
  • New, cutting edge Desktop Env., Started with GNOME 3(Fedora/Open suse).
  • Compact Look
  • Less RAM Requirement after clean boot
  • Its similar in look of Ubuntu’s unity launcher but given functionality is diff.
  • Inbuilt with Fedora 15(Love Lock)
Unity Launcher
  • New, cutting edge Desktop Env. ,Started with Ubuntu Netbook Remix.
  • High RAM Requirement after clean boot
  • Require more time to get habited with it. So people are going with GNOME 2.3 /LXFE/KDE environment.
  •  Inbuilt with Ubuntu 11.04(Natty Narwhal)
GNOME 2.3
  • Very Popular and famous Desktop Env.
  • Compact and very easy to use.
  • Less Video RAM and RAM requirement
  • Inbuilt with Linux Mint 11 and many distro.

There are also other Desktop environment like LXDE(Light weight X11 Desktop Environment),XFCE etc. which is minimal desktop environment ,used to improve speed/performance.

Source:
Linux Format Magazine (UK Edition –Aug.2011)

Wednesday, August 24, 2011

Back up and restore management in ubuntu




Type of backups:
1)Back up of user data/specific folders
2)Back up of softwares installed on system
3)Back up of whole operating system as a Live disk

1)Back up of user data/specific folders

We know that in Linux, there is home folder under this there are some sub-folders like Pictures,Downloads,Documents,Music...This folders contain user data so we can back up this folders using following software in Ubuntu.

  • Deja-dup backup tool
     • Support for local or remote backup locations, including Amazon S3
     • Securely encrypts and compresses your data
     • Incrementally backs up, letting you restore from any particular backup
     • Schedules regular backups
     • Integrates well into your GNOME desktop


2)Back up of softwares in Ubuntu

Ways of installation of software in Ubuntu
  • Download and install softwares from Ubuntu software center
  • Using terminal with 'sudo apt-get install [s_name]
  • Using synaptic package manager.


Install aptoncd software from http://aptoncd.sourceforge.net/

Use terminal to install this software by running this command.
$ sudo apt-get install aptoncd

APTonCD:
This software is used to make .iso file of updates/resperonities/softwares/dependencies of ubuntu which you have downloaded from internet OR installed using terminal OR installed using synaptic package manager OR installed using Ubuntu software center via INTERNET.

2.Now,whenever you install updates/resperonities/softwares/dependencies of ubuntu ....Before you shut down your computer JUST run APTonCD from System->Administration->APTonCD...than

2.(A).click on 'Create' than you will see the list of packages which you have downloaded from internet. You can add .deb packages by click on ‘Add’..

2.(B).Now click on 'Burn' ..Then select ur medium and select destination folder where .iso file will be saved....than unmark metapackage option and do not change other option and click on 'Apply'.

2.(C)Now,.iso file will be saved and APTonCD will ask for burning this .iso file to CD/DVD
.say ‘NO/CANCLE' if you dont want waste CD/DVD for it . It means your back up will be saved locally on your pc.

6. Now,Copy all .deb files to specific folder from Package folder of Mounted .iso file.

7. Unmount that .iso file.

8. Whenever your ubuntu crashed, after reinstalling ubuntu,,,Paste that folder which contain all .deb files to Desktop.
Now....Run Terminal and type
$ cd Desktop
~/Desktop$ cd [folder name]
now...type 'sudo dpkg -i *.deb' without quoets....

Here * is wild card which runs files having .deb extension...

Complete.Your all .deb files will be installed.

CAUTION: PLEASE DO NOT INSTALL DEBS OF ANY VERSION OF UBUNTU TO OTHER ONE.IT MAY BRICK YOUR OS.

3)Back up of whole operating system as a Live disk

We are talking about backup of whole operating system at particular point including installed softwares,wallpapers,settings,preferences,etc as a Live disk.

This type of back up is very helpful when you are making any customized ubuntu distribution.
This can be done using one tool named as 'Remastersys'.

  • How to install 'Remastersys' tool in ubuntu ?
    Open Menu->System->Administration->Synaptic package manager and search for Remastersys and install it.

  • How to make a live disk of current installed system?

In order to learn how you can use remastersys, run
sudo remastersys
remastersys Syntax
sudo remastersys backup|clean|dist [cdfs|iso] [filename.iso]
remastersys Examples
1) to make a livecd/dvd backup of your system
sudo remastersys backup
2) to make a livecd/dvd backup and call the iso custom.iso
sudo remastersys backup custom.iso
3) to clean up temporary files of remastersys
sudo remastersys clean
4) to make a distributable livecd/dvd of your system
sudo remastersys dist
5) to make a distributable livecd/dvd filesystem only
sudo remastersys dist cdfs
6) to make a distributable iso named custom.iso but only if the cdfs is already present
sudo remastersys dist iso custom.iso
cdfs and iso options should only be used if you wish to modify something on the cd before the iso is created. An example of this would be to modify the isolinux portion of the livecd/dvd
Creating An ISO Image
To create an iso image of your installation, simply run
sudo remastersys dist
This will create an iso image called customdist.iso in the /home/remastersys directory. The dist option makes that your personal folder (e.g. /home/username) will not be included in the iso image. You might have to insert your Ubuntu installation CD during the process.
This is how the end of the process looks:
[...]
92.16% done, estimate finish Wed DEC 28 15:31:25 2007
93.39% done, estimate finish Wed DEC 28 15:31:25 2007
94.62% done, estimate finish Wed DEC 28 15:31:24 2007
95.85% done, estimate finish Wed DEC 28 15:31:24 2007
97.08% done, estimate finish Wed DEC 28 15:31:25 2007
98.31% done, estimate finish Wed DEC 28 15:31:25 2007
99.54% done, estimate finish Wed DEC 28 15:31:25 2007
Total translation table size: 2048
Total rockridge attributes bytes: 3950
Total directory bytes: 9094
Path table size(bytes): 54
Max brk space used 0
406890 extents written (794 MB)
/home/remastersys/customdist.iso is ready to be burned or tested in a virtual machine.
Check the size and if it is larger than 700MB you will need to burn it to a dvd
796M /home/remastersys/customdist.iso
Clean Up
After you’ve burnt the iso image onto a CD/DVD, you can run
sudo remastersys clean
to remove all temporary file created during the iso generation as well as the /home/remastersys directory.




References:

  • All Screen shots are taken using Shutter tool on ubuntu 11.04 for Deja-dup back up tool.
  • All software describe in this report are Open source and free.

Sunday, August 21, 2011

Presentation On Ubuntu

I had a presentation on ubuntu. If you want to refer this presentation then you can download from this link,
DOWNLOAD PPT

Tips & Tricks on Ubuntu

1. Get lightning fast and clever at the command line
You can use keyboard shortcuts and other command line tricks to make entering commands easier and faster. You might already know about the ‘tab’ key which completes partial commands and even file and directory names.

Here are some other keyboard shortcuts you can use within terminal:

Ctrl-aMove to the start of the line.Ctrl-eMove to the end of the line.Alt-] xMoves the cursor forward to the next occurrence of x.Alt-Ctrl-] xMoves the cursor backwards to the previous occurrence of x.Ctrl-uDelete from the cursor to the beginning of the line.Ctrl-kDelete from the cursor to the end of the line.Ctrl-wDelete from the cursor to the start of the word.Ctrl-yPastes text from the clipboard.Ctrl-lClear the screen leaving the current line at the top of the screen.Ctrl-x Ctrl-uUndo the last changes. Ctrl-_Alt-rUndo all changes to the line.Alt-Ctrl-eExpand command line.Ctrl-rIncremental reverse search of history.Alt-pNon-incremental reverse search of history.!!Execute last command in history!abcExecute last command in history beginning with abc!nExecute nth command in history^abc^xyzReplace first occurrence of abc with xyz in last command and execute itAlso don’t forget to check out 4 websites where you can learn cool command line tricks

2. Launch Ubuntu Linux Applications with keyboard
There are two ways you can achieve this:

  • Use applications like Launchy or Gnome-Do that make it easier to launch applications by typing a few characters of the application’s name.
  • Or you can summon gconf editor (Alt+F2 then type gconf-editor and hit enter), and navigate to apps > metacity > global_keybindings, double click on any of the run_command_N and type in the keyboard shortcut you want to assign to an application then make a mental note of the number N. Then go to apps > metacity > keybinding_commands and double click on command_N (N being the number you used above) and type in the command you want to run. As an example if you wanted to run Firefox you would type in firefox.

Also check out these Ubuntu keyboard shortcuts you might not know about.

3. Start from wherever you left off

You can make Ubuntu remember the applications you had open when you last logged out, so that when you log back in again you’ll find all those applications running and you can resume right from where you left off.

To achieve this go to System > Preferences > Startup Applications, then go to the options tab and check "Automatically remember running applications when logging out"

4. Create a Separate Ubuntu Linux Home Partition

New versions of Ubuntu arrive every 6 months. Although you can upgrade to the latest version via the update manager, sometimes the upgrade doesn’t work as expected so some users like to do a fresh clean install.

The disadvantage with that of course is that you lose data you had in your home directory. To overcome this you can create a separate Home partition when you are installing Ubuntu, size it according to your requirements and then when you decide to install Ubuntu the next time, simply specify this partition as the Home partition (by choosing /home as the mount point).

All your files and data on the Home partition will be preserved even after a fresh install.

Tuesday, July 12, 2011

Download managers for ubuntu

  • gwget downloader
  • vezu(torrent downloader)
  • downthemall(firefox add-on)
  • downloadhelper(firefox add-on with support of you tube video downloader)
  • fatrat download manager
  • kget download manager
  • multiget download manager
To download this managers search in ubuntu software center or firefox addon page(https://addons.mozilla.org/)...

How to run .exe(windows executable files) on ubuntu?

(Internet connection must be needed and successfully tested on Ubuntu 10.10 and 10.04 by me)
1.Reload your source database by putting this line into terminal.
$sudo apt-get update

2.Now search name as 'wine' into synaptic package manager(It like to be wine1.2 because 1.2 is stable version of wine).
synaptic package manager is available only in ubuntu,it may be differ on other GNU/Linux OS.
WINE:
Wine lets you run Windows software on other operating systems. With Wine, you can install and run these applications just like you would in Windows.
Wine is still under active development. Not every program works yet, however there are already several million people using Wine to run their software.

3.Now right click on wine and select 'Mark for installation' and Click on Apply(available on menu bar of synaptic package manager).

4.Now,It will be downloaded from ubuntu Apache server and will be installed on your system.
5.Restart your system(not needed but Recommended)
6.If you want to install latest development version of wine software,Go to www.winehq.org
and by clicking download page,you can choose version of wine for your any GNU/Linux system.
7.All .exe file will not run....but you can explore by this site
http://appdb.winehq.org/
this site is application database of exe files which can be run using Wine..

8.Wine tested on Microsoft Office 2007,2003 ,many games like counter strike,Google's picasa etc...

Share your internet connection using WLAN(WI-FI) on ubuntu

Share your USB/3G modem OR Mobile Connection OR LAN connection using your wifi to other laptops/PCs......
1.Select 'Create new wireless network' by left clicking on network applet.
2.select "WEP 40/128 bit key' and enter key of your choice.
3.Connect your USB/3G modem or LAN or Mobile Connection and Your internet connection will be shared...

Some websites for download software for ubuntu

Ubuntu Backup/Restoration of Installed Apps

1. Install aptoncd software from http://aptoncd.sourceforge.net/

Use terminal to install this software by running this command.
$ sudo apt-get install aptoncd

APTonCD:
This software is used to make .iso file of updates/resperonities/softwares/dependencies of ubuntu which you have downloaded from internet OR installed using terminal OR installed using synaptic package manager OR installed using Ubuntu software center via INTERNET.

2.Now,whenever you install updates/resperonities/softwares/dependencies of ubuntu ....Before you shut down your computer JUST run APTonCD from System->Administration->APTonCD...than

2.(A).click on 'Create' than you will see the list of packages which you have downloaded from internet. You can add .deb packages by click on ‘Add’..

2.(B).Now click on 'Burn' ..Then select ur medium and select destination folder where .iso file will be saved....than unmark metapackage option and do not change other option and click on 'Apply'.

2.(C)Now,.iso file will be saved and APTonCD will ask for burning this .iso file to CD/DVD

But....say ‘NO/CANCLE'....because why waste CD/DVD for it??...I have solution ...
3. Install 'Furius ISO mount' software from Ubuntu software center.

Furius ISO mount:
This software is used to mount .iso and other disk image files like PowerISO and Deamon tools in Windows OS.

4. Now, Run Furius ISO mount from Applications-> Accessories.

5. Mount atponcd-********.iso file where you saved it using Furius ISO mount.
Here *******=YYYYMMDD(Date when you create .iso file).

6. Now,Copy all .deb files to specific folder from Package folder of Mounted .iso file.

7. Unmount that .iso file.

8. Whenever your ubuntu crashed, after reinstalling ubuntu,,,Paste that folder which contain all .deb files to Desktop.
Now....Run Terminal and type
$ cd Desktop
~/Desktop$ cd [folder name]
now...type 'sudo dpkg -i *.deb' without quoets....

Here * is wild card which runs files having .deb extension...

Complete....Your all .deb files will be installed.........UR softwares will be back....
This is tested by me on Ubuntu 10.10,,,
Benefit:You can take all .debs on Pen drive and give to your friend....

Sunday, July 10, 2011

[How to] Solve Brightness problem in ubuntu

If you are facing brightness adjustment problem on you laptop like you can not adjust your laptop brightness using fn keys then try following one...

1. In a terminal window, type in:
Code:
mousepad ./backlight_d.sh
(the mousepad application will open if doesnt then install it first)

2. Copy and paste the following into the mousepad application that just opened:
Quote:
#!/bin/bash

old_b=9;
declare -i curr_b=240;
declare -i target_b=240;

while : ; do
b=`cat /sys/class/backlight/acpi_video0/brightness`;
delay="0.5"

if [ $old_b != $b ]; then
old_b=$b
let "target_b=$b * 20 + 12"
#printf "Target: %10d\n" $target_b
fi

hex_b=".";

if [ "$curr_b" -lt "$target_b" ] ; then
let "curr_b=$curr_b + 2"
if [ "$curr_b" -gt "$target_b" ] ; then
let "curr_b=$target_b"
fi

hex_b="-"
elif [ "$curr_b" -gt "$target_b" ] ; then
let "curr_b=$curr_b - 2"
if [ "$curr_b" -lt "$target_b" ] ; then
let "curr_b=$target_b"
fi

hex_b="-"
fi

if [ $hex_b != "." ] ; then
hex_b=`printf "%02X" $curr_b`
delay="0.005"
setpci -s 00:02.0 F4.B=$hex_b
fi

sleep $delay
done
3. Save the file:
Code:
File->Save(save it through closing it)
4. Back in the terminal window, type in the following:
Code:
sudo cp ./backlight_d.sh /etc/ && sudo chmod +x /etc/backlight_d.sh
(enter your password when prompted).

5. Enter the following into the terminal window:
Code:
sudo mousepad /etc/rc.local
(mousepad will open again) and before the exit 0 line, type in the following:
Code:
nohup /etc/backlight_d.sh &
so it looks like:
Quote:
nohup /etc/backlight_d.sh &
exit 0
Restart your computer. and done..

How To Display Network Upload / Download Speed On The Panel In Ubuntu 11.04

Indicator-Sysmonitor (System Monitor Indicator) is a really interesting Ubuntu indicator because it allows you to display pretty much anything on the Unity (or GNOME) panel by using a simple command or a bash script.

(Speaking of Indicator-Sysmonitor: a recent update brought sensors support (make sure you install hddtemp and lm-sensors), but this post isn't about that)

Currently there is no AppIndicator to display the actual network usage as in the actual values on the Unity panel in Ubuntu 11.04. We have Indicator Multiload but it only displays a graph so I wrote a script for Indicator-Sysmonitor to display the network upload/download speed as well as CPU and Memory usage (Indicator Sysmonitor already has CPU and Memory usage but if you want to use a script, you must get your script to display the CPU and Memory usage independently).

Getting Indicator-Sysmonitor to display network upload / download speed


Before getting started, please note that while this worked just fine on my computer,

1. Firstly, install Indicator-Sysmonitor. For Ubuntu 11.04:
 
sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update
sudo apt-get install indicator-sysmonitor

If you use Ubuntu 10.10 (not working in Ubuntu 10.04!), download .deb from here.

2. Install dstat (this is required by my script):
sudo apt-get install dstat


3. Now you must download the script. Let's create a folder (if it doesn't exists already) called "scripts" in your home directory and download the script there:

mkdir -p ~/scripts && cd ~/scripts
wget http://webupd8.googlecode.com/files/sysmon_0.2.tar.gz && tar -xvf sysmon_0.2.tar.gz

4. Setting Up System Monitor Indicator to use the script.

Now open Indicator-Sysmonitor (it should show up as System Monitor Indicator in the menu), then click it on the panel and select "Preferences" and under "Use this command", enter this:
 
$HOME/scripts/sysmon

Indicator Sysmon

Then save. For me, each time I save the Indicator-Sysmon preferences, the applet freezes. If that's the case for you too, run this in a terminal:
 
killall indicator-sysmonitor

Then start it again.

4. Configuring the script

Indicator sysmon

By default, the script displays the RAM and network usage. You can also display the CPU usage or any other combination (display the network usage only, display all: the CPU, ram and network, etc.). For this, open the script (run the following command in a terminal):
 
gedit ~/scripts/sysmon

And on top of the file you'll see something like this:
#settings:
netspeed=true
ram=true
cpu=false

What these do is pretty much obvious - change the items you want to be displayed on the panel to true and the rest to false. Feel free to tweak the script to display other stuff if you want.

Ad

Ad

Ad

Ad