Saturday, December 8, 2012
Tuesday, November 13, 2012
Wednesday, October 24, 2012
Partition setting: "Typical usage"
sulekha:-
whenever i install ubuntu using alternate install CD I will encounter this screen, can anybody explain the significance of the setting "Typical usage" ??
salasi:-
My interpretation (that is: guess) was that this would allow you specify other types of usage, such as the 'lots of small files' type of usage you might see with squid or an e-mail directory, vs the 'few big files' you might see with a media server so that it could adjust the number of inodes appropriately (or, just possibly, the use of write barriers, but that seems less likely).
Now as this is a complete guess, and I'm certainly prepared to be proved wrong (and learn from that): to that end, can you have a look at what other options there are other than 'typical usage', because then we should be able to be definitive about what this is about, please?
sulekha:-
it is something similar to what you have said. I tried a fresh install of ubuntu 12.04 using alternate cd to find out this
whenever i install ubuntu using alternate install CD I will encounter this screen, can anybody explain the significance of the setting "Typical usage" ??
salasi:-
My interpretation (that is: guess) was that this would allow you specify other types of usage, such as the 'lots of small files' type of usage you might see with squid or an e-mail directory, vs the 'few big files' you might see with a media server so that it could adjust the number of inodes appropriately (or, just possibly, the use of write barriers, but that seems less likely).
Now as this is a complete guess, and I'm certainly prepared to be proved wrong (and learn from that): to that end, can you have a look at what other options there are other than 'typical usage', because then we should be able to be definitive about what this is about, please?
sulekha:-
it is something similar to what you have said. I tried a fresh install of ubuntu 12.04 using alternate cd to find out this
Tuesday, October 23, 2012
How to add a CD/DVD to the repository list ?
sudo apt-cdrom -d /media/cdrom add
[for /media/cdrom substitute directory of the mounted CD/DVD ]
Sunday, July 15, 2012
Wednesday, July 4, 2012
Hiding certain file type access via samba
[data]
comment = testing only
path = /data
browseable = yes
writeable = yes
public = no
valid user = alok
vet files = /*.mp3/*.java/
browseable and available directive in samba
difference between browseable and available directive ?
The "available" parameter determines is a client can connect to the share. If set to "no" then it is as if the share has not been created.
The "browseable" parameter determines whether or not the name of the share is included in the list of available resources (shares) when browsing the system. It is possible to connect to a share that has been set as "browseable = no" simply by using the UNC name.
The "available" parameter determines is a client can connect to the share. If set to "no" then it is as if the share has not been created.
The "browseable" parameter determines whether or not the name of the share is included in the list of available resources (shares) when browsing the system. It is possible to connect to a share that has been set as "browseable = no" simply by using the UNC name.
create debian package out of installed packages
dpkg-repack:-
dpkg-repack creates Debian package file out of a package that has already been installed. If any changes have been made to the package while it was unpacked (e.g., files in /etc were modified), the new package will inherit the changes.
This utility can make it easy to copy packages from one computer to another, or to recreate packages which are installed on your system but no longer available elsewhere, or to save the current state of a package before you upgrade it.
Example situation:-
-> install great game non free from game writer company
-> game writer company goes bankrupt & your CD-ROM is lost.
-> Buy a new computer , want to play great game non free
use dpkg-repack to create a new package to install on new computer
install dpkg-repack:- apt-get install dpkg-repack
dpkg-repack coreutils
mine:~# dpkg --contents coreutils_5.97-5.3_amd64.deb
drwxr-xr-x root/root 0 2007-02-17 01:44 ./
drwxr-xr-x root/root 0 2007-02-17 01:44 ./bin/
-rwxr-xr-x root/root 69104 2007-01-30 20:38 ./bin/mv
-rwxr-xr-x root/root 15560 2007-01-30 20:38 ./bin/false
-rwxr-xr-x root/root 40128 2007-01-30 20:38 ./bin/touch
-rwxr-xr-x root/root 36072 2007-01-30 20:38 ./bin/chmod
-rwxr-xr-x root/root 21448 2007-01-30 20:38 ./bin/cat
If you don't wish to run the rebuild as root, and you have the fakeroot package installed you can do so as follows:
skx@mine:~$ fakeroot -u dpkg-repack bash
dpkg-deb: building package `bash' in `./bash_3.1dfsg-8_amd64.deb'.
for more options see man dpkg-repack
dpkg-repack [--root=dir] [--arch=architecture] [--generate] packagename [packagename ...]
Examples:-
sudo dpkg-repack --arch=amd64
dpkg-repack --help
HOWTO: Backup all installed programs/packages
soln: fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut -f1`
dpkg-repack creates Debian package file out of a package that has already been installed. If any changes have been made to the package while it was unpacked (e.g., files in /etc were modified), the new package will inherit the changes.
This utility can make it easy to copy packages from one computer to another, or to recreate packages which are installed on your system but no longer available elsewhere, or to save the current state of a package before you upgrade it.
Example situation:-
-> install great game non free from game writer company
-> game writer company goes bankrupt & your CD-ROM is lost.
-> Buy a new computer , want to play great game non free
use dpkg-repack to create a new package to install on new computer
install dpkg-repack:- apt-get install dpkg-repack
dpkg-repack coreutils
mine:~# dpkg --contents coreutils_5.97-5.3_amd64.deb
drwxr-xr-x root/root 0 2007-02-17 01:44 ./
drwxr-xr-x root/root 0 2007-02-17 01:44 ./bin/
-rwxr-xr-x root/root 69104 2007-01-30 20:38 ./bin/mv
-rwxr-xr-x root/root 15560 2007-01-30 20:38 ./bin/false
-rwxr-xr-x root/root 40128 2007-01-30 20:38 ./bin/touch
-rwxr-xr-x root/root 36072 2007-01-30 20:38 ./bin/chmod
-rwxr-xr-x root/root 21448 2007-01-30 20:38 ./bin/cat
If you don't wish to run the rebuild as root, and you have the fakeroot package installed you can do so as follows:
skx@mine:~$ fakeroot -u dpkg-repack bash
dpkg-deb: building package `bash' in `./bash_3.1dfsg-8_amd64.deb'.
for more options see man dpkg-repack
dpkg-repack [--root=dir] [--arch=architecture] [--generate] packagename [packagename ...]
Examples:-
sudo dpkg-repack --arch=amd64
dpkg-repack --help
HOWTO: Backup all installed programs/packages
soln: fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut -f1`
Saturday, June 9, 2012
how to install microsoft fonts in ubuntu
method 1 :-
sudo apt-get install ubuntu-restricted-extras
method 2:-
If you have Windows, you may copy your ttf fonts in
C:\Windows\Fonts to /usr/share/fonts/truetype/ folder.
Then run the command sudo fc-cache -f -v
How to find which package is taking a lot of space in ubuntu ?
rscgl@debian:~$ dpkg-query --show --showformat='${Package; -50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{ printf "%.3f MB \t %s \n", $2/(1024),$1}'| tail -n 10
How to insert Rupee symbol
Press CTRL + SHIFT + U
type 20b9 then press space
checked in ubuntu 12.04, for lucid (10.04) update ubuntu font family and try
How to use graphicsmagick package to convert jpg to pdf ?
1) graphicsmagick package gm convert name.jpg output.pdf
2) gm convert *.jpeg 1400 x 1600 filename.pdf
3) gm convert *.jpg -adjoin sample.pdf gm convert [0-9][0-9][0-9].jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg 11.jpg 12.jpg 13.jpg 14.jpg 15.jpg 16.jpg 17.jpg 18.jpg 19.jpg 20.jpg 21.jpg 22.jpg 23.jpg 24.jpg 25.jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg 11.jpg 12.jpg 13.jpg 14.jpg 15.jpg 16.jpg 17.jpg 18.jpg 19.jpg 20.jpg 21.jpg 22.jpg 23.jpg 24.jpg 25.jpg 26.jpg 27.jpg 28.jpg 29.jpg 30.jpg 31.jpg 32.jpg 33.jpg 34.jpg 35.jpg 36.jpg 37.jpg 38.jpg 39.jpg 40.jpg 41.jpg 42.jpg 43.jpg 44.jpg 45.jpg 46.jpg 47.jpg 48.jpg -adjoin hhh.pdf
2) gm convert *.jpeg 1400 x 1600 filename.pdf
3) gm convert *.jpg -adjoin sample.pdf gm convert [0-9][0-9][0-9].jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg 11.jpg 12.jpg 13.jpg 14.jpg 15.jpg 16.jpg 17.jpg 18.jpg 19.jpg 20.jpg 21.jpg 22.jpg 23.jpg 24.jpg 25.jpg -adjoin hhh.pdf
gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg 11.jpg 12.jpg 13.jpg 14.jpg 15.jpg 16.jpg 17.jpg 18.jpg 19.jpg 20.jpg 21.jpg 22.jpg 23.jpg 24.jpg 25.jpg 26.jpg 27.jpg 28.jpg 29.jpg 30.jpg 31.jpg 32.jpg 33.jpg 34.jpg 35.jpg 36.jpg 37.jpg 38.jpg 39.jpg 40.jpg 41.jpg 42.jpg 43.jpg 44.jpg 45.jpg 46.jpg 47.jpg 48.jpg -adjoin hhh.pdf
How to enable compiz effects
compiz :- step 1:- install the following packages:- compiz, compiz-plugins, compiz-extra, compiz-fusion-plugins-main,compiz-fusion-plugins-extra, compiz-core,compiz-gnome,fusion-icon, compizconfig-settings-manager
step 2:- ALT-F2 run compiz --replace (replacing metacity and run compiz as window manager)
step 3:- Set up compiz effects:- System -> preferences -> "Compiz Config Settings Manager"
i) Search for "animations" -> "enable Regex matching" -> also check animations add on click animations icon -> Open Animation -> Open effect "zoom" Duration "585" "close Animation" - zoom close Effect -> Burn , Duration - 619 Minimize animation -> minimize effect -> "explode" Duration 654
ii) Filter for cube:- Desktop cube , Rotate cube (tick) General options -> desktop size 4 Rotate cube (CTRL -ALT + LEFT/RIGHT ARROW)
iii) Filter for "move" , tick "move window" iv) Filter for "decorate" , tick "window decoration" (title bar , xbutton)
v) Desktop effects (a) "Enhanced zoom desktop" turn it on (Super key + mouse wheel) (b)
vi) Effects section:- (a) 3D windows (CTRL + ALT + MOUSE) (b) Wobbly -> "wobbly window"
NB:- Tested in Debian Squeeze Make sure that you have graphics card installed in your machine
step 2:- ALT-F2 run compiz --replace (replacing metacity and run compiz as window manager)
step 3:- Set up compiz effects:- System -> preferences -> "Compiz Config Settings Manager"
i) Search for "animations" -> "enable Regex matching" -> also check animations add on click animations icon -> Open Animation -> Open effect "zoom" Duration "585" "close Animation" - zoom close Effect -> Burn , Duration - 619 Minimize animation -> minimize effect -> "explode" Duration 654
ii) Filter for cube:- Desktop cube , Rotate cube (tick) General options -> desktop size 4 Rotate cube (CTRL -ALT + LEFT/RIGHT ARROW)
iii) Filter for "move" , tick "move window" iv) Filter for "decorate" , tick "window decoration" (title bar , xbutton)
v) Desktop effects (a) "Enhanced zoom desktop" turn it on (Super key + mouse wheel) (b)
vi) Effects section:- (a) 3D windows (CTRL + ALT + MOUSE) (b) Wobbly -> "wobbly window"
NB:- Tested in Debian Squeeze Make sure that you have graphics card installed in your machine
Wednesday, May 2, 2012
Digital Diary software
If you want to have a private digital diary software then install lifeograph see:- http://lifeograph.wikidot.com/ for more details
Tuesday, April 24, 2012
Wipe a hard disk
Sunday, April 15, 2012
How to extract *.xz files ?
How to extract *.xz files ?
If you are running Ubuntu, you should have the xz-utils installed by default. I am running Ubuntu 10.04, and to extract .xz files, I use the following command:
if it is not installed , install by giving the command:- sudo apt-get install xz-utils
xz -d path/to/file.xz
This will extract the file to the current directory.
If you are running Ubuntu, you should have the xz-utils installed by default. I am running Ubuntu 10.04, and to extract .xz files, I use the following command:
if it is not installed , install by giving the command:- sudo apt-get install xz-utils
xz -d path/to/file.xz
This will extract the file to the current directory.
Monday, April 2, 2012
Wednesday, February 22, 2012
Tuesday, February 14, 2012
allows access to the system by the user root only
PAM NOLOGIN:-
* allows access to the system by the user root only
* obviates the need to shut down services
* displays the contents of /etc/nologin file
sample content of this file :-
CURRENTLY WE ARE UNDERGOING SYSTEM MAINTENANCE, EXPECT US BACK IN 1600 HOURS
add the following directive
auth required pam_nologin.so to the relevant pam file.
(ex:- for ssh /etc/pam.d/sshd file)
[root@BACKUP-SERVER ~]# find / -name pam_nologin.so
/lib64/security/pam_nologin.so
/lib/security/pam_nologin.so
* allows access to the system by the user root only
* obviates the need to shut down services
* displays the contents of /etc/nologin file
sample content of this file :-
CURRENTLY WE ARE UNDERGOING SYSTEM MAINTENANCE, EXPECT US BACK IN 1600 HOURS
add the following directive
auth required pam_nologin.so to the relevant pam file.
(ex:- for ssh /etc/pam.d/sshd file)
[root@BACKUP-SERVER ~]# find / -name pam_nologin.so
/lib64/security/pam_nologin.so
/lib/security/pam_nologin.so
Monday, February 13, 2012
How will you implement account lockout policy in linux?
How will you implement account lockout policy in linux?
soln:-
PAM_TALLY
* ability to tally failed login attempts and take actions
* Denies user access to the system based on no: of failed login attempts
* This feature / module not enabled by default
* uses /var/log/faillog - logs failed logins
* manipulate failed login counters
which pam_tally ?
/usr/sbin/pam_tally (i.e it is a root enabled utility)
* pam_tally --user username :- displays the count of the username
resetting a failed login counter:-
pam_tally --reset=n --user=username
Add the following line to /etc/pam.d/common-auth
auth required pam_tally.so deny=3 unlock_time=1800
NB:- tested in centos -5.5
for ubuntu systems see:- http://blog.bodhizazen.net/linux/ubuntu-how-to-faillog/
soln:-
PAM_TALLY
* ability to tally failed login attempts and take actions
* Denies user access to the system based on no: of failed login attempts
* This feature / module not enabled by default
* uses /var/log/faillog - logs failed logins
* manipulate failed login counters
which pam_tally ?
/usr/sbin/pam_tally (i.e it is a root enabled utility)
* pam_tally --user username :- displays the count of the username
resetting a failed login counter:-
pam_tally --reset=n --user=username
Add the following line to /etc/pam.d/common-auth
auth required pam_tally.so deny=3 unlock_time=1800
NB:- tested in centos -5.5
for ubuntu systems see:- http://blog.bodhizazen.net/linux/ubuntu-how-to-faillog/
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora
This is one of the worse errors i came across so far, whenever i tried to update my fedora 12 through yum there was an error saying
[Errno 14] PYCURL ERROR 7 – “”
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
there were tons of solutions available on googling, but most of them were useless. This is how i worked out the problem
first of all if you are using proxy server,configure your yum.conf file so that you can link to proxy
after that try the following commands
#yum clean all
#yum clean metadata
Now try to update again using yum, even if the same error is coming... it is probably due to python .
Since the python does not handle https proxy well, change all the https present in *.repo files in /etc/yum.repos.d/ to http
Here’s the way to do it… edit your repository files /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo by commenting all the lines starting with term mirrorlist and uncommenting all the lines starting with term baseurl.
Now append the following to your /etc/hosts file
80.239.156.215 mirrors.fedoraproject.org
213.129.242.84 mirrors.rpmfusion.org
This worked for me and hopefully it must work for you also. If you want a copy of all *.repos file then ask in comment.
see:- http://rishabhsays.wordpress.com/2010/01/24/error-cannot-retrieve-repository-metadata-repomd-xml-for-repository-fedora/
[Errno 14] PYCURL ERROR 7 – “”
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
there were tons of solutions available on googling, but most of them were useless. This is how i worked out the problem
first of all if you are using proxy server,configure your yum.conf file so that you can link to proxy
after that try the following commands
#yum clean all
#yum clean metadata
Now try to update again using yum, even if the same error is coming... it is probably due to python .
Since the python does not handle https proxy well, change all the https present in *.repo files in /etc/yum.repos.d/ to http
Here’s the way to do it… edit your repository files /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo by commenting all the lines starting with term mirrorlist and uncommenting all the lines starting with term baseurl.
Now append the following to your /etc/hosts file
80.239.156.215 mirrors.fedoraproject.org
213.129.242.84 mirrors.rpmfusion.org
This worked for me and hopefully it must work for you also. If you want a copy of all *.repos file then ask in comment.
see:- http://rishabhsays.wordpress.com/2010/01/24/error-cannot-retrieve-repository-metadata-repomd-xml-for-repository-fedora/
Subscribe to:
Comments (Atom)
.jpeg)












