Sunday, March 18, 2007

HOWTO Encrypt CD/DVDs in Ubuntu

This guide can be adapted to any distro, its not Ubuntu specific.

Installing necessary tools
sudo apt-get install aespipe mkisofs loop-aes-utils
Chose a password

You need to chose a 20+ character password and DO NOT FORGET IT, you will NEVER get your data back if you forget the password.

Creating the CD/DVD image


Make a directory called backup then copy the files you want to burn into the backup directory.
We are using AES encryption, you can chose from 128 or 256 bit key lengths, I recommend 256.

mkisofs -r backup | aespipe -e aes256 > backup.iso
or for 128 bit key length
mkisofs -r backup | aespipe -e aes128 > backup.iso

Mounting the image

First we need to load some modules
sudo modprobe aes
sudo modprobe cryptoloop
For 128 bit key lengths:
sudo mount -t iso9660 backup.iso /mnt/iso -o loop=/dev/loop0,encryption=aes128
For 256 bit key lengths:
sudo mount -t iso9660 backup.iso /mnt/iso -o loop=/dev/loop0,encryption=aes256
This will mount the image in /mnt/iso (make sure you have the directory before you try to mount)

Burning

You can burn the image with your favorite program (gnomebaker, k3b), you might get some warnings about the image but you can ignore them.

Mounting the new CD/DVD


First make sure you loaded the aes and cryptoloop modules (see above)
sudo mount -t iso9660 /dev/cdrom /mnt/iso -o loop=/dev/loop0,encryption=aes256

Tuesday, March 13, 2007

How to Export your Mails from Evolution to Thunderbird

Preparing Your Thunderbird

Create a new mail account in Thunderbird (this is so that if everything goes pear shaped nothing else will be affected).

In Thunderbird choose Edit -> Account Settings -> Add Account

Select Email Account and click Next

Leave identity settings as they are and click next

Set the Incoming Server to “localhost” and REMOVE the tick from “Use Global Inbox” Click next

Leave the Incoming user name as it is. Click Next

Change the Account Name to something relevant such as “Evolution Mail”

Once the settings are created return to Edit -> Account Settings and select the “Server Settings” option under the “Evolution Mail” account. Take note of the “Local Directory” Setting. It will be a string like “/home/yourloginname/.mozilla-thunderbird/a2ti6rsz.default/Mail/localhost”. This is where all mail is stored for this account.

Now that the account is created and you know where to find it you can transfer the emails from Evolution.

Transferring mail from Evolution to Thunderbird

Open up two windows to your Home Directory. Navigate in one of the windows to the path that Thunderbird has assigned for your email storage above. HINT: CTRL+h in your home folder will show all hidden files and folders so you will be able to see the “.mozilla-thunderbird” folder. Once you are in this folder you will see some files in there with names such as Inbox, Inbox.msf, Junk.msf and so on.

In the other window from your home folder navigate to “.evolution/mail/local” This is where any locally stored mail from Evolution is placed. There are a similar set of files to what you see in the Thunderbird folder, Inbox, Drafts and so on.

Copy the files named Inbox, Sent, Outbox and Drafts from the evolution folder to the mozilla-thunderbird folder (dragging and dropping while holding down your ctrl key will copy rather than move the files). When it asks if its ok to overwrite them just say yes. Its ok, nothing bad will happen. Its just a copy. You can trust me. Honest.

If you have your mail folders organised in evolution under your Inbox there will be a sub directory called “Inbox.sbd” under the .evolution/mail/local/ directory. In that directory you will find files named the same as your folders such as Humour, Humour.cmeta, Humour.ev-summary, Humour.ibex.index and so on. Of course, this depends on what you’ve called your folders.

For any of the folders you want to move to Thunderbird chose the file WITHOUT any extension and copy it to the localhost folder where you previously placed the Inbox and other files.

Thats all there is to it! Open Thunderbird and you should see all your mail and the relevant folders under the “Evolution Mail” account. You can keep the mail there or move it around in Thunderbird. The choices are yours.

source: www.ubuntugeek.com

How To Import your mails from Evolution to Thunderbird

If you want to Import your mails from Evolution to Thunderbird there is very nice utility called MboxImport .

Thunderbird, like many other email clients, uses the mbox format to archive the emails.It’s curious that Thundebird has not a function that let you import or export files in this format and this lack is sometimes a problem when you want to move the accounts from a pc to another one or when you want to migrate (for example) from Mozilla to Thunderbird.Anyway this kind of import can be made very easily copying the mbox file into the directory “Local Folders” (it is inside the profile directory) with Thunderbird close; restarting the program, the mbox file will be visibile as subfolder of Local Folders.To export, you must just copy the email files that are inside the account’s folder.This method can give some troubles, above all for people not very expert with Thunderbird, because the profile’s files are into a hidden directory, whose path changes with the operative systems or also with personal needs.

First you need to download MboxImport from here

Install MboxImport in Thunderbird

In Thunderbird, go in “Tools” –> “Extensions” and click on “Install”;

pick the xpi file you downloaded and follow the instructions;

restart Thunderbird.

To export, it’s sufficient a right-click on the folder or on the account and to choose the voice you want from the menu “Import/export”.

Once you have saved all the folders/files into the Mbox format, just go into Evolution and select “Import” and follow the wizard using “a single file import” and select your xxxx.mbox file and then select which folder in Evolution you want to import into.

For importing the address book from Thunderbird to Evolution, use T-birds address book export function and save the address book as a .csv file.After finishing address book check everything is fine or not.

