###########################################################
# Angel DeChaos mail:dark.angel24.daa@gmail.com #
# My Set up #
###########################################################
First -> sudo cp /etc/sysctl.conf /etc/sysctl.conf.angeldechaos
second -> gksudo gedit /etc/sysctl.conf ( laways use gksudo for graphical using)
Insert this command in the end of ur paragraph :
# increase TCP max buffer size setable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
# don't cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
# recommended to increase this for 1000 BT or higher
net.core.netdev_max_backlog = 2500
# for 10 GigE, use this, uncomment below
# net.core.netdev_max_backlog = 30000
# Turn off timestamps if you're on a gigabit or very busy network
# Having it off is one less thing the IP stack needs to work on
net.ipv4.tcp_timestamps = 0
# disable tcp selective acknowledgements.
net.ipv4.tcp_sack = 0
# enable window scaling
net.ipv4.tcp_window_scaling = 1
aftyer finish all stuff then run command to refresh :
sudo sysctl -p (it"ll refresh ur system internet connection)
after that disable ur ipv6 :
Disable ipv6 :
gksudo gedit /etc/modprobe.d/aliases
# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
#
# Please file a bug against module-init-tools if a package needs a entry
# in this file.
# network protocols
########################################################################
alias net-pf-1 unix
alias net-pf-2 ipv4
alias net-pf-3 ax25
alias net-pf-4 ipx
alias net-pf-5 appletalk
alias net-pf-6 netrom
alias net-pf-7 bridge
alias net-pf-8 atm
alias net-pf-9 x25
# 1, 2, 3 new lines
alias net-pf-10 ipv6 off
alias net-pf-10 off
alias ipv6 off
# alias net-pf-10 ipv6
alias net-pf-11 rose
alias net-pf-12 decnet
# 13 NETBEUI
alias net-pf-15 af_key
alias net-pf-16 af_netlink
alias net-pf-17 af_packet
There's another way too: instead of changing aliases file, create fie named bad_list in /etc/modprobe.d containing this line:
alias net-pf-10 off
Jumat, 15 April 2011
Rabu, 13 April 2011
Compile Mpeg , Lame, and x264, running codecs from KLite on windows and stay with Linux with dvd play inside it
FFmpeg is a multi platform, open-source library for video and audio files. Using FFmpeg you can do video conversions, sound extractions etc... It's better than using VLC player & Audacity to do video conversions, sound extractions. It too has a GUI which helps us to make it more easier. That's called WinFF. WinFF is a graphical user interface for FFmpeg. It will convert almost any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time.
It's a bit fast when you use the terminal for it. Actually that's something that I experienced. But when using multiple file it's better to use WinFF.
You would get errors like “ffmpeg - Unsupported codec for output stream #0.0” if you haven't complied FFmpeg in the first place.
So to use this, first you have to compile FFmpeg & x264 (that means the codecs).
(Don't try to deviate from the plan. Just stick to it.. !! ).
First make sure that you haven't installed FFmpeg or x264 before. To be 100% sure paste this in the terminal.
sudo apt-get remove ffmpeg x264 libx264-dev
And do an update to make sure that you gets the latest version installed.
sudo apt-get update
Next you have to get all the dependencies which you need to install x264 & Ffmpeg.
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html \
libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
When you've got all the dependencies you have to install x264. First of all you have to get the files downloaded of x264.
git clone git://git.videolan.org/x264.git
After getting to files downloaded you have to install the x264. So you have to enter the folder.
cd x264
Then install it.
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | \
cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | \
head -c 7`" --backup=no --default --deldoc=yes
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default --deldoc=yes
This will install and make a backup for you at the folder x264 which is at your home folder named as “x264_1:0.svn20100126+20fa784-1_i386.deb” (it will change a bit .. I think you get the idea).
Then you have to install lame. Then you get the ability in encoding mp3s. First thing you need to do is to get back to your home folder. Do it by this.
cd
If you have installed a previous version of mp3lame. You have to uninstall that.
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
After that you have to download the lame files. Get that done.
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
Extract the file.
tar xzvf lame-3.98.4.tar.gz
Go into the lame 3.98.4 folder.
cd lame-3.98.4
Then start the installation.
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default \
--deldoc=yes
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no –default --deldoc=yes
After installing x264 next you have to install FFmpeg. So as you are in the x264 folder you have to get back to the home folder by
cd
Then download the files to install FFmpeg.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab --enable-libmp3lame
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --default --deldoc=yes
hash x264 ffmpeg ffplay
This will install and make a backup for you at the folder ffmpeg which is at your home folder named as “ffmpeg_4:0.5+svn20100126-1_i386” (this also will change a bit .. ).
The installation of FFmpeg & x264 is over. Now I you want the GUI for the FFmpeg you can install that too.
sudo apt-get install winff
Using FFmpeg In The Terminal In Ubuntu
If you are using the GUI method it's easy to enter the values at the boxes in the window. If you are trying to use to terminal for it there is some codes that would be useful for you.
Get the info of a video file
ffmpeg -i 1.mp4
You have to give the name of the video after -i at the command which I've taken as 1.mp4
This will give you the information about the video file. The things like the frame rate, bit rates of the audio and the video track, etc ...
Turn images to a video sequence
ffmpeg -f image2 -i image%d.jpg 1.mp4
This command will transform all the images from the directory (the image files named as image1.jpg, image2.jpg, etc...) to a video file named 1.mp4.
Turn a video to images
ffmpeg -i 1.mp4 image%d.jpg
This command will make the video to images. This will make images nmaed as image1.jpg, image2.jpg, etc..
The other formats are available too. The formats such as PGM, PPM, PAM, PGMYUV, JPEG, GIF, PNG, TIFF, SGI.
Encode a video sequence for the i pods, i Phones, PSP or mobile phones
ffmpeg -i 1.flv -f psp -r 25.00 -b 512000 -ar 24000 -ab 64000 -vcodec mpeg4 -s 320x240 1.mp4
Input file : 1.flv
Audio codec : mp3
Audio bitrate : 64kb/s
Audio Freqency : 24000Hz
Video codec : mpeg4
Video bitrate : 512kb/s
Frame rate : 25.00 /s
Video size : 320x180
Output file : 1.mp4
These videos will work only mobile phone like Nokia N79, Nokia N85 … etc
You can use this method to convert other file formates to .mp4 files. Formats like avi, flv, ogg, ogv, divx, etc..
ffmpeg -i 1.flv 1.mp4
You can use this to covert videos to another format.
Extracting sound track from a video and saving it as mp3
ffmpeg -i 1.flv -vn -ar 44100 -ac 2 -ab 320 -f mp3 1.mp3
Input file : 1.flv
Audio bitrate : 320kb/s
Audio Frequency : 44100Hz
Output format : mp3
Output file : 1.mp3
You can extract the sound track from almost all video formates & too can convert .wav files to .mp3 files.
Mix a video with a sound file
ffmpeg -i 1.wav -i 2.avi 3.mp4
Input Audio file : 1.wav
Input videos file : 2.avi
output file : 3.mp4
You can do this with almost all will video and audio file formats.
FFmpeg is a multi platform, open-source library for video and audio files. Using FFmpeg you can do video conversions, sound extractions etc... It's better than using VLC player & Audacity to do video conversions, sound extractions. It too has a GUI which helps us to make it more easier. That's called WinFF. WinFF is a graphical user interface for FFmpeg. It will convert almost any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time.
It's a bit fast when you use the terminal for it. Actually that's something that I experienced. But when using multiple file it's better to use WinFF.
You would get errors like “ffmpeg - Unsupported codec for output stream #0.0” if you haven't complied FFmpeg in the first place.
So to use this, first you have to compile FFmpeg & x264 (that means the codecs).
(Don't try to deviate from the plan. Just stick to it.. !! ).
First make sure that you haven't installed FFmpeg or x264 before. To be 100% sure paste this in the terminal.
sudo apt-get remove ffmpeg x264 libx264-dev
And do an update to make sure that you gets the latest version installed.
sudo apt-get update
Next you have to get all the dependencies which you need to install x264 & FFmpeg.
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
When you've got all the dependencies you have to install x264. First of all you have to get the files downloaded of x264.
git clone git://git.videolan.org/x264.git
After getting to files downloaded you have to install the x264. So you have to enter the folder.
cd x264
Then install it.
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`" --backup=no --default
This will install and make a backup for you at the folder x264 which is at your home folder named as “x264_1:0.svn20100126+20fa784-1_i386.deb” (it will change a bit .. I think you get the idea).
After installing x264 next you have to install FFmpeg. So as you are in the x264 folder you have to get back to the home folder by
cd
Then download the files to install FFmpeg.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
This will install and make a backup for you at the folder ffmpeg which is at your home folder named as “ffmpeg_4:0.5+svn20100126-1_i386” (this also will change a bit .. ).
The installation of FFmpeg & x264 is over. Now I you want the GUI for the FFmpeg you can install that too.
sudo apt-get install winff
It's a bit fast when you use the terminal for it. Actually that's something that I experienced. But when using multiple file it's better to use WinFF.
You would get errors like “ffmpeg - Unsupported codec for output stream #0.0” if you haven't complied FFmpeg in the first place.
So to use this, first you have to compile FFmpeg & x264 (that means the codecs).
(Don't try to deviate from the plan. Just stick to it.. !! ).
First make sure that you haven't installed FFmpeg or x264 before. To be 100% sure paste this in the terminal.
sudo apt-get remove ffmpeg x264 libx264-dev
And do an update to make sure that you gets the latest version installed.
sudo apt-get update
Next you have to get all the dependencies which you need to install x264 & Ffmpeg.
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html \
libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
When you've got all the dependencies you have to install x264. First of all you have to get the files downloaded of x264.
git clone git://git.videolan.org/x264.git
After getting to files downloaded you have to install the x264. So you have to enter the folder.
cd x264
Then install it.
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | \
cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | \
head -c 7`" --backup=no --default --deldoc=yes
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default --deldoc=yes
This will install and make a backup for you at the folder x264 which is at your home folder named as “x264_1:0.svn20100126+20fa784-1_i386.deb” (it will change a bit .. I think you get the idea).
Then you have to install lame. Then you get the ability in encoding mp3s. First thing you need to do is to get back to your home folder. Do it by this.
cd
If you have installed a previous version of mp3lame. You have to uninstall that.
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
After that you have to download the lame files. Get that done.
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
Extract the file.
tar xzvf lame-3.98.4.tar.gz
Go into the lame 3.98.4 folder.
cd lame-3.98.4
Then start the installation.
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default \
--deldoc=yes
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no –default --deldoc=yes
After installing x264 next you have to install FFmpeg. So as you are in the x264 folder you have to get back to the home folder by
cd
Then download the files to install FFmpeg.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab --enable-libmp3lame
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --default --deldoc=yes
hash x264 ffmpeg ffplay
This will install and make a backup for you at the folder ffmpeg which is at your home folder named as “ffmpeg_4:0.5+svn20100126-1_i386” (this also will change a bit .. ).
The installation of FFmpeg & x264 is over. Now I you want the GUI for the FFmpeg you can install that too.
sudo apt-get install winff
Using FFmpeg In The Terminal In Ubuntu
If you are using the GUI method it's easy to enter the values at the boxes in the window. If you are trying to use to terminal for it there is some codes that would be useful for you.
Get the info of a video file
ffmpeg -i 1.mp4
You have to give the name of the video after -i at the command which I've taken as 1.mp4
This will give you the information about the video file. The things like the frame rate, bit rates of the audio and the video track, etc ...
Turn images to a video sequence
ffmpeg -f image2 -i image%d.jpg 1.mp4
This command will transform all the images from the directory (the image files named as image1.jpg, image2.jpg, etc...) to a video file named 1.mp4.
Turn a video to images
ffmpeg -i 1.mp4 image%d.jpg
This command will make the video to images. This will make images nmaed as image1.jpg, image2.jpg, etc..
The other formats are available too. The formats such as PGM, PPM, PAM, PGMYUV, JPEG, GIF, PNG, TIFF, SGI.
Encode a video sequence for the i pods, i Phones, PSP or mobile phones
ffmpeg -i 1.flv -f psp -r 25.00 -b 512000 -ar 24000 -ab 64000 -vcodec mpeg4 -s 320x240 1.mp4
Input file : 1.flv
Audio codec : mp3
Audio bitrate : 64kb/s
Audio Freqency : 24000Hz
Video codec : mpeg4
Video bitrate : 512kb/s
Frame rate : 25.00 /s
Video size : 320x180
Output file : 1.mp4
These videos will work only mobile phone like Nokia N79, Nokia N85 … etc
You can use this method to convert other file formates to .mp4 files. Formats like avi, flv, ogg, ogv, divx, etc..
ffmpeg -i 1.flv 1.mp4
You can use this to covert videos to another format.
Extracting sound track from a video and saving it as mp3
ffmpeg -i 1.flv -vn -ar 44100 -ac 2 -ab 320 -f mp3 1.mp3
Input file : 1.flv
Audio bitrate : 320kb/s
Audio Frequency : 44100Hz
Output format : mp3
Output file : 1.mp3
You can extract the sound track from almost all video formates & too can convert .wav files to .mp3 files.
Mix a video with a sound file
ffmpeg -i 1.wav -i 2.avi 3.mp4
Input Audio file : 1.wav
Input videos file : 2.avi
output file : 3.mp4
You can do this with almost all will video and audio file formats.
FFmpeg is a multi platform, open-source library for video and audio files. Using FFmpeg you can do video conversions, sound extractions etc... It's better than using VLC player & Audacity to do video conversions, sound extractions. It too has a GUI which helps us to make it more easier. That's called WinFF. WinFF is a graphical user interface for FFmpeg. It will convert almost any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time.
It's a bit fast when you use the terminal for it. Actually that's something that I experienced. But when using multiple file it's better to use WinFF.
You would get errors like “ffmpeg - Unsupported codec for output stream #0.0” if you haven't complied FFmpeg in the first place.
So to use this, first you have to compile FFmpeg & x264 (that means the codecs).
(Don't try to deviate from the plan. Just stick to it.. !! ).
First make sure that you haven't installed FFmpeg or x264 before. To be 100% sure paste this in the terminal.
sudo apt-get remove ffmpeg x264 libx264-dev
And do an update to make sure that you gets the latest version installed.
sudo apt-get update
Next you have to get all the dependencies which you need to install x264 & FFmpeg.
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
When you've got all the dependencies you have to install x264. First of all you have to get the files downloaded of x264.
git clone git://git.videolan.org/x264.git
After getting to files downloaded you have to install the x264. So you have to enter the folder.
cd x264
Then install it.
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`" --backup=no --default
This will install and make a backup for you at the folder x264 which is at your home folder named as “x264_1:0.svn20100126+20fa784-1_i386.deb” (it will change a bit .. I think you get the idea).
After installing x264 next you have to install FFmpeg. So as you are in the x264 folder you have to get back to the home folder by
cd
Then download the files to install FFmpeg.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
This will install and make a backup for you at the folder ffmpeg which is at your home folder named as “ffmpeg_4:0.5+svn20100126-1_i386” (this also will change a bit .. ).
The installation of FFmpeg & x264 is over. Now I you want the GUI for the FFmpeg you can install that too.
sudo apt-get install winff
Rabu, 06 April 2011
Change Ubuntu Grub List
So I went on a mission to figure out how to change the boot order to load XP by default.
I knew that Ubuntu was using the GRUB boot loader. I wasn’t familiar with GRUB so I don’t know why I knew this – it must have been stated during the install sometime. But anyway – I knew it was GRUB.
I copied the file into my home dir and used chmod (it’s been so long since I’ve used a *nix CLI that I had to lookup chmod – I knew it was “ch” something) so I could write to it then opened it in xemacs.
I simply copied the XP settings ahead of the Ubuntu settings in the item list and left everything else the same.
The relevant parts of the original menu.lst were:
—————————- /boot/grub/menu.lst —————————————-
default 0
timeout 10
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
—————————–
I referred to the online GRUB manual (http://www.gnu.org/software/grub) and confirmed that the “0” in default was the list item to boot by default (zero-indexed) and that if it were changed to “saved” the previously loaded item with a “savedefault” entry would be used. I didn’t want that. I want it to boot to XP by default regardless of what I used most recently.
I had two choices – change the default value to 4 (the menu divider is an option as well) or leave it at 0 and reorder the items.
I decided to reorder the items for one reason – I want the top menu item to be the default because that is how my family will expect it to work.
There are some notes about an automatically generated section that could be over-written so I did back up the file before making the change and I decided it was worth the hassle of losing the customizations I made (and possibly the Window’s item) to make it work the way we need for now. I don’t plan to change it often.
So I simply moved the XP section to the top, moved the divider below it, saved the local copy and copied it over the original.
Rebooting brought up XP after a 10 second delay – just as I had hoped.
support :
GrubHowto
ChangeDefaultOs
I knew that Ubuntu was using the GRUB boot loader. I wasn’t familiar with GRUB so I don’t know why I knew this – it must have been stated during the install sometime. But anyway – I knew it was GRUB.
I copied the file into my home dir and used chmod (it’s been so long since I’ve used a *nix CLI that I had to lookup chmod – I knew it was “ch” something) so I could write to it then opened it in xemacs.
I simply copied the XP settings ahead of the Ubuntu settings in the item list and left everything else the same.
The relevant parts of the original menu.lst were:
—————————- /boot/grub/menu.lst —————————————-
default 0
timeout 10
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
—————————–
I referred to the online GRUB manual (http://www.gnu.org/software/grub) and confirmed that the “0” in default was the list item to boot by default (zero-indexed) and that if it were changed to “saved” the previously loaded item with a “savedefault” entry would be used. I didn’t want that. I want it to boot to XP by default regardless of what I used most recently.
I had two choices – change the default value to 4 (the menu divider is an option as well) or leave it at 0 and reorder the items.
I decided to reorder the items for one reason – I want the top menu item to be the default because that is how my family will expect it to work.
There are some notes about an automatically generated section that could be over-written so I did back up the file before making the change and I decided it was worth the hassle of losing the customizations I made (and possibly the Window’s item) to make it work the way we need for now. I don’t plan to change it often.
So I simply moved the XP section to the top, moved the divider below it, saved the local copy and copied it over the original.
Rebooting brought up XP after a 10 second delay – just as I had hoped.
support :
GrubHowto
ChangeDefaultOs
Faster Browsing on Ubuntu use DNS Cache
Local DNS cache for faster internet :
The package we will be using for caching nameserver lookups is called "dnsmasq". So first, install it using:
$sudo apt-get install dnsmasq
(If you can’t find then, then you probably haven’t added the Universe repository to your list of repositories.)
No uncomment the following line (that is edit the line to NOT have a “#” in the beginning) in the file/etc/dnsmasq.conf:
listen-address=127.0.0.1
Now edit/etc/dhcp3/dhclient.conf and make sure the section below exactly like this, especially the line that says “prepend domain-name-servers 127.0.0.1;”
#supersede domain-name "fugue.com home.vix.com";
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;
Explanation for the above change: In the normal case, when you get a new dhcp lease, the dhcp3 client (tool) on your computer gets a new lease, and updates the/etc/resolv.conf file on your computer with the right values for the DNS servers to use (usually some machine in the network of your hosting provider). Adding the “prepend” option as we did above ensures that “127.0.0.1″ will appear on the top of the list of DNS servers. That magic number refers to your own computer. So in the future, whenever your computer needs to resolve a domain name, it will forward that request to dnsmasq (which is running at 127.0.0.1 – your computer). If the details for the domain name are already in you cache, well and good, dnsmasq will serve it up and make the process real fast. If it is not in the cache, then dnsmasq will look at the /etc/resolv.conf file and use the nameservers listed below the “127.0.0.1″.
I hope that explains things.
Now open the file/etc/resolv.conf in your text editor.
It probably looks like:
nameserver 10.17.3.252
nameserver 10.17.3.244
The 127.0.0.1 is missing right now since you haven’t renewed your lease after you edited the /etc/dhcp3/dhclient.conf file. So, let us add that in manually this one time.
After you do, your /etc/resolv.conf file will look like the following:
nameserver 127.0.0.1
nameserver 10.17.3.252
nameserver 10.17.3.244
Don’t worry if the numbers are different – if they are not, then hey – we must be neighbours
Okay. We are almost done here. All we have to do now is to restart dnsmasq so that the changes we made to the configuration file take effect. You can do that using the command:
$sudo /etc/init.d/dnsmasq restart.
Now you are running a local DNS cache. If you want to measure your speed improvement, type the command:
$dig google.com
You will see something like “;; Query time: 106 msec” there.
Now type the command again, and you should see something like:”;; Query time: 2 msec”
Now type the command again, and you should see something like:”;; Query time: 0 msec”
See, the first time, since google.com’s details were not in your cache (you are using it for the first time), the query took 38 ms. The second time, the cache speeds up the lookup. I have been using this for over a month now, and haven’t had a problem.
The following is ONLY for dial-up customers.
Note: If you have a dsl connection, the following may work:
Basically, the differences are in how the “conf” files are edited and used.
Copy the /etc/resolv.conf file to /etc/resolv.dnsmasq.conf
Then, edit the /etc/dnsmasq.conf file as follows:
# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/etc/resolv.dnsmasq.conf
You also have to uncomment the line that sayslisten-address=127.0.0.1 or u don't, its no big problems.,
Now, edit /etc/resolv.conf to have ONLY the following line in it:
nameserver 127.0.0.1
Next, edit /etc/ppp/peers/provider and change the line:
usepeerdns to
# usepeerdns
n wvdial, if connect use that :
Next, edit /etc/ppp/peers/wvdial and change the line:
usepeerdns to
# usepeerdns
(that is, comment out that line)
The ppp client does not allow you to prepend the 127.0.0.1 entry to your /etc/resolv.conf file. So what we did in the above was to create a copy of your previous resolv.conf for dnsmasq to use for lookups, update the file to use a local cache, and then prevent the ppp client from overwriting the resolv.conf file the next time. Now you can restart the dnsmasq service as I explained above, and start enjoying faster name resolution.
*Thanx for visiting my blog's*
The package we will be using for caching nameserver lookups is called "dnsmasq". So first, install it using:
$sudo apt-get install dnsmasq
(If you can’t find then, then you probably haven’t added the Universe repository to your list of repositories.)
No uncomment the following line (that is edit the line to NOT have a “#” in the beginning) in the file/etc/dnsmasq.conf:
listen-address=127.0.0.1
Now edit/etc/dhcp3/dhclient.conf and make sure the section below exactly like this, especially the line that says “prepend domain-name-servers 127.0.0.1;”
#supersede domain-name "fugue.com home.vix.com";
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;
Explanation for the above change: In the normal case, when you get a new dhcp lease, the dhcp3 client (tool) on your computer gets a new lease, and updates the/etc/resolv.conf file on your computer with the right values for the DNS servers to use (usually some machine in the network of your hosting provider). Adding the “prepend” option as we did above ensures that “127.0.0.1″ will appear on the top of the list of DNS servers. That magic number refers to your own computer. So in the future, whenever your computer needs to resolve a domain name, it will forward that request to dnsmasq (which is running at 127.0.0.1 – your computer). If the details for the domain name are already in you cache, well and good, dnsmasq will serve it up and make the process real fast. If it is not in the cache, then dnsmasq will look at the /etc/resolv.conf file and use the nameservers listed below the “127.0.0.1″.
I hope that explains things.
Now open the file/etc/resolv.conf in your text editor.
It probably looks like:
nameserver 10.17.3.252
nameserver 10.17.3.244
The 127.0.0.1 is missing right now since you haven’t renewed your lease after you edited the /etc/dhcp3/dhclient.conf file. So, let us add that in manually this one time.
After you do, your /etc/resolv.conf file will look like the following:
nameserver 127.0.0.1
nameserver 10.17.3.252
nameserver 10.17.3.244
Don’t worry if the numbers are different – if they are not, then hey – we must be neighbours
Okay. We are almost done here. All we have to do now is to restart dnsmasq so that the changes we made to the configuration file take effect. You can do that using the command:
$sudo /etc/init.d/dnsmasq restart.
Now you are running a local DNS cache. If you want to measure your speed improvement, type the command:
$dig google.com
You will see something like “;; Query time: 106 msec” there.
Now type the command again, and you should see something like:”;; Query time: 2 msec”
Now type the command again, and you should see something like:”;; Query time: 0 msec”
See, the first time, since google.com’s details were not in your cache (you are using it for the first time), the query took 38 ms. The second time, the cache speeds up the lookup. I have been using this for over a month now, and haven’t had a problem.
The following is ONLY for dial-up customers.
Note: If you have a dsl connection, the following may work:
Basically, the differences are in how the “conf” files are edited and used.
Copy the /etc/resolv.conf file to /etc/resolv.dnsmasq.conf
Then, edit the /etc/dnsmasq.conf file as follows:
# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/etc/resolv.dnsmasq.conf
You also have to uncomment the line that sayslisten-address=127.0.0.1 or u don't, its no big problems.,
Now, edit /etc/resolv.conf to have ONLY the following line in it:
nameserver 127.0.0.1
Next, edit /etc/ppp/peers/provider and change the line:
usepeerdns to
# usepeerdns
n wvdial, if connect use that :
Next, edit /etc/ppp/peers/wvdial and change the line:
usepeerdns to
# usepeerdns
(that is, comment out that line)
The ppp client does not allow you to prepend the 127.0.0.1 entry to your /etc/resolv.conf file. So what we did in the above was to create a copy of your previous resolv.conf for dnsmasq to use for lookups, update the file to use a local cache, and then prevent the ppp client from overwriting the resolv.conf file the next time. Now you can restart the dnsmasq service as I explained above, and start enjoying faster name resolution.
*Thanx for visiting my blog's*
How to configure graphichs errors n become terminal
# remove fglrx packages
sudo /usr/share/ati/fglrx-uninstall.sh # (if it exists)
sudo apt-get remove --purge fglrx*
# remove and reinstall the open source driver
sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
# replace lingering proprietary libraries with the open-source versions
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
Oh here's how I had to get it working:
1. Remove the 2.6.35 kernel, as fglrx crashed during the installation of the kernel
2. Restart and boot to the normal 2.6.32 kernel
3. Remove fglrx, fglrx-amdcce (some name like that) and one other package, automatically removed with fglrx
4. Tried running /usr/share/ati/fglrx-uninstall.sh - it would error out, so I had to remove /usr/share/ati
5. Reboot in safe graphics mode
6. Remove /etc/X11/Xorg.conf*
7. Reinstall fglrx, which ran dkms to update the kernel
8. Run sudo aticonfig --initial
9. Reboot
10. Enable composition - System -> Preferences -> Appearance -> Visual Effects -> Normal
sudo update-grub reboot.
to confirm you are running the new kernel type in a terminal:
uname -a
sudo /usr/share/ati/fglrx-uninstall.sh # (if it exists)
sudo apt-get remove --purge fglrx*
# remove and reinstall the open source driver
sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
# replace lingering proprietary libraries with the open-source versions
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
Oh here's how I had to get it working:
1. Remove the 2.6.35 kernel, as fglrx crashed during the installation of the kernel
2. Restart and boot to the normal 2.6.32 kernel
3. Remove fglrx, fglrx-amdcce (some name like that) and one other package, automatically removed with fglrx
4. Tried running /usr/share/ati/fglrx-uninstall.sh - it would error out, so I had to remove /usr/share/ati
5. Reboot in safe graphics mode
6. Remove /etc/X11/Xorg.conf*
7. Reinstall fglrx, which ran dkms to update the kernel
8. Run sudo aticonfig --initial
9. Reboot
10. Enable composition - System -> Preferences -> Appearance -> Visual Effects -> Normal
sudo update-grub reboot.
to confirm you are running the new kernel type in a terminal:
uname -a
Install flashget combine with flashgot n substitute IDM from windows
Ubuntu user can download the deb package and double-click to install,then there should be a launcher “FlashGet” in Applications->Internet menu.
Source Package :
1.) FlashGet(.tar.gz)
2.) FlashGet(.rpm)
3.) FlashGet(.deb)
U must used wget to successfully download file, with command :
wget http://bbs.flashget.com/download/flashget-1.0.2-0_en.noarch.deb
Configure Firefox Plugin for Flashget:
There’s a popular Firefox plugin called Flashgot that can launch download manager in Firefox.However,before install this plugin,we need to do following first:
1.Open up a terminal window (Applications->Accessories->Terminal) and execute:
gconftool-2 -s /desktop/gnome/url-handlers/flashget/command '/usr/bin/flashget %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/flashget/enabled --type Boolean true
2.Open Firefox and type about:config in address bar,then click “I’ll be careful,I promise!”
Right-click on blank area -> New ->Boolean -> network.protocol-handler.external.flashget -> true
Right-click on blank area again -> New -> String -> network.protocol-handler.app.flashget -> /usr/bin/flashget
3. Run this command:
sudo echo -e '#''!'"/bin/sh""\n""/usr/share/flashget/flashget "'$'"1" >/usr/bin/flashget
Now,install FlashGot plugin from this link: https://addons.mozilla.org/en-US/firefox/addon/220/
restart Firefox and go to Tools -> Add-ons -> Extensions -> FlashGot Preferences -> Click “add” in General tab and add FlashGet download manager (see the screenshot):
Source Package :
1.) FlashGet(.tar.gz)
2.) FlashGet(.rpm)
3.) FlashGet(.deb)
U must used wget to successfully download file, with command :
wget http://bbs.flashget.com/download/flashget-1.0.2-0_en.noarch.deb
Configure Firefox Plugin for Flashget:
There’s a popular Firefox plugin called Flashgot that can launch download manager in Firefox.However,before install this plugin,we need to do following first:
1.Open up a terminal window (Applications->Accessories->Terminal) and execute:
gconftool-2 -s /desktop/gnome/url-handlers/flashget/command '/usr/bin/flashget %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/flashget/enabled --type Boolean true
2.Open Firefox and type about:config in address bar,then click “I’ll be careful,I promise!”
Right-click on blank area -> New ->Boolean -> network.protocol-handler.external.flashget -> true
Right-click on blank area again -> New -> String -> network.protocol-handler.app.flashget -> /usr/bin/flashget
3. Run this command:
sudo echo -e '#''!'"/bin/sh""\n""/usr/share/flashget/flashget "'$'"1" >/usr/bin/flashget
Now,install FlashGot plugin from this link: https://addons.mozilla.org/en-US/firefox/addon/220/
restart Firefox and go to Tools -> Add-ons -> Extensions -> FlashGot Preferences -> Click “add” in General tab and add FlashGet download manager (see the screenshot):
Langganan:
Komentar (Atom)




