Hi friends, today i'll tell you how to setup a chroot environment.


First of all:

What is chroot?

A chroot on UNIX OS is an operation that changes the apparent distribution root directory for the current running process and its children. A program that is re-rooted to another directory cannot access or name files outside that directory and the directory is called “chroot jail”. (this might seem a bit confusing first, just carry on and when u'll enter the chroot, you'll understand everything :) ).


Why is this environment useful?

This is evironment provides very good base for performing experiments you want to do with linux kernel. All the fiddling you want to do at the terminal and scared of loosing or modifying some important files, you can do here.

Chroot Jail signifies that you are jailing you root into a particular directory and all the operations, installations and experimentations will stay into that root folder only. You can use any empty directory on a native linux file system. No operation perform inside the chroot can access or modify any file outside that directory.


I'll tell you how to setup roots for debian environments.


For that we will use a tool called debootstrap. You can install this tool from the repository by the following command:


sudo apt-get install debootstrap


NOW ENOUGH OF THEORIES, LET BEGIN ;)


STEP 1: Install debootstrap.


Note: if you want to check whether debootstrap is installed into your system or not run the following command:


aptitude show debootstrap | grep State


by aptitude show you can check any package, just make sure that 'S' of 'State' is capital.


STEP 2: You can install schroot also: it is a tool by which you can conveniently manage chroot environments, but i prefer using chroot itself (use of schroot will be my other post).


sudo apt-get install schroot


STEP 3: Make a directory into a drive with native linux file systems (ext2/3/4). I'll make this environment into /var/chroot/lucid ( we are building the evironment for lucid, you can build for maverick, natty or for anyother version, just use their codename on the place of lucid).


sudo mkdir /var/chroot


STEP 4: Setting up the chroot with debootstrap.


Sudo debootstrap –-variant=buildd –-arch i386 lucid /var/chroot/lucid http://archive.ubuntu.com/ubuntu/


Lets explain this command a bit:

sudo is for running the command as power user.

debootstrap is the tool we are going to use for setting up chroot environment.

--variant=buildd is going to install all the build-essential packages, you can also skip this and later execute 'sudo apt-get install build-essential' later after getting into chroot environment.

--arch i386 is representing the architecture you want to use into the environment. You can replace i386 with any architecture, just check whether the architecture you are using is supported by the version whose chroot environment you are going to set.

lucid is code name of the version whose chroot you are going to set.


Http://archi***/ubuntu/ the url from where all the essential files will be downloaded.


Congrats!! you successfully build a chroot environment for lucid.


But to actually make it work you need to provide the name of the repositories you are going to use for downloading ( in simple words provide the network support to grab the essential packages).



STEP 5: We will use sources.list file from you original distribution.


  • First copy the sources.list into your home folder by following command

    sudo cp /etc/apt/sources.list ~/

  • Then open the file into your favourite text editor, and replace all the occurences of with lucid.

  • Now copy or move the edited sources.list file from your home folder to the chroot environment folder.

    sudo cp ~/sources.list /var/chroot/lucid/etc/apt/


STEP 6: (Final Step) To lock to new chroot environment.


sudo chroot /var/chroot/lucid



its all done :) by default you'll log in with root account.

You can create new user account there and login into it, or use this chroot environment with root account.

The beauty about whole thing is whenever you want to remove this chroot environment just delete the folder :).


My next post will be how to install GNOME into this and make a virtual screen and use this environment as an separate operating system, inside your previous operating system. :) So stay tuned.

hi friends,
Today i'll share with you how to make your dell bluetooth headsets (DELL BH200) working on ubuntu.

Step 1:
ubuntu bluetooth manger is not a good one, to connect with your headset you have to download blueman bluetooth manager. This you can download from ubuntu software center.
Applications>>Ubuntu Software center



Step 2:
after installing this bluetooth manager delete any pairing you created earlier.
Now you'll see two icons on the top, one of the default bluetooth manager and other is of new one.

Step 3:
open the new one and put your headset in discovery mode by pressing the power button till the blue light start blinking.


Step 4:
Search the device in this bluetooth manager.

Step 5:
when the device is visible select it and click on setup button, enter the passkey as 0000 and wait to connect.




Step 6:
if for some reason the manager is unable to connect then right click on DELL BH200 and select trust.

Step 7:
now right click on the device and select setup and select A2DP Sink (Send Audio) and click on forward.
Now you can see a green dot signal on the new bluetooth icon on the top.



when your device will be connected you'll see the following window.




Step 8:
Now open System>>preferences>>sound.

Step 9:
Click on Hardware tab and change the profile setting at bottom to High Fidelity Playback A2DP.



Step 10:
Now click on output tab and select DELLBH200 as the output device...