source:www.ubuntugeek.com

How to Make Make a VCD from an AVI Using Avidemux and K3b

Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities.

K3b is a GUI frontend to the cd recording programs cdrdao and cdrecord. Its aim is to provide a very user friendly interface to all the tasks that come with cd recording.

from mp3, ogg vorbis, and wav files (on-the-fly or with images)
* cd-text support
* ID3-tag support
* little gimmick: hide the first track (so that you have to search back
from the beginning of the cd to find it)
* volume level normalization (only when writing with an image)

Install Avidemux and K3b in Ubuntu

First you need to check you have installed Avidemux and K3b packages if not use the following command to install

sudo avidemux K3b

This will complete the installation.

Make a VCD from an AVI Using Avidemux and K3b

In Avidemux, from the menu select Auto->VCD, then select a filename. It will create an mpg, saving to your Home directory by default.

In K3b, from the menu select File->New Project->New Video CD Project. Drag and drop the mpg you created in step 1. Click Burn.

How to Clear Free Hard Drive Space with Disk Scrub Utility

Scrub iteratively writes patterns on files or disk devices to make retrieving the data more difficult. Scrub operates in one of three modes:

The special file corresponding to an entire disk is scrubbed and all data on it is destroyed. This mode is selected if file is a character or block special file. This is the most effective method.

A regular file is scrubbed and only the data in the file (and optionally its name in the directory entry) is destroyed. The file size is rounded up to fill out the last file system block. This mode is selected if file is a regular file.

A file is created, expanded until the file system is full, then scrubbed as in item 2. This mode is selected with the -X option.
Scrub implements user-selectable pattern algorithms that are compliant with DoD 5520.22-M or NNSA NAP-14.x.

Install Scrub in Ubuntu

First you need to install Alien

sudo apt-get install alien

This will help us to convert .rpm files in to .deb packages

Now you need to download the Scrub latest version from here

wget http://heanet.dl.sourceforge.net/sourceforge/diskscrub/scrub-1.8-1.i386.rpm

You have scrub-1.8-1.i386.rpm file now.Convert this file in to .deb using the following command

sudo alien -k scrub-1.8-1.i386.rpm

Now you have the scrub-1.8-1.i386.deb package.You need to install this package using the following command

sudo dpkg -i scrub-1.8-1.i386.deb

This will complete the installation

Create a scratch directory for scrub.

sudo mkdir /scratch

Using Scrub

Scrub Syntax

scrub [-f] [-p nnsa|dod|bsi] [-X] [-D newname] [-s size] file

Example

sudo scrub -X /scratch/junk

Delete junk file once scrub is finished.

sudo rm -f /scratch/junk

Source: www.ubuntugeek.com

Friday, March 9, 2007

How to Send and Receive Hotmail E-mail thru Evolution?

If you want to use you Evolution mail client to send and receive your hotmail messages use the following procedure.

How to install Gimmie: A new GNOME panel in Ubuntu?

Gimmie is an elegant way to think about how you use your desktop computer.Gimmie is a new concept of the panel designed to shift the direction of the desktop beyond the standard WIMP model (Windows, Icons, Menu, Pointer) towards one directly representing the concepts that modern desktop users use every day. It is being considered for inclusion in Project Topaz (a.k.a. Gnome 3.0)

Gimmie Features

  • A new way to think about your desktop
  • Easy to learn
  • Relates objects to topics– Colors aide recognition
  • Quickly see what's open
  • Bookmarks are running representation
  • Simple & Obvious
  • It's a Prototype

Current Stable Version :- 0.2.4

Project Home Page :- http://beatnik.infogami.com/Gimmie

How to Backup and Restore Ubuntu system?

Data can be lost in different ways some of them are because of hardware failures,you accidentally delete or overwrite a file. Some data loss occurs as a result of natural disasters and other circumstances beyond your control.

Now we will see a easy backup and restore tool called "sbackup"

SBackup is a simple backup solution intended for desktop use. It can backup any subset of files and directories. Exclusions can be defined by regular expressions. A maximum individual file size limit can be defined. Backups may be saved to any local and remote directories that are supported by gnome-vfs. There is a Gnome GUI interface for configuration and restore.

Current Stable Version : - 0.10.3

Project Home page :- http://sbackup.sourceforge.net/HomePage

Sbackup Features List

  • Backup any subset of files and directories
  • Exclude files and directories by regex expressions
  • Exclude files by type (extension)
  • Exclude files by maximum file size
  • Backup to local filesystem
  • Backup to any Gnome-VFS supported remote filesystem (including sftp and ftp)
  • Full and incremental backups
  • Scheduling backups via cron
  • Gnome GUI for configuration
  • Gnome GUI for restore
  • Command-line restore tool that also provides a Python API for restoring a file or directory
  • Backing up package list in Debian derived distributions
  • On restore, existing files are not overwritten, but are renamed to a safe name

Installing sbackup in ubuntu

sudo apt-get install sbackup

You can use synaptic also for this if you want to know how to search this software and install check here

Backup Your Data Using Sbackup

Once you completed the installation you can access sbackup using System--->Administration--->Simple Backup Config you can see this in the following screen


Next screen is asking for root password enter password and click ok


Once it opens the sbackup application you can see the following screen where you can configure your backup settings first tab is general options in this example i am choosing "Use custom backup settings"


Sbackup can be operated in 3 different modes

Recommended Backup