we are done :)
your headset will work now :P

One more thing, in the heading i mentioned only about DELL BH200 because i only tested on this headset only. Please try this on other headsets and it this method works please post it in the comment.
thank you....
enjoy!!!!!!!!!!
I am sharing two very famous books on linux.I hope you will like it-->
 

                                                             download here
You must have been using bittorrent or utorrent for downloading any torrent file.Well, you can create torrent of any file by yourself and send it to your friends so that they can download softwares/movies by your created torrent.So, let's see how to do it-->
  • Open your bittorrent and go to File->Create new
   
  • This will open a window like this-->
    
  • Now browse for the files which you want to share by torrent.
  • After this come to the tracker section and put any one of the below links in the tracker box-->
    http://open.tracker.thepiratebay.org/announce 
    http://www.torrent-downloads.to:2710/announce
    http://denis.stalker.h3q.com:6969/announce
    udp://denis.stalker.h3q.com:6969/announce
    http://www.sumotracker.com/announce
    
   
  •  Now just hit create and save button.
  • Your torrent file is created!!!! Save it wherever you want.
     

     


   
   
As you know rm command doesn't have trash facility,means it doesn't send files to the Trash,it completely remove them.By doing some modification in your .bashrc, you can redirect the files to trash if you do not want to completely remove them.

  • Open your terminal.
      $sudo gedit ~/.bashrc
     
  • At the bottom of line add this line -->
        $alias trash="mv -t ~/.local/share/Trash/files --backup=t"


  • Save the file, close Gedit, and open a new terminal window to test your new command.
  • Now if you have to remove a file like file1.txt, just type this-->
       $trash file1.txt 


  • It will work on the folders too and if you have to remove multiple files then just put it one by one.
      $trash file1.txt file2.txt



  • That's it.enjoy!!!!

you may know many techniques to install and remove softwares from your ubuntu pc but it is not bad to learn new one..some of you may know this but if you do not know then from here you will get to know.So now,let's start it--
  • first of open your terminal and type this-
      $sudo aptitude

     * you can also start by typing just aptitude but later it will ask  you to enter       your password if you are going to download or uninstall some packages.Choice is yours!!!


  • This command will open a new window where you can see all packages listed in different sections like installed,uninstalled etc.
              
  • One thing you must notice that it has a command line interface so mouse will not work here!!
  • You can see different options listed at the top--
      
 
  • Use arrow keys for navigation, use enter key for seeing the different options listed inside the particular section.
  • If you want to install/uninstall some package just go to it and hit the 'g' key.
  
  • In this i am installing a package.
    
  • When the package will be installed you will be redirected to main terminal.
  
  • Now you can check by going in the installed sections that the package numbers will be incremented.
  
    
Sometimes it may happen with you that you forget your password and now you do not know how to login in your system so here is a trick,by this you can easily get and set your password again---

  • Turn your computer on.Press ESC at the grub prompt.
  •  Press e for edit.
  •  Highlight the line that begins kernel ………, press e.
  • Go to the very end of the line, add rw init=/bin/bash
  •  press enter, then press b to boot your system.
  • Your system will boot up to a passwordless root shell.
  • Type in passwd username.
  • Set your password.
  • Type in reboot.
All logs are stored in /var/log directory under Ubuntu (and other Linux distro).