If you are new Ubuntu user or aren't sure what you should backup.This will perform a daily backup of your /home,system data held in /etc,/usr/local and /var.This will deliberately exclude any files over 100MB.By default this backup will be stored /var/backup

Custom Backup

This is same as the recommended backup and in this you can change the settings include,exclude files,you can change the schedule time.

Manual Backup

If you want to backup some files from time to time this option is for you and you can click backup now button to manually perform a backup according to the settings on the other backup properties dialog box tabs.

Next you click on "Include" tab here you can include any file or directory you want to backup

If you click on "Add file" button you should see the following screen where you can select your files

If you click on "Add Directory" button you should see the following screen where you can select your Directory for backup

Next option is "Exclude" here you can exclude files and folders you don't want to backup.Here you can exclude Paths,File Types,Regular Expressions,Max file,folder size

Next option is "Destination" here i am leaving the default location i.e /var/backup if you want to chnage the backup store location you can select the "Use Custom local Backup directory" and enter the location

Now you can select "Time" option here you can schedule when do you want to run your backup.

Available options for backups you can see in the following screen you can select hourly,daily,weekly,monthly,custom options


Next option is "Purging" here you can select old and incomplete backups and you set the no.of days you want to purge after completing all the settings you need to click on "Save" button to save your settings.


Now if you want to take backup just click on "Backup Now" or leave the schedule backup in this example i just clicked on "Backup Now" this is started a background process with process id you can see this in the following screen


Restore Your Data Using Sbackup

If you want to restore backups or any files,folders go to System--->Administration--->Simple Backup Restore you can see this in the following screen

Once it opens you should see the following screen here you can select the restore source folder and available backups from drop-down menu here you can choose files and folders you want to restore and click on "Restore" button

In this example i have choosen to restore one .iso file and once you select your file and click on "Restore" it will ask for your confirmation click on yes this will restore the file in orginal location if you want to restore in different location you need to select "Restore As" option

Note:- By default Restored Files and Directories are owned by root this is because of sbackup will runs with root.You need to chnage these files or folder permissions using chmod or just right click and select properties of the file or folder.

Backup Destination on Remote machine

One more beauty about sbackup is you can store your backup on a remotemachine for this it will give the option of using SSH or FTP for this go to System---> Administration---> Simple Backup Config once it opens the application you need to click on destination tab here you can select "Use a remote Directory" option type ssh:// or ftp:// followed by the username:password, then @, then the remote host to connect to and the remote directory.

Final Tip:-

Sbackup doesn't create a new backup file each time it runs and it creates an incremental backup.Which means that it updates the last backup with files that you changed or been created any files that haven't been updated since the last backup are unchanged

Sbackup Configuration from command line

If you want to configure sbackup you need to Edit /etc/sbackup.conf file

Restore Backup from command line

Run "sudo srestore.py /var/backup/2006-11-18_03 /home/myuser /home/myuser/old". You can omit the last parameter to restore to the same directory.

Conclusion

Sbackup is really very useful for new users particularly to allows users to choose either a simple backup scheme that performs incremental backups daily and full backups weekly, or to modify the default scheme with their own settings. Users list directories to backup in the Include tab, and select items to exclude in the Exclude tab. Exclusions can be based on directory,file type (sbackup excludes multimedia files by default), file size,or regular expression.This .


Tuesday, March 6, 2007

How to Remote Access in Ubuntu

Remote Login via XDMCP

What is XDMCP?

GNOME windows can support several different users simultaniously. Unlike vncviewer that just duplicates the current screen on a remote system, XDMCP allows several different users to login and run different GNOME sessions at the same time. So if you have a fast computer runing Ubuntu, several users can use their slow machines to login and run heavy applications only available on the fast machine.

How to turn on the XDMCP feature

To turn on the XDMCP feature on the fast computer, click the menu

System -> Administration -> Login Window

In the Login Window Preferences dialog window, select

Remote Tab -> Style: Same as Local ->  Close the dialog window -> Restart the PC
How to login from another PC running Ubuntu
1. Reboot the slow PC and stop at the login screen
2. Click Options at the lower left corner of the login screen
3. Select "Remote Login via XDMCP"
4. On the dialog window, type in the host name or ip of the fast computer you want to login to

Remote Desktop Sharing/Duplication via VNC

How to configure remote desktop (not secure)
Warning! Remote Desktop will only work if there's a GNOME login session
Leaving computer with an unattended GNOME login session is not secure
Use (System -> Lock Screen) and switch off the monitor when computer is left unattended
  • System -> Preferences -> Remote Desktop
  • Remote Desktop Preferences
Sharing ->
Allow other users to view your desktop (Checked)
Allow other users to control your desktop (Checked)
Security ->
Ask you for confirmation (Un-Checked)
Require the user to enter this password: (Checked)
Password: Specify the password
How to connect into remote Ubuntu desktop
e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read How to Configure Remote Desktop
Remote Ubuntu machine: 192.168.0.1
vncviewer -fullscreen 192.168.0.1:0
  • To quit vncviewer
Press 'F8' -> Quit viewer
How to connect into remote Ubuntu desktop via Windows machine
e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Remote Ubuntu machine: 192.168.0.1
  • If you have a router remember to open the appropiate port. The default one is 5900
This process is called port forwarding port forwarding
  • Download DotNetVNC: Here or RealVNC Here
this is a free DotNet version that require the DotNet framework available from microsoft here
The RealVNC website was created and maintained by the original developers of VNC during their time at AT&T. RealVNC comes in Free, Personal, and Enterprise editions - the latter two costing money.
  • Open the VNC client you have chosen, and insert the connection string formatted like this <:DESKTOP NUMBER>|<::PORT>
In example use: 192.168.1.2:0 or 192.168.1.2::5900 to connect to desktop 0, to connect to desktop 1 use 192.168.1.2:1 or 192.168.1.2::5901 and so on
How to connect into remote Ubuntu desktop via OSX
e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Remote Ubuntu machine: 192.168.0.1
  • If you have a router remember to open the appropiate port the default one is 5900
This process is called port forwarding port forwarding
  • Download ChickenOfTheVNC: Here
  • Open ChickenOfTheVNC, and insert the host (IP address of remote machine), the display number (0 is default and is port 5900) and the password.
In example use: Host: 192.168.0.1, Display 0, Password: password

How to Configure Ubuntu/Kubuntu with WPA using Network-Manager

For Ubuntu:
sudo apt-get install network-manager-gnome

For Kubuntu (will install knetworkmanager):

sudo apt-get install network-manager-kde

Logout/Reboot.

Ubuntu users should now see the NetworkManager Applet in the Gnome notification area. Kubuntu users will probably have to run knetworkmanager before they see NetworkManager in the systray.

If instead, you get a "The NetworkManager applet could not find some required resources. It cannot continue." message, then:

sudo gtk-update-icon-cache -f /usr/share/icons/hicolor

Once Network-Manager is installed, click on the NM icon in the notification area (default is at the top right of Ubuntu/Gnome). Choose your network, then enter your passphrase. Type a password for the keyring, and you're set.

If you don't see your network, click "Create New Wireless Network...", type your essid/networkname, then choose "WPA Personal" for wireless security.

  • Note: If you installed Kubuntu then installed ubuntu-desktop & network-manager-gnome, you may not be able to use network-manager in Gnome, if at all. In this case, you may have to use WPA Supplicant and do some manual editing of conf files to get WPA up and running.
  • Note: When you first log into Gnome/KDE, the keyring application will ask for a password. Future revisions of Network-Manager should resolve this.

How to get ipw3945 and wep/wpa to work

  • Install the daemon using apt (recommended for new users):
sudo apt-get install linux-restricted-modules-generic

reboot your system and you should have wireless internet/network.

After that look at this post.
How to Configure Ubuntu/Kubuntu with WPA using Network-Manager
 

How to get ipw2200 and wpa to work

1) Open a terminal window and type:
Code:
wpa_passphrase your_ssid your_psk
Note: your_ssid is the name of your wireless network (a.k.a. SSID) and your_psk is the password you want to use to protect your network. (Look below for an example).

2) Now copy the psk string you got as output.

3) Type:
Code:
sudo gedit /etc/wpa_supplicant.conf
Then paste this as follow:
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2

network={
ssid="your_ssid"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_psk
}
Note: your_psk is the psk string you got from step 1.

Here is an example:
Code:
luca@laptop1:~$ wpa_passphrase mywlan thisisthepassword
network={
ssid="mywlan"
#psk="thisisthepassword"
psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515
}
The red string is what you have to paste into /etc/wpa_supplicant.conf as your_psk (without quotes obviously). So you'll have something like this:
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2

network={
ssid="mywlan"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515
4) Save the file and close Gedit.

5) Now we have to make wpa_supplicant load when system boots, so go back to the terminal window and type:
Code:
sudo gedit /etc/network/interfaces
6) Add the following lines in the part regarding your wireless card, as in the example below:
Code:
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
Note: "eth0" is your wireless device and "wext" is the driver; this is a kind of generic driver, so it should work with most wireless cards. If it doesn't, please try another driver, such as hostap, ndiswrapper, etc.
Here is an example:
Code:
iface eth0 inet static
address 192.168.1.15
netmask 255.255.255.0
wireless-essid my_essid
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
7) Now run wpa_supplicant:
Code:
sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf
You should be online!



Troubleshooting:

You can run wpa_supplicant with -dd flag for a detailed debug output.

1) If you don't manage to connect to the AccessPoint, try to uncomment line 2 in /etc/wpa_supplicant.conf.
2) If that doesn't help, try change its value to 0 or 1.
3) If you get troubles while authenticating, try removing "RSN" and/or "CCMP" strings from /etc/wpa_supplicant.conf.

source: http://www.ubuntuforums.org/showthread.php?t=263136

Install Ubuntu Games

How to install game Tuxracer

sudo aptitude install planetpenguin-racer planetpenguin-racer-data planetpenguin-racer-extras
  • Applications -> Games -> planetpenguin-racer

How to install game Frozen-Bubble

sudo aptitude install frozen-bubble
  • Applications -> Games -> Frozen-Bubble

How to install game Scorched3D

sudo aptitude install scorched3d
  • Applications -> Games -> Scorched 3D

How to install real-time-strategy game (globulation 2 alpha21)

wget http://globulation2.org/releases/0.8.21/glob2_alpha21_i386.deb
sudo dpkg -i glob2_alpha21_i386.deb

You might also need to install dependencies if dpkg returns a dependency error

sudo aptitude -f install

To play use this command:

glob2

Archivers / Packages/ Compression

How to install 7z Archiver ( .7z)
sudo aptitude install p7zip-full

How to install RAR Archiver (rar)

Note: Program included in Automatix2. If you have already used Automatix2, this program may have been installed