=> /var/log/messages          General log messages
=> /var/log/boot                 System boot log
=> /var/log/debug               Debugging log messages
=> /var/log/auth.log            User login and authentication logs
=> /var/log/daemon.log       Running services such as squid, ntpd
=> /var/log/dmesg               Linux kernel ring buffer log
=> /var/log/dpkg.log            All binary package log includes package installation 
=> /var/log/faillog               User failed login log file
=> /var/log/kern.log            Kernel log file
=> /var/log/lpr.log               Printer log file
=> /var/log/mail.*                All mail server message log files
=> /var/log/mysql.*             MySQL server log file
=> /var/log/user.log            All userlevel logs
=> /var/log/xorg.0.log         X.org log file
=> /var/log/apache2/*         Apache web server log files directory
=> /var/log/lighttpd/*          Lighttpd web server log files directory
=> /var/log/fsck/*               fsck command log
=> /var/log/apport.log         Application crash report / log file


To view log files at shell prompt

tail -f /var/log/apport.log
more /var/log/xorg.0.log
cat /var/log/mysql.err
less /var/log/messages
grep -i fail /var/log/boot


[View log files using GUI tools using the GNOME System Log Viewer]

  • System Log Viewer is a graphical, menu-driven viewer that you can use to view and monitor your system logs. System Log Viewer comes with a few functions that can help you manage your logs, including a calendar, log monitor and log statistics display. System Log Viewer is useful if you are new to system administration because it provides an easier, more user-friendly display of your logs than a text display of the log file. It is also useful for more experienced administrators, as it contains a calendar to help you locate trends and track problems, as well as a monitor to enable you to continuously monitor crucial logs.  

    There are some methods to start the log viewer--

     Click on System menu > Choose Administration > System Log:


    you can start the GNOME System Log Viewer from a shell prompt, by entering the following command:

    $ gnome-system-log &

     

Hi friends.
Hope my posts are helping. Please leave your comments as it will help me a lot.

Today I'll tell you how to install ubuntu 10.04 desktop edition in a drive when there is windows already install.

STEPS:

First you need to choose a partition and empty it (backup the necessary data on the partition and empty it as we have to delete this partition).

Boot from live CD or a USB pendrive. How to Boot from a live CD or USB drive is mentioned in another post of this BLOG.

After booting you'll see two options Try Ubuntu 10.04 and Install Ubuntu 10.04. Choose the option Try ubuntu 10.04.

It will guide you to desktop.

On desktop open Gparted. System>Administration>Gparted.



This is a partition manager just like partition magic of windows.
In this you can see all your partitions. Delete the partition you emptied and leave the space unallocated.


Now close Gparted and from two options on desktop choose the one to install ubuntu10.04.

Now Choose the Language you speak


Select your TIMEZONE.


Select your keyboard layout, if you don't know what it is, leave it as it is and move forward.


Now in select partition window choose "use the largest continuous free space", this'll select your drive that you just deleted from Gparted.


Now enter your details.



Are you ready.



Installation screen.


Happy installation. :)
please leave your comments.
Hi friends,
Today i'll tell you how to setup your gmail account in evolution.
Steps:
1. First you have to enable either POP or IMAP accessing from you gmail account settings.


Goto Forwarding and POP/IMAP tabs and enable POP or IMAP as you want (marked with red in the screenshot below).

Don't forget to click on Save Changes.

Now start the Evolution client and click on forward, it may ask you for recovery, uncheck it and move forward.


Then in the next tab enter you full name and email address. Leave the optional fields blank.

Now in the next tab choose the option that you enabled in your gmail setting(POP/IMAP). Both will work fine, but i prefer IMAP (no particular reasons).

Don't forget to change the server name to imap.gmail.com OR pop.gmail.com as per your requirement.

Now next tab will ask you for Receiving options, set them as displayed in screenshot, in case of POP you'll only receive first three options.



Then next tab will be of Sending Mail options.
If you wan't to send email using you email client then configure this option or leave it as it is and move forward.

by default "Server requires authentication" option will be unchecked. Check it and give any encryption if you want. Choose the Authentication type LOGIN and enter your USERNAME.

Then in the next and final tab, client will ask you for any name that you wan't to be displayed in your client for your account management. Miine is XAERO, choose your own as per your choice.



Open the Evolution and click on mail. Client will ask for you password, enter your email password. If everything worked fine you'll see a page like following screenshot.



Please comment you feedback, any suggestions or queries.
thanks
By this trick you can split very large files and send or upload it to the desired locations.
Let’s say that the large file is a movie file found in--

/home/username/films/movie.avi

and you want to compress, split and store the smaller files at the folder--

/home/username/films/splitfiles/

For this you have to type this commands in terminal--

$tar -cvj /home/username/films/movie.avi | split -b 640m -d - "movie.tar.bz"

Now will be able to see several files in the splitfiles folder having a size of 640mb.
Now by these commands,you will be able to recover the files--

$cat  movie.tar.bz.*| movie.tar.bz
$tar -xvj movie.tar.bz
Just open your terminal and write this(i got  to know about this command by jerome1232 from ubuntuforums) --

$ apt-get source {software}
eg--apt-get source smplayer

 When i tried this command,i found an error message because one of the package was not installed.In my case it was showing "dpkg-dev".for finding out whether the package is installed or not, type this in your terminal--

$ dpkg -s {package name}

For red-hat users--

$ rpm -qa|grep {package name}

If you do not get any output it means package is not installed.

For debian users,you can install the package by running well know command--

$ sudo apt-get install {package-name}
I know most of you are facing this problem.it is very frustrating to work in it.
so this trick will help you to switch the window in the fullscreen mode.for that you
have to do this---

1-first go in the command prompt properties.

2-After this go to the font  tab and select the lucida console rather than raster fonts,and select the font size 28.

3-Now go to the layout tab and unmark “let system position window” .

4-set the parameters like this--
  • Screen buffer size—
  1. Height-80
  2. Width-28
  • Windows size—
  1. Height-75
  2. Width-28
© 2015 Techie's House. Designed by Bloggertheme9