sudo aptitude install rar unrar
  • Applications -> Accessories -> Archive Manager

How to install & use .rpm to .deb Converter (Alien)

sudo aptitude install alien
sudo alien -d package.rpm (-d for Debian package)

How to make Ubuntu/Debian packages (CheckInstall)

sudo aptitude install checkinstall
  • When compiling software from source, replace "make install" with "checkinstall"
./configure
make
checkinstall

A Debian package (.deb) will now be created in the current directory.

  • To install the created package
sudo dpkg -i package_name.deb
  • Consider copying your package to a personal Apt Repository

#Personal Apt Repository

Monday, March 5, 2007

How to use Bluetooth to share files

sudo aptitude install bluez-utils gnome-bluetooth
  • Open Applications -> Accessories -> Bluetooth file sharing
  • You're now able to receive files from other Bluetooth-devices
  • To send a file: find a file to send, right click and choose "Send to", wait until the other device is detected, and click "send".

To see if your Bluetooth-device is supported check this site: http://www.holtmann.org/linux/bluetooth/features.html

How to install Broadband ADSL/PPPoE Client (RP-PPPoE)

wget -c http://www.roaringpenguin.com/files/download/rp-pppoe-3.8.tar.gz
sudo tar zxvf rp-pppoe-3.8.tar.gz -C /opt/
sudo chown -R root:root /opt/rp-pppoe-3.8/
gksudo gedit /usr/share/applications/RP-PPPoE.desktop
  • Insert the following lines into the new file
[Desktop Entry]
Name=RP-PPPoE
Comment=RP-PPPoE
Exec=gksudo /opt/rp-pppoe-3.8/go-gui
Icon=pppoeconf.xpm
Terminal=false
Type=Application
Categories=Application;Network;
  • Save the edited file
  • Applications -> Internet -> RP-PPPoE

How to install Dialup PPP Client (GNOME PPP)

sudo aptitude install gnome-ppp
  • Applications -> Internet -> GNOME PPP

How to install CD Ripper (Goobox)

sudo aptitude install goobox
sudo rm -f /usr/share/applications/goobox.desktop
gksudo gedit /usr/share/applications/goobox.desktop
  • Insert the following lines into the new file
[Desktop Entry]
Name=CD Player & Ripper
Comment=Play and extract CDs
Exec=goobox
Icon=goobox.png
Terminal=false
Type=Application
Categories=Application;AudioVideo;
  • Save the edited file
  • Applications -> Sound & Video -> CD Player & Ripper

How to RIP DVD in Ubuntu (DVD::rip)

Write following lines in the Terminal.

sudo aptitude install dvdrip vcdimager cdrdao subtitleripper
sudo ln -fs /usr/bin/rar /usr/bin/rar-2.80
gksudo gedit /usr/share/applications/dvdrip.desktop

Insert the following lines into the new file
[Desktop Entry] Name=dvd::rip Comment=dvd::rip Exec=dvdrip Icon=/usr/share/perl5/Video/DVDRip/icon.xpm Terminal=false Type=Application Categories=Application;AudioVideo;
Save the edited file Applications -> Sound & Video -> dvd::rip

Friday, March 2, 2007

Play NES and SNES games in Ubuntu

If you like installing applications from command line you could iuse the following command at the terminal to install the zsnes emulator :-

sudo apt-get install zsnes

Now zsnes is a nice emulator that can play SNES games , it has a nice GUI and can run both on Windows and Linux operating system.

However if you dont like zsnes you can try other emlators also one popular one is fceu,To install fceu type the following command at terminal

sudo apt-get install fceu

fceu is for running NES games only.

However if you prefer to install application graphically launch Synaptic Package Manager (System -> Administration -> Synaptic Package Manger) and search for package fceu,zsnes and check them and press install button.


Now to launch fceu or zsnes go to (Applications -> Accessories -> terminal ) and type the following commands to run the emulator.

zsnes to launch the zsnes emulator it has it's own graphical interface and hence it use is self explanatory.
ZSNES in Action

For playing NES game you have to use fceu to launch fceu type the following command at the terminal.

fceu -inputcfg gamepad1 /home/user/Mario.nes (Or any other game nes and path)


Now fceu would ask you which keys you want to configure for what actions type the keys accordingly (you have to press twice to confirm the keys).

After this done next time you want to start fceu you dont have to specify your keys again you can use the following command to run fceu.
fceu ROM.nes (Where ROM.nes is your rom you want to run)

Mario Game running under fceu

Now for roms(nes and snes games ) you can use the google for finding and downloading roms , since i dont quite know about legality of using these roms so i wont recommend any site to you , anyways they are quite easy to find using google.

Source: http://linuxondesktop.blogspot.com/2007/03/playing-classic-games-under-ubuntu.html

Play Classic DOS games in Ubuntu

DOSBOX : -

DOSBOX allows you to run your old dos programs under Linux , DOSBOX provides a full featured dos environment inside your ubuntu box . DOSBOX allows running of DOS programs in Linux and Windows.

To install DOSBOX type the following command in the Console Window (Applications -> Accesories -> Terminal)

sudo apt-get install dosbox

Alternatively you can use the Synaptic package manager located in (System -> Administration -> Synaptic Package Manager) for installing the DOSBOX emulator. Launch the synaptic package manager and click on Search button and type dosbox in the text field mark th checkbox of dosbox and click on install, for installation to start.

After completing installation, create a directory say (/home/user/games) where you would like to store your games,
now after copying your games to the directory launch dosbox by typing dosbox in terminal window.
Opening Screen of dosbox

In DOSBOX type the following command to make your games directory visible inside the dosbox emulator

mount d /home/user/games

Now go to d drive , then go to the directory of the game and launch the executable file of the game to start the game.
Alleycat game running under DOSBox

Some of the popular DOS games can be obtained at the following internet address : -

Bio Menace (This game and all it's three series were released as Freeware and can be downloaded from ) ,Commander Keen , Wolfeinstein 3D , Duke Nukem , Hocus Pocus , Crystal Caves and other can be downloaded at the following address some of the games are shareware and some freeware but trust me even shareware games would give you hours if not days of entertainment : - http://www.3drealms.com/downloads.html

Alley Cat ( This game released in 1984 is one of my all time favorite i have spent a lot of time playing this on my 386 computer ) this can be downloaded from the following : - http://www.dosgamesarchive.com/download/game/91

Dangerous Dave ( Well this game released in 1988 is a very simple game which is quite popular here in India even today in school labs you could find people playing this game !!!!!) :- http://www.abandonia.com/games/Dangerous%20Dave.zip

Mario Brother VGA ( Well this is also a nice game it even has a boss mode to fool your boss that you are working and to top it all it is only few kilobytes in size !!) :- http://www.abandonia.com/games/880/MarioBrothersVGA

Get more old dos games here at : http://www.abandonia.com
http://dosgamesarchive.com

Wikipedia page on list of all dos games : http://en.wikipedia.org/wiki/Category:DOS_games

Wikipedia page on commercial games released as freeware (most of them dos) : http://en.wikipedia.org/wiki/List_of_commercial_games_released_as_freeware

source: http://linuxondesktop.blogspot.com/2007/03/playing-classic-games-under-ubuntu.html

How to enable WPA with Ndiswrapper driver

  • First, make sure the Ndiswrapper driver works by itself without encryption.
  • Create a file called /etc/wpa_supplicant.conf, and paste in the following. Modify the ssid and psk values.
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="YourWiFiSSID"
psk="YourWiFiPassword"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
}
  • Test it. Make sure your router is broadcasting its SSID.
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd
  • If your WPA works. Load it automatically when you reboot.
gksudo gedit /etc/network/interfaces
  • Change your wlan0 section to the following.

If you are using static IP:

auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

or this, if you are using dhcp.

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant


  • Reboot

How to install Windows Wireless Drivers (Ndiswrapper) in Ubuntu Edgy.

  • In order to install ndiswrapper you need a copy the windows drivers for your Wireless ethernet device.
  • This is only meant to be installed if your card isn't supported by Ubuntu, check Ubuntu's list of natively supported wireless cards.
  • Check ndiswrapper's list of supported wireless cards if your card isn't supported natively, please visit Ndiswrapper's official supported cards list
  • Find out if you have acx module loaded. Because acx module interferes with windows driver, we need to remove it if it is found.
lsmod | grep acx
  • Remove the acx module if found. It could also be acx_pci or similar. Please Note: New kernel updates will auto load the acx module again. So repeat the following two commands every time the kernel is updated.
sudo rmmod acx
sudo nano /etc/modprobe.d/blacklist
  • Add a new list at the end of the file like this:
# drivers wireless ACX
blacklist acx
  • Install ndiswrapper and drivers (due to a bug in Edgy, you need to specify ndiswrapper-utils-1.8)
sudo apt-get install ndiswrapper-utils-1.8
sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf
sudo ndiswrapper -l
sudo modprobe ndiswrapper
  • Set ndiswrapper to load on startup
sudo ndiswrapper -m
gksudo gedit /etc/modules
  • Add the following module to the list
ndiswrapper
  • Now you can configure your wireless card with ifconfig and iwconfig.
e.g. Supposing wlan0 is your wireless device.
sudo iwconfig wlan0 essid "AP" key ababababababababab mode Managed
iwconfig
  • You sould now be able to see the MAC address of the access point and signal rate.

Ndiswrapper for Broadcom 43xx wireless chipset

  • The Broadcom 43xx (bcm43xx) wireless chipset is one of the most common chipsets, so special scripts have been written for it.
  • Only follow this if you have a bcm43xx device. To check in the Terminal type:
lspci | grep Broadcom\ Corporation

If it displays a line similar to this,

0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

you have a Broadcom wireless chipset. Please proceed with the instructions.

  • Put the Ubuntu CD that you installed Ubuntu with in the CD drive.
  • Download this to the desktop (the Firefox default, so if you haven't changed it, that's where it went/will go).
  • In a terminal type
cd ~/Desktop (or wherever you downloaded the file)
tar -xf bcm4318*.tar.gz
sudo ./ndiswrapper_setup

Your wireless chipset should now work. Try rebooting if you have problems. Please see this thread if you have problems: http://ubuntuforums.org/showthread.php?t=197102&highlight=install+ndiswrapper

source: Ubuntuforums.org

Thursday, March 1, 2007

How to install Windows Applications in Linux (Wine)

  • First, add repository for Wine:
gksudo gedit /etc/apt/sources.list
  • Add the following lines at the end of this file
# Repository for wine
deb http://wine.budgetdedicated.com/apt edgy main
deb-src http://wine.budgetdedicated.com/apt edgy main
  • Save the edited file
  • Acquire public key
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 58403026387EE263
gpg --export --armor 58403026387EE263 | sudo apt-key add -
  • Update and install Wine package
sudo aptitude update
sudo aptitude install wine

source: http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_install_Windows_Applications_in_Linux_.28Wine.29

how to install Automatix2

Open Terminal and type the following command.

sudo gedit /etc/apt/sources.list
  • Add the following lines at the end of file
## Automatix repository
deb http://www.getautomatix.com/apt edgy main
  • NOTE: Kubuntu/Xubuntu users will need to uncomment (remove the # before the word "deb") all the additional sources as well as add the automatix repository.
  • Now save and close /etc/apt/sources.list and run the following commands from terminal (one by one, hitting enter after each step)
wget http://www.getautomatix.com/apt/key.gpg.asc
gpg --import key.gpg.asc
gpg --export --armor 521A9C7C | sudo apt-key add -

  • Update APT
sudo aptitude update
  • Run the following commands to install Automatix2
sudo aptitude install automatix2

  • Automatix2 can be started from the the Menu
Menu -> System -> Automatix
  • Automatix2 can be run from terminal by typing the folowing
automatix2

Sources: http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_install_Automatix2_on_Ubuntu.2C_Kubuntu.2C_and_Xubuntu

How to Triple Boot Xp, Vista and Ubuntu

irst you will need OSes themselves, and you are probably couple of days too late to download your free RC2 copy of Windows Vista. Secondly you’ll need your XP installation CD and finally latest Ubuntu or other Linux distribution.

I have two hard drives, one SATA for my system installations and a fat IDE for my personal stuff that I back up once in a while and migrate from old to new systems. The first step is optional but I would highly recommend it as your typical format does nothing to master boot record. And of course it is a nice feeling to start from a clean drive, and by using some free software you can almost make it sterile.

The obvious choice is Darik’s Boot and Nuke, but I must warn you, it’ll take a while to complete. A real while. Simple burn the iso and boot from it.

I would also recommend to disconnect drives you don’t want to erase and put them far away from Murphy’s law.

DBaN Boot Screen

Select you drive and choose the quick method by pressing M. As I said before it took me a good 24 hours to complete the quick wipe.

DBaN Wipe

There are tons of free utilities that can do DBaN’s basic functions. One of them is Killdisk.

Killdisk Boot Screen

Killdisk set me back only an hour or so.

Killdisk Erase

Now to the usual part. Pop in Ubuntu and click Start or Install.

Ubuntu Installation Screen

It is important to partition you hard drive before starting the installation. You can use a separate free GParted image or other commercial software like Partition Magic or Acronis Disk Director. Or you can use GParted built in to Ubuntu, but don’t partition drive as part of your installation as it will mess up your mount points.

Ubuntu Partitioning from Setup

Simply open a terminal window and type

sudo gparted

Ubuntu GParted

Create new label and create partitions you want. Before acting on this tutorial I would advise to check your current usage to give yourself a rough idea. I use 20 gigs for XP, 10 for Vista and 10 for Ubuntu + 1 for swap.

Another good thing about partitioning under Ubuntu is access to some simple games and utilities like a calculator to make the process a little bit easier.

GParted FAT32 Partition

As you can’t add more than four primary partitions I created one for XP, one for Vista, one for Shared Fat32 partition (so you could read and write straight away) and an extended partition for root and swap partitions.

GParted Extended Partition for Ubuntu

You can see final setup below.

Ubuntu Final Partition Setup

Then simply click Install shortcut on the desktop to run Ubuntu installation and after couple of steps select manually edit partition table.

Ubuntu Select Manual Partition

Your mount points should be available to you. Go ahead, align them by partition name and rename mount points to something more sensible like xp, vista and share.

Ubuntu Final Mount Points

After installation is complete, reboot and login. Open the terminal and backup your MBR. You can use

sudo fdisk -l

to see a list of available partitions and

df

to see your mount points.

Type

sudo dd if=/dev/hda of=/media/share/ubuntu.bin bs=512 count=1

to backup GRUB. Make sure to check it by running

hexdump -C /media/share/ubuntu.bin

and search for some GRUB’s references. If it is blank (zeros) or has NTFS strings in it, you probably should check the if’s hda/sda parameters. You can read more at O’Reilly.

Ubuntu Grub Backup

Next step is to install Windows XP. Select first partition, quick format if you want and complete you typical install.

Selecting Partition for Windows XP

Another optional but recommended step - rename you drives, it will help you during Vista’s install.

Changing HDD Labels

Now we need to add Ubuntu to boot.ini. Press Win+Break key or go to Control Panel > System and select Advanced and Startup and Recovery Settings. Select your default operating system as Windows XP, uncheck “time to display list of operating systems” and change your recovery time option. Then click Edit. I would recommend to move ubuntu.bin somewhere more appropriate, like your Windows folder. Add the following line to boot.ini you opened before.

C:\Windows\ubuntu.bin=”Ubuntu Edgy Eft [Desktop 6.10]”

Adding Ubuntu to boot.ini

The trick to boot from a single boot screen is to use Windows’ bad behaviour of overwriting MBR without asking to our advantage. Vista will pick up entries from boot.ini and add them to it’s winload. Now put your Vista DVD in, reboot and install it.

Windows Vista Install

Select second partition showed as “Vista” (if you renamed disks).

Selecting Windows Vista Partition

After installation is complete search for “cmd” in Start menu and right click on it to run as administrator as it is the only way you can get access to bcdedit. Bcdedit is Vista’s command line “editor” for the boot loader.

Running cmd As Administrator in Vista

Type

bcdedit

to see your settings and note identifier values.

To rename Vista and XP type

bcdedit -set {ntldr} DESCRIPTION “Windows XP [Professional SP2]”

bcdedit -set {current} DESCRIPTION “Windows Vista [Ultimate RC2]”

And change order

bcdedit /displayorder {current} {ntldr}

This way order will be Vista, XP, Ubuntu so you only need to press up or down once not twice. Yes, there is a reason they renamed Unix with “x” :)

Changing bcdedit Settings

Last step is to change some settings from Vista’s GUI. In the same way as XP open Startup and Recovery, set default OS to XP, change display time to 10 and recovery to 5.

Changing Boot Options in Vista

That’s it. Vista boots fine, XP boots because you deselected display time after XP installation and Ubuntu boots GRUB for 2 seconds (press ESC if you want to see it) and automatically loads Ubuntu because it is not aware of XP and does not show you the choice menu as you installed Ubuntu first.

Windows Vista's winload Boot Manager

I hope you enjoyed building your home or development system.


Entire post by: http://www.hevnikov.com/blog/2006/11/13/triple-boot-xp-vista-ubuntu-with-single-boot-screen/

How To Run Photoshop in Ubuntu

Requirements: Dual-Boot System. you should have Windows installed on other partition and that partition has to be mounted. please check the post how to mount NTFS partition.

In Terminal type the following commands.

  • $ sudo apt-get update
  • $ sudo apt-get install wine and then when it asks to approve type “yes”
  • $ sudo wine
  • $ sudo apt-get install recode and then when it asks to approve type “yes”

  • Copy Adobe folder from “c:\Program Files\” to “/home/YOURNAME/.wine/drive_c/Program Files/”

- Now you need to export the registry keys of the Adone Photoshop CS2;

  • In your Windows box, type “regedit” in the command-line and export the whole “HKEY_LOCAL_MACHINE/Software/Adobe/” to “adobe.reg”.
  • The next step is to copy that file to your Ubuntu box and convert it to the encoding of YOUR system. For example, if your Ubuntu box has as default charset ascii and your Windows box has ucs-2 then “$ recode ucs-2..ascii adobe.reg” would do the trick. After you converted your adobe.reg file, type “$ sudo wine regedit adobe.reg” to import it to wine.
  • That’s it! Type “$ sudo wine –winver winxp “[path to Photoshop]/photoshop.exe” or create a launcher and enjoy Adobe Photoshop CS2 on Ubuntu.
Source: http://blog.publicidadpixelada.com/how-to-adobe-photoshop-cs2-on-ubuntu-10-steps/

How To Mount NTFS partition

First let’s figure out where our NTFS partition is hiding. I’m going to assume that you’ve got an NTFS partition, an EXT3 partition and perhaps a FAT32 partition laying about. Open up a terminal session and type the following:

sudo fdisk -l

You’re looking for the NTFS partition, my output looks like this:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20480008+ 7 HPFS/NTFS
/dev/sda2 2550 7493 39707451+ f W95 Ext’d (LBA)
/dev/sda3 7494 9729 17960670 83 Linux
/dev/sda5 2550 7394 38911288+ b W95 FAT32
/dev/sda6 7395 7493 795186 82 Linux swap / Solaris

It’s /dev/sda1 that I’m interested in. Find out what yours is and write it down somewhere. A good thing to do is to write it backwards on your forehead in indellible marker. This not only allows you to see where it is every time you look in the mirror but I’ll also be able to identify my readers if you venture out into public.

So let’s install the stuff we’ll need to get this working.

sudo apt-get install libfuse2 fuse-utils libntfs8 ntfsprogs

Now let’s add fuse to the list of stuff that our kernel will load:

echo fuse | sudo tee -a /etc/modules

Now let’s add a group which we’ll use to control who can or can’t get access to the NTFS partition.

sudo addgroup ntfs

When this is done, you’ll get some output which will contain your GID (Group ID). It’ll look something like adding group ntfs (1001). Write down that GID, or add it to your backwards forehead list.

Now we’re going to create a mount point for our partition. This is a folder into which this disk will be shoved. Well, metaphorically speaking anyway. We’ll put it in the /media directory so it’ll show up on our desktop. then we’ll edit the fstab file to tell it to mount the NTFS partition on to the folder.

sudo mkdir /media/windows

sudo cp /etc/fstab /etc/fstab.bak

gksudo gedit /etc/fstab

Now that you’ve got the fstab file backed up and open in gedit, let’s add the following line to the bottom of it.

/dev/hda1 /media/windows ntfs-fuse auto,gid=1002,umask=0002 0 0

Here’s where you’ll need a mirror to look at the info you’ve written backwards on your forehead. The first bit ‘/dev/hda1′ is the location of your NTFS partition. If you’re is different, then change it in your fstab entry above. The second bit we’ll need is the GID of your ntfs group. If it’s not 1002 then change that as well.

Now, let’s add your user to the ntfs group. If you’re username is ‘slartibartfast‘ this is how the command would look. (If you’re username is not ’slartibartfast, then type your username in place of slartibartfast, or consider changing it to slartibartfast’).

sudo adduser slartibartfast ntfs

Now let’s do some quick removing and linking to fix a known bug.

sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse

Now reboot your machine and you’ll come back up to the joy of being able to muck with your windows install while not actually booting into windows.

Source: ArsGeek
http://www.arsgeek.com/?p=585
Your Ad Here