» tagged pages
» logout
Ubuntu
Return to Ubuntu

OnlyUbuntu Tutorials

(or Cancel)

(Editing anonymously: to be credited for your changes, login or register a new account)

other page actions:

Tags Applied to this Topic

1 person has tagged this page:

Saturday, July 19, 2008

Howto Install Netgear WG111v3 USB wireless

This is a GUI solution on how to install Netgear USB WG111v3 USB.


STEP 1

Go to "add and remove programs" type on the searchfield " ndiswrapper "

One program should come up! it calls samething like "graphical frontend for ndiswrapper"

Install it!

STEP 2

start whit wine a file called setup.exe

the installations fails! but if you go to:

/home/moises/.wine/drive_c/windows/inf/WG111v3

( Moises is my home directory ) or go to wine and push " Explore c:/ "
There you will find the .inf file you need!

STEP 3

Go to SYSTEM - ADMINISTRATION - and there you will find the program called

" graphical frontend for ndiswrapper "

Push the buttom " Install new driver "! Go to the .inf file located on /home/moises/.wine/drive_c/windows/inf/WG111v3

And install it!

Download drivers from here

Tuesday, July 15, 2008

Howto setup Handbrake including GUI from svn in Ubuntu

First get the medibuntu version of ffmpeg (makes more codecs available),but first remove any old ffmpeg,open a terminal and enter.


sudo apt-get remove ffmpeg

then enter.

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

then enter.

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

then enter.

sudo apt-get install ffmpeg

Next Install the dependencies for Handbrake and the gtk gui.

sudo apt-get update && sudo apt-get install automake build-essential jam libdvdcss2-dev libtool subversion yasm zlib1g-dev libbz2-dev dvdbackup xmlto texinfo g77 gfortran libgtk2.0-dev nasm doxygen libsdl1.2-dev gfortran-multilib gcc-multilib g++-multilib libesd0-dev libgtk1.2-dev libfftw3-dev electric-fence

Next install and build Handbrake.svn and gtk gui (enter each line seperately,it will take some time to build)...

svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake

cd HandBrake

./configure

make

sudo make install

cd Handbrake/gtk

./autogen.sh

make

sudo make install

HandBrake should be available from the Applications menu under Sound & Video

Sunday, July 13, 2008

Howto setup custom gproftpd ( GUI for Proftpd Server) in Ubuntu

If you have installed lampp, then you probably know that the proftpd configuration is very confusing for people that haven't dealt with proftpd.

Gproftpd is a user interface to the config file, making it easy to set it up. However, installing it from synaptic makes u get a new proftpd install.


step 1: have this installed: (you can remove it after, its just so that the compiler thinks that you have gtk2.0 installed. if anyone finds a work around, plz post)

sudo apt-get install libgtk2.0-dev

step 2: get the gproftpd package and unpack it:

wget http://mange.dynalias.org/linux/gadmin-proftpd/gadmin-proftpd-0.2.8.tar.gz && tar -zxvf gadmin-proftpd-0.2.8.tar.gz

you can remove the tar.gz if you like

rm gadmin-proftpd-0.2.8.tar.gz

step 3: cd there and open autoinstall:

cd gadmin-proftpd-0.2.8 && gedit ./Autoinstall

step 4: we have to change the directories for it use the lampp proftp.conf:

original:

### Default paths and settings ###
# export PROFTPD_CONF="/etc/proftpd.conf"
# export SECURE_LOG="/var/log/secure"
# export XFER_LOG="/var/log/xferlog"
# export PROC_PATH="/proc"
# export PROFTPD_BINARY="proftpd"
# export FTPWHO_BINARY="ftpwho"
# export SERVER_USER="nobody"
# export SERVER_GROUP="nobody"
# export WELCOME_MESSAGE="welcome.msg"
# export HTML_STATISTICS="/var/www/html/ftp.htm"
# export MIN_PASS_LEN=6

### Debian commands for starting the server at boot ###
# export SYSINIT_START_CMD="update-rc.d -f proftpd defaults"
# export SYSINIT_STOP_CMD="update-rc.d -f proftpd remove"

### RH/Fedora commands for starting the server at boot ###
### This is the defaults for the rpm specfile ###
export SYSINIT_START_CMD="chkconfig proftpd on"
export SYSINIT_STOP_CMD="chkconfig proftpd off"

./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --sbindir=/usr/sbin &&
make &&
make install

(assuming you did a normal lampp install) new:

### Default paths and settings ###
export PROFTPD_CONF="/opt/lampp/etc/proftpd.conf"
# export SECURE_LOG="/var/log/secure"
# export XFER_LOG="/var/log/xferlog"
# export PROC_PATH="/proc"
export PROFTPD_BINARY="/opt/lampp/sbin/proftpd"
export FTPWHO_BINARY="/opt/lampp/bin/ftpwho"
# export SERVER_USER="nobody"
# export SERVER_GROUP="nobody"
# export WELCOME_MESSAGE="welcome.msg"
# export HTML_STATISTICS="/var/www/html/ftp.htm"
# export MIN_PASS_LEN=6

#############################################
############# feel free to change any of the
############# above to your liking as long as
############# you know what you're doing
#############################################

### Debian commands for starting the server at boot ###
# export SYSINIT_START_CMD="update-rc.d -f proftpd defaults"
# export SYSINIT_STOP_CMD="update-rc.d -f proftpd remove"

### RH/Fedora commands for starting the server at boot ###
### This is the defaults for the rpm specfile ###
export SYSINIT_START_CMD="chkconfig proftpd on"
export SYSINIT_STOP_CMD="chkconfig proftpd off"

./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --sbindir=/usr/sbin &&
make &&
make install

Save it!

step 5: last step

sudo ./Autoinstall

NOTE:
the binary isn't

gproftpd

its

gadmin-proftpd

and it has to be run as root

recommended steps:

This installs a binary into Applications-Internet-GADMIN-PROFTPD.
but it needs to run as root. So, right click on applications, click edit menus, click internet, right click on gadmin-proftpd, click properties, and in the command box it'll say:

gadmin-proftpd

but we want it to be:

gksudo gadmin-proftpd

Save all that.

and that should be it!

Sunday, July 13, 2008

LXDE- lightweight and fast UBUNTU environment

One brilliant thing about Linux is that it can be tweaked anyway to suit any kind of a system. If your system is pretty old and if ubuntu is too slow in it, then here you go. LXDE(Lightweight X11 Desktop Environment) is a light weight environment that's fast even on antique systems. It is surely not designed to be powerful or bloated but it is light enough to keep the system usage low.


Not all components are integrated but most of them are independent and each of them can be used with a few dependencies.


Here are some of the important LXDE features :


It's lightweight and runs with reasonably low memory usage.
Fast and runs on old machines producced in the '90s.
Gook looking gtk+2 internationalized user interface.
Desktop independent(every component can be used without LXDE)
Standard compliant, follows the specs on freedesktop.org


Installing LXDE in UBUNTU:
This first step is to edit the "/etc/apt/sources.list" file. Add the following lines to the file.(Please make a back up before you do so)

For hardy heron users:
"deb http://ppa.launchpad.net/lxde/ubuntu hardy main
deb-src http://ppa.launchpad.net/lxde/ubuntu hardy main"

For gutsy gibbon users:
"deb http://ppa.launchpad.net/lxde/ubuntu gutsy main
deb-src http://ppa.launchpad.net/lxde/ubuntu gutsy main"
Save and exit the file.

Now the source list has to be updated. Open a terminal and type the following command:
sudo apt-get update
Use the following command to install the LXDE environment:
sudo apt-get install lxde


This will install all the required components for LXDE. Now you need to logout from you system. Then go to Options->Select session.

Select the LXDE option and click on Change Session.

Wednesday, July 09, 2008

Howto Schedule Bittorrents to Automatically Download in Ubuntu

Ever wondered if you could schedule your torrent downloads to occur in those times when you are not using you computer, when you know that there will be more people online sharing the file your downloading, or perhaps during the off-peak times of your Internet plan Well this tutorial is for you.


1. We need to make sure that the relevant software is installed on our system. To do this we start up Synaptic Package Manager

System → Administration → Synaptic Package Manager

and search for 'bittorrent'. Select 'bittorrent' from the options and click 'Apply' to install it with all of its dependencies. If you've already got bittorrent installed then it will already be selected in the list and you won't need to perform this step.

2. Next we need to create the directory that we will download our torrents into. You can use any directory that you have permission to use for this this but a sub-directory in your home directory will often make things easier. For this tutorial I will be using a sub-directory in the user's home directory called 'torrents'. To create this directory simply navigate to your home directory

Places → Home Folder

right click on some empty space and select 'Create Folder'. Name this folder 'torrents'.

3. To automate the task of downloading torrents, and stopping the downloads at an appropriate time, we are going to create some very simple bash scripts (For more on bash scripts see here). We will use the familiar graphical text editor gedit for this task.

In your home folder right click some empty space and select

'Create Document' → 'Empty File'

Name this file 'bittorrentstart'. Perform this task again to create another file and call this one 'bittorrentstop'. You can place these files anywhere you like, perhaps in a directory called 'scripts', but this tutorial will assume they are in your Home directory.
Double click the file 'bittorrentstart' to open it and paste in the following information


#!/bin/sh
# Start Downloading Torrent Files!
cd
nohup btlaunchmany /home/Your_User_Name/torrents/ > torrent.log &
tail -f torrent.log

Make sure you change the 'Your_User_Name' to your user-name. Save this file, open 'bittorrentstop' and paste in the following information

#!/bin/bash
# Stop Downloading ALL Torrent Files!
killall btlaunchmany


4. The second part of automating the downloading of torrents is to tell our computer when to execute the start script and execute the stop script. To do this we use a tool called cron . To make the editing of cron entries simple we are going to create a text file that we will edit in gedit (like the bash scripts above) and then append it to our cron entries.

While in your Home directory right click on some empty space and select

'Create Document' → 'Empty File'

Name this file 'cron.txt'. Double click this file to open it and enter in the following information


# Start BitTorrent Download Script
05 02 * * * sh /home/Your_User_Name/bash_scripts/bittorrentstart.sh
# Stop ALL BitTorrent Downloads Script
55 11 * * * sh /home/Your_User_Name/bash_scripts/bittorrentstop.sh

Be sure to enter your user-name in the required fields. This setup will start the download start script at 2:05am and start the download stop script at 11:55am. These values will likely not suit you so you need to alter them. To understand the format of cron entries picture five asterisks at the start followed by your command. Something like the following

* * * * * sh /home/Your_User_Name/bash_scripts/bittorrentstart.sh

The first asterisk represents minutes, the second hours, the third days of the month, the fourth is the month, and the fifth the day of the week. The allowed syntax is

minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or the month names)
day of week 0-7 (0 or 7 is Sun, or use the weekday names)

Save this file and start up your terminal emulator

Applications → Accessories → Terminal

Enter in the following command

crontab cron.txt

To verify that this was entered into your cron entries properly enter in the following command

crontab -l

5. Now that we've installed the relevant applications and told the computer to execute the appropriate tasks at the appropriate times all we need to do is save our *.torrent files into the bittorrent directory we created earlier and wait. At the appropriate times they will be downloaded into their own sub-directory without you even being aware.

6. In the bittorrentstart script we created earlier there is a command to create a log file. This file records the activity of the torrent downloads. This file, called 'torrent.log', will be found in your Home directory. You can simply open this file to check on the status of your downloads. A sample line from this log file is

/home/Your_User_Name/torrents/torrent_name: Spd: 34.0 K/s:18.2 K/s Tot: 171.2 M:61.1 M [18:10:07 76%]
All: Spd: 34.0 K/s:18.2 K/s Tot: 171.2 M:61.1 M

What all of these entries mean is beyond the scope of this tutorial but you can easily recognise your connection speed and the percentage finished of your torrent downloads.

Monday, July 07, 2008

Printing CD Labels with GIMP and Canon Pixma iP3000

This tutorial will explain how to Print CD Labels with GIMP and Canon Pixma iP3000

Preparing your system


If you don't have it, install GIMP trough apt, aptitude, synaptic... whatever you like.

CREATE A PRINTER CLASS

On this part we will create a printer class that will save us time on configuring the printer each time we need to print a CD.

#1 . Open System Configuration and click on "Printers" then "Add Printer".
On the wizard select:

1) Printer Class -> NEXT

2) If you're using TurboPrint (recommended), select tp0 (or the number of your Pixma printer), otherwise select iPxxxx (where xxxx is the model of your printer) and press the arrow (->) on the middle to add the printer to the class. -> NEXT

3) Name now your printer CD_Label_Printer leave location and description blanked. -> NEXT -> FINISH

4) Now you must have another printer on the list named "CD_Label_Printer", click on it to select the printer than the tab "Instances" and with (default) select on the list below, press Configure.

5) Select on the first tab:

Page Size: CD Printable
Paper kind: CD Printable
Paper Origin: CD Tray

leave the rest as is and, if you're using TurboPrint, select the last tab "Controller Configuration", otherwise is done.

If you are using TurboPrint set the Print Quality to 1200 dpi or over (default CUPS driver just has 300 or 600 dpi).

USING GIMP WITH OUR PRINTER

1) Start GIMP and create an image of 800 x 800 pixels with some color background. If need use the bucket and fill the background with some weird color.

2) Create a new layer with transparent background, name it "mask" for an instance.

3) With the new layer selected, choose the circle selection tool and draw and adjust a circle to fill the canvas, then select Selection -> Invert Selection

4) Select the forecolor white and the bucket fill tool and fill the selection with it.

You must now have a "your background" color circle on the middle.
*I added mine as attachment to this post

5) Open your CD label image on GIMP and copy it to clipboard.

6) With background layer selected paste the CD label image.

7) The image must now be a new floating selection, with it selected click on "New layer". Now the image must be rasterized between the background and the mask.

Adjust your image, add text, etc. When you're done press "Print" (CTRL+P)

9) Select your "CD_Label_Printer" and go then the tab "Image Settings"

10) Set the following values:

Check the box "Ignore page margins"

Width: 120.00 mm
Height: 120.00 mm

Position: Center -> none

Top: 85.00
Left: 5.00

Put your CD on the tray and Print it.

Monday, July 07, 2008

Howto install latest ayttm for yahoo messanger in Ubuntu

Ayttm is an instant messenger program, supporting various protocols such as MSN, Yahoo, AIM, Jabber, and more. It is the heir of the Everybuddy project, and aims to continue improving the program and addressing its shortcomings.


Install alien using the following command

sudo apt-get install alien

Now you need to download latest ayttm rpm from here and convert it to a deb:

sudo alien ayttm-0.5.0-45.i386.rpm

and install using the following command

sudo dpkg -i ayttm_0.5.0-46_i386.deb

starting ayttm will probably generate a message about not finding a library libjasper-1.701.so.1 which is used for yahoo webcam.

To get rid of the jasper lib warning, install it:

sudo apt-get install libjasper1

and make a link to simulate the correct version:

sudo ln -s libjasper.so.1 /usr/lib/libjasper-1.701.so.1

That's it, ayttm works again.

Saturday, July 05, 2008

How To Install torrentflux-b4rt on Ubuntu 8.04 (Hardy Heron)

Torrentflux-b4rt is a web based transfer control client.Torrentflux-b4rt allows you to control your internet downloads / transfers from anywhere using a highly configurable web based front end.


Torrentflux-b4rt is very easy to install on a web server and includes a simple setup script which can be accessed from a web browser. Just upload the files to your web server, run the setup script and your torrentflux-b4rt installation is ready to go.

First you need to make sure you have install Ubuntu 8.04 LAMP server setup from here and now follow this procedure.

Now you need to go /var/www folder using the following command

cd /var/www

If your behind a proxy and havn't already set up your export...

export http_proxy = [enter your proxy here]:[port]/

wget http://gunblade.fakap.net/doc/torrentflux-b4rt_1.0-beta2.tar.bz2

So far we've gone and got the tar containing torrentflux-b4rt and stuck it in our default web root /var/www.

tar xjvf torrentflux-b4rt_1.0-beta2.tar.bz2

This unzips our archive.

personally I now rename the new folder from torrentflux-b4rt_1.0-beta2 to something a little nicer like torrentflux

mv torrentflux-b4rt_1.0-beta2 torrentflux

but thats optional.

now we need to install quite a few libraries for everything to work nicely.

Now you need to install the following packages

sudo apt-get install php5-cli php5-gd libxml-dom-perl libxml-simple-perl libthreads-shared-perl libdigest-sha1-perl libhtml-parser-perl zip unzip unrar transmission-cli phpmyadmin

let that churn away for a bit then run setup.php from a web browser of your choice from the torrentflux/html folder.

When it gets the part where it asks what user name and password to use for the database, copy the username provided (or enter a new one) open a new tab and go to the phpmyadmin page (http://[your box ip]/phpmyadmin), log in using your root username and pwd and click on privileges. add a new user, give it sufficient privileges and click save.

I just gave it full access to everything. This isn't required and you can just keep flicking between the two tabs trying to connect until you've found the required permissions and it works.

when the setup is finished it'll give you a log in screen. the user and password you enter here is going to be your superadmin account! so don't forget it!


Wednesday, July 02, 2008

How to install Ms OFFICE 2003 in Ubuntu

Install WINE 1.0 or greater for this you need to download latest wine from here or if you are using Hardy you can install it from ubuntu repos using the following comamnd.


sudo aptitude install wine

After wine has been installed -

Put your MS office 2003 cd in your drive and in terminal type following:

cd /media/cdrom0

wine autorun.exe

And follow instructions as if you were installing it on windows.

Now on your desktop right click -->Create launcher for each below

Create launchers for each application:

in Command field type this

For excel

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"

For Word

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"

For powerpoint

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE"

For Access

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"

You are almost done.

Now if you are having problem running your macro then you need to install Dcom98.

Dcom98 contains three dlls from Windows 98: ole32, oleaut32, and rpcrt4. Use winetricks to install it:

In terminal type:

wget http://www.kegel.com/wine/winetricks

sh winetricks dcom98

The winetricks script will set to override globally, and if you have any other programs installed in that wineprefix it may affect them. If that happens, you can fix it through winecfg.

That's it Now you have running MS OFFICE 2003 on your ubuntu.

Saturday, June 28, 2008

Howto Setup a DLINK WUA-2340 USB Wireless Adapter in Ubuntu Hardy

So you want to have a working wireless setup in Hardy and you happen to have a D-Link WUA-2340 Wireless USB adapter.



We will be using ndiswrapper to install the driver for the adapter, so we should ensure all components of it are installed:

sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9

Now would be a good time to start to download the driver, grab it from here

Now unzip the file:

cd directory where you downloaded the zip

unzip WUA2340_driver_140.zip

Now we need to setup ndiswrapper to use the driver we just downloaded.

Firstly, we need to get ndiswrapper itself setup properly.

sudo depmod -a

sudo modprobe ndiswrapper

sudo ndiswrapper -m

The preceding incantation will load the ndiswrapper module and ensure that it loads automatically at startup. To ensure the module loaded correctly now is a good time to check it:

sudo lsmod | grep ndiswrapper

You should see a couple of lines with 'ndiswrapper' in them, if you don't then the module did not load correctly. It's beyond the scope of this howto to troubleshoot that issue unfortunately.

Now that ndiswrapper is installed and loaded up we need to install the driver.

cd 20071112-WUA-2340-S0026

cd Drivers

cd WinXP_2K

sudo ndiswrapper -i netA5AGU.inf

You may get some output stating that it is changing the registers from 256 to 64, this is not an issue and you can safely ignore it.

Now make sure it installed properly:

sudo ndiswrapper -l

You should see that the driver is installed and the device is present.

Now in a perfect world, you would be done now. However network-manager in hardy will not display any wireless networks for you to connect to. Rest assured your wireless adapter is installed and working, the problem is with network-manager.

There are two ways you can go from here. The first involves setting the wireless network you want to connect to manually (this might be good if you only use your wireless connection at home). The other choice is to replace network-manager with WICD which does work properly with this setup.

The Network Administration Method

* Open System->Administration->Network
* You should see your wireless connection in the list, click the Unlock button to make changes.
* Select your wireless connection and hit the properties button.
* Deselect 'Roaming'
* Select your wireless network from the list and enter in your WPA/WEP information for the card.
* Click ok, and now you have a working wireless connection. Congrats!


Using WICD

For this method we will install WICD which is an alternative to network-manager that has the benefit of, you know, working with this adapter.

Before you start you should know:

Installing WICD will remove network-manager and ubuntu-desktop from your system. This is not an issue for day to day use but ubuntu-desktop MUST be installed for distribution upgrades to work properly (Ie, Hardy->Ibex). Before you dist-upgrade to Ibex, reinstall the ubuntu-desktop package (this will uninstall WICD).

Now that the disclaimer is out of the way, lets get going.

We need to add the WICD repository to our sources.list.

gksu gedit /etc/apt/sources.list

Append the following to the file then Save and close it:

deb http://apt.wicd.net hardy extras

Now update your packages and install WICD:

sudo apt-get update

sudo apt-get install wicd

You will be prompted if you want to install this package from an unverified repository. If you wish the installation to proceed, type Yes.

Now that WICD is installed type Alt-F2 and then /opt/wicd/tray.py to launch the tray applet. Double-clicking the applet will display a list of all wireless networks in range. Use the dropdown arrow next to your network and enter your encryption key for your network, click connect automatically at start, then click connect. Now you should be connected to your wireless network!

To make the applet load automatically at startup do the following:

* System->Preferences->Sessions
* Click Add
* Enter WICD for the name
* Enter /opt/wicd/tray.py for the command
* Enter WICD Tray Applet for the description.
* Click OK
* Click Close

Saturday, June 28, 2008

Howto Setup Lexmark Z611 printer in Ubuntu Hardy Heron

If you want to install Lexmark Z611 printer in Ubuntu Hardy Heron follow these steps

Step 1: Install Supporting Packages

sudo apt-get install alien libstdc++5

Yes, you want to install that specific version of libstdc, even if you have a newer version.

Step 2: Activate the USB Filesystem

It was necessary to add the following line to /etc/fstab in order to get this working.

usbfs /proc/bus/usb usbfs devgid=14 0 0

Then you'll want to mount the USB Filesystem

sudo mount usbfs

Step 3: Download Driver from Lexmark

You will want to grab the Red Hat Linux driver for the Z611, which should be named CJLZ600LE-CUPS-1.0-1.TAR.gz. I would recommend creating a folder somewhere and download this file into that folder.

Step 4: Extract and Install the Driver

Execute the following commands exactly as listed, no modifications or tweaks should be necessary for the average user. (You don't need to execute the comment lines however)

## Extracting the driver
tar -xvzf CJLZ600LE-CUPS-1.0-1.TAR.gz

## The shell script doesn't work out of the box
tail -n +143 z600cups-1.0-1.gz.sh > install.tar.gz

## Extracting the contents from the above command
tar -xvzf install.tar.gz

## Convert RPM to TGZ (alien may complain about --scripts not being used, you can ignore that warning)
sudo alien -t z600cups-1.0-1.i386.rpm

## Convert RPM to TGZ (alien may complain about --scripts not being used, you can ignore that warning)
sudo alien -t z600llpddk-2.0-1.i386.rpm

## Extracting the contents of the TGZ into the appropriate locations
sudo tar xvzf z600llpddk-2.0.tgz -C /

## Extracting the contents of the TGZ into the appropriate locations
sudo tar xvzf z600cups-1.0.tgz -C /

## Tell Ubuntu to refresh to see the new libraries
sudo ldconfig

## Move to location of PPDs
cd /usr/share/cups/model

## gunzip the PPD
sudo gunzip Lexmark-Z600-lxz600cj-cups.ppd.gz

## The driver installation is now complete, restart cupsys
sudo /etc/init.d/cupsys restart

Step 5: Activate Printer and Driver

Execute the following command

/usr/lib/cups/backend/z600

If all is well you should see something similar to the following:

user@hostname:/usr/share/cups/model$ /usr/lib/cups/backend/z600
direct z600:/dev/usb/lp0 "Lexmark Lexmark Z600 Series" "Lexmark Printer"

If that doesn't work, check to see if usbfs is listed in 'cat /proc/mounts'.

Step 6: Setup Printer

If you are using GNOME:

1. Click on System -> Administration -> Printing
2. Click 'New Printer'
3. Select 'Lexmark Printer' from the list, which should have something like 'z600:/dev/usb/lp0' for Device URI. Click Forward.
4. Select 'Lexmark' from the manufacturer list and click Forward.
5. Click on 'Z600' in the model list. Driver should show as 'Lexmark Z600 v1.0-1'
6. Setup your preferred Printer Name, Description and Location and click Apply

At this point you should have a working printer

Thursday, June 26, 2008

Automatically unlock LUKS encrypted drives with a keyfile

Step 1: Create a random keyfile

sudo dd if=/dev/urandom of=/root/keyfile bs=1024 count=4

This will create a file with random content with the size of 4096 bits (better than a 20/30 character password....).


Step 2: Make the keyfile read-only to root

sudo chmod 0400 /root/keyfile

That will make the keyfile readable only by root. If someone get access to this keyfile, then you have a bigger problem on your computer anyway.

Alternatively chown your desired keyfile to root:root and move it into the /root folder.

Step 3: Add the keyfile to LUKS

LUKS/dm_crypt enabled devices may hold up to 10 different keyfiles/passwords. So, next to having the already setup password we're going to add this keyfile as additional authorization method.

sudo cryptsetup luksAddKey /dev/sdX /root/keyfile

sdX is of course your LUKS device.

First you'll be prompted to enter an (existing) password to unlock the drive. If everything works well, you should get an output like this:

Enter any LUKS passphrase:
key slot 0 unlocked.
Command successful.

Step 4: Create a mapper

LUKS devices need to create a mapper that can then be referenced in the fstab. Open /etc/crypttab

sudo nano /etc/crypttab

and add then a line like this

sdX_crypt /dev/sdX /root/keyfile luks

or you can use the UUID of the device

sdX_crypt /dev/disk/by-uuid/247ad289-dbe5-4419-9965-e3cd30f0b080 /root/keyfile luks

sdX_crypt is the name of the mapper that is being created. You can use here any name e.g. "music" or "movies" or "sfdsfawe" ....

Save and close the file by issuing ctrl-x, enter, enter. Ctrl-x closes nano but first it asks to save the file [yes = enter] and what the name shall be [same name = enter].

What we have done there actually is telling that /root/keyfile shall be used instead of password entry to unlock the drive.

Step 5: Mount the device in fstab

Now, we have an unlocked device (well, not yet but when the system is being booted up) and we just need to mount it now. Open /etc/fstab

sudo nano /etc/fstab

and add a new entry like

/dev/mapper/sdX_crypt /media/sdX ext3 defaults 0 2

Make sure you have the correct mapper name that you added in step 4. Also make sure that the mount point/folder exists. After having added it, save again the file and close it (ctrl-x, enter, enter).

Step 6: Reboot or remount

That's it. Now you can reboot and the additional devices should be auto-unlocked and mounted. You can also test it by remounting all devices

sudo mount -a

Friday, June 20, 2008

Fix for Traffic Shaping in Shorewall firewall on Ubuntu Hardy

Summary: Traffic Shaping in Shorewall 4.0.6 in Hardy breaks on compile and wondershaper will fail. To fix you need to replace iproute.


ERROR:

Setting up Traffic Control...
What is "flowid"?
Illegal "police"
ERROR: Command "tc filter add dev eth0 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 500kbps burst 10k drop flowid :1" Failed

FIX:

Enter root:

sudo -i

Install tools:

apt-get install build-essential fakeroot devscripts

Make a working directory:

mkdir /tmp/iproutefix && cd /tmp/iproutefix

Download DebDiff:

wget http://launchpadlibrarian.net/15355596/iproute_20071016-2ubuntu2.debdiff

Get the package source tree:

apt-get source iproute

Install libraries needed to build the source package:

apt-get build-dep -y iproute

Apply the debdiff changes:

cd iproute-* && patch -p1
Build the new source package:

debuild -uc -us

Install the resulting binary package:

dpkg -i ../iproute*.deb

Friday, June 20, 2008

Howto check which Software Package is using more Disk Usage

If you're running out of disk space and you want to quickly see what packages are using the most space on your hard drive, use the following command


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}'

That will sort the packages by size, putting the largest ones on the bottom. If you only want to see the top few, you can type

tail -n 10

at the end, because in all likeliness you have a *lot* of packages installed

Monday, June 16, 2008

Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

When running Ubuntu from a live cd or live usb, and trying to install java, the following errors appear:

java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory


OR

Setting up sun-java6-bin (6-06-0ubuntu1) ...
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

Getting and Preparing the files

Adding the Multiverse and Universe Repositories

Go to 'System', 'Administration', 'Software Sources'.

On the 'Ubuntu Software' tab tick the multiverse and universe boxes.

Click 'Close'. It will ask you to reload/refresh; DO IT!

Getting and Installing Java

Online Install

Do this in a terminal for JRE (basically if you're not a java developer):

* sudo apt-get install sun-java6-jre sun-java6-plugin

Do this in a terminal for JDK (basically if you ARE a java developer):

* sudo apt-get install sun-java6-jdk sun-java6-plugin

Say yes to whatever asks. If you are on a live CD or USB (even if it is Feisty 7.04, Gutsy 7.10, or Hardy 8.04 - I tried them all) you will probably get something like this:

Setting up sun-java6-bin (6-00-2ubuntu2) ...
/usr/lib/jvm/java-6-sun-1.6.0.00/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
dpkg: error processing sun-java6-bin (--configure):
subprocess post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of sun-java6-plugin:
sun-java6-plugin depends on sun-java6-bin (= 6-00-2ubuntu2); however:
Package sun-java6-bin is not configured yet.
dpkg: error processing sun-java6-plugin (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sun-java6-jre:
sun-java6-jre depends on sun-java6-bin (= 6-00-2ubuntu2) | ia32-sun-java6-bin (= 6-00-2ubuntu2); however:
Package sun-java6-bin is not configured yet.
Package ia32-sun-java6-bin is not installed.
dpkg: error processing sun-java6-jre (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
sun-java6-bin
sun-java6-plugin
sun-java6-jre
E: Sub-process /usr/bin/dpkg returned an error code (1)
Fixing that Error
Go into a terminal and do the following:
(Copy and paste using right-click so you don't get any of them wrong)

1.sudo su

2. LD_LIBRARY_PATH=CHANGEME dpkg --configure -a

-----The CHANGEME part should be changed to the location of libjli.so
-----Open your File System, go Ctrl+F, search for 'libjli'
-----Mine was in '/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli'
----------so I used LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli dpkg --configure -a

3.ln -s / /cow

4. Run whichever of these you used before again:

sudo apt-get install sun-java6-jre sun-java6-plugin
sudo apt-get install sun-java6-jdk sun-java6-plugin

-----Say yes to anything it asks.
-----It should work perfectly this time with no errors.


Verification of Success

In a terminal type:

java -version

Something like this should appear:

java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
In firefox, where you would type a website type:
Code:

about:plugins

You should see something like this (you might have to scroll to find it):
Quote:
Java(TM) Plug-in 1.6.0_06-b02

File name: libjavaplugin_oji.so
Java(TM) Plug-in 1.6.0_06
With a huge table underneath it.

Go to this website: http://java.com/en/download/help/testvm.xml

An applet will run near the bottom if you java is working correctly.

Sunday, June 15, 2008

Howto Improve NVidia Laptop Graphics Performance in Ubuntu

NVidia laptop cards come with a feature called PowerMizer that dynamically underclocks the GPU when it's not being used much. This is great for battery power but horrible for performance when using Desktop Effects (compiz). Unfortunately, NVidia does not provide a way to configure PowerMizer on Linux however, it's not difficult to create a script that will give you maximum speed while on AC power and maximum power savings while on battery.


This HOWTO is aimed primarily at users of NVidia 8 and 9 series laptop graphics cards (though, it may be useful for 7 series users as well). This HOWTO assumes you are running compiz and have already properly configured the NVidia proprietary drivers. If you are not using compiz, this guide will not be useful for you.

Implementation

The first thing we will need is a utility called nvidia-settings. If you've installed the NVidia drivers directly from the NVidia website or using envyng, you can skip this step

sudo apt-get install nvidia-settings

The nvidia-settings has a unique property that, with essentially no CPU/GPU activity, when you ask the card to print all of its information, it causes the card to go to maximum power. The nvidia card only drops a power level every 30 seconds so, we are going to take advantage these two facts to keep the card at maximum power if we are on AC power.

If you have no custom scripts, follow these instructions first

mkdir -p ~/bin

Then, open up gedit and paste the following script


#!/bin/bash

while true; do
if on_ac_power; then
nice /usr/bin/nvidia-settings -q all > /dev/null
fi
sleep 25;
done

Save the script as ~/bin/nvidia-power.sh. Then, start a terminal and type the following:


chmod +x ~/bin/nvidia-power.sh

~/bin/nvidia-power.sh &

disown

exit

If you are on AC power, the card should now be locked at its maximum power but, if you are on battery power, you should see no difference at all (until you next plug your laptop in).

Next, we will need to add this script to run when you login. On gnome, go to System->Preferences->Sessions, click Add. Add a descriptive name for the startup program (maybe, "NVidia Power") and for Command use, "/home/your_username/bin/nvidia-power.sh" (replace your_username with your username). Now the command should run whenever you login.

Testing

Testing is fairly straightforward. Start a terminal and type:

nvidia-settings

Scroll down to the bottom of the window this command brings up and look on the left side for the PowerMizer option. If your laptop is plugged in, you should see that your graphics card is running at full power. Watch it for a minute (the time it takes for the card to normally drop to lowest power) and make sure it stays at the highest power level. Now, unplug your laptop and wait for another minute. After less than a minute, your card should drop down to minimum power (as long as you keep it idle). Now, plug the cable back in and, in less than 30 seconds, the card should come back to full power and stay there.

The one caveat of this approach is that it can take up to 25 seconds for the card to come back up to full power. There are more complex ways to make the card instantly go to full power when plugged in but, on average, it will be at full power within 12 seconds so, it's probably more hassle than it's worth to use more complex methods.

Source from here

Sunday, June 15, 2008

Howto Configure Evolution to Work with Yahoo! Mail

Before we start you have to pay for a PLUS mail account in order to pop3 it with Evolution or any other e-mail tool.


Procedure to follow

1. Open Evolution and click EDIT -> PREFERENCES from the menu.

2. On the left, ensure MAIL ACCOUNTS is high-lighted. Click ADD.

3. Click FORWARD.

4. Enter your personal information here. You don't have to enter your full name if you don't want your full name to appear in outgoing mail. Click Forward when finished.

5. Select POP for Server Type.

Now add the following for RECEIVING EMAIL (heading at top of the window)

SERVER: plus.pop.mail.yahoo.com:995 (Notice port number at the end)

Username: your Yahoo! username WITHOUT @yahoo.com

Use Secure Connection: SSL Encryption

Authentication Type: PASSWORD

Remember Password: Checked (optional)


6. Click FORWARD button.

7. Set the next options to your liking. I place a check mark in the first box and have my yahoo! e-mail checked every 1 minute. That's the only setting chance I make on this window.

8. Click FORWARD.

Now add the following for SENDING EMAIL (heading at top of the window)

Server Type: SMTP

SERVER: plus.smtp.mail.yahoo.com:465 (Notice port number at the end)

Server requires authentication: Check this box

Use Secure Connection: SSL Encryption

Authentication: Plain

Username: your username WITHOUT the @yahoo.com


9. Click FORWARD.

10. Enter a name for this setup. I use: Yahoo!


Click apply and your done. If you've already been trying to get this to work and have a yahoo mail account created, don't click ADD (step 2). Instead click on it and select EDIT. Then enter the above information in the SENDING and RECEIVING tabs.

Sunday, June 15, 2008

Howto Re-install Grub after windows wipes it out

Basically you have a good install of ubuntu and then realise that you want to dual-boot. You don't want to erase ubuntu, so you install windows. Grub then gets erased and there is NO way to get back into ubuntu.


So do the following:

1) Boot off the LiveCD

2) Open a Terminal (Applications-Accessories-Terminal) and type in the following commands, noting that the first command will put you into the grub "prompt", and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.

sudo grub
> root (hd0,0)
> setup (hd0)
> exit

4) Reboot (removing the livecd), and your boot menu should be back.

5) Open the grub file:

sudo gedit /boot/grub/menu.lst

6) Scroll to the bottom and add the following:

title Windows XP
root (hd0,0)
makeactive
chainloader +1

Note that you should also verify that hd0,0 is the correct location for Windows. If you had installed Windows on the 4th partition on the drive, then you should change it to (hd0,3).

Wednesday, June 11, 2008

Howto Create Smart Playlists in Songbird

Songbird doesn't have the feature for Smart Playlists built into it (playlists that consist of music matching certain conditions, e.g. "Never been played", or "Recently Added").



How to make a Recently Added playlist:

1. Open Text Editor (Applications>Accessories>Text Editor)

2. Copy and paste:

find "/home/user/Music/" -mtime -30 -type f | egrep -vi '\.jpg$' >recentlyadded.pl

Change /home/user/Music/ to the directory where you store your music.

By default I've defined "recently added" as music that was added in the past 30 days, but you can change the number 30 to a different number if you prefer.

3. Click File>Save As... and call it RecentlyAddedPlaylist.sh (or something else if you prefer).

4. Navigate to the folder where you saved it, right click on it, click Properties.

5. Go to the Permissions tab and tick the box "Allow executing file as program" and click Close.

6. Double click on the file and click Run in Terminal

7. Open Songbird

8. Click on File>Import a Playlist...

9. Navigate to your home folder.

10. The playlist won't be visible, so just type "recentlyadded.pl" and click Open.

11. You should now see a playlist of all the songs you've added in the past 30 days.

To update the playlist, simply run steps 6 to 10 again.

Saturday, June 07, 2008

HowTo enable empty password login in Ubuntu

ou want to enable a password less account in Gnome for your family/friends who have access to your computer.

This is different than not typing a password (autologin)


How to - by example

Create a user (system/administration/user and groups)
You can put fancy characters in the real name but not in the username.
You are obliged to enter a password. We will get read of it afterwards.

example:
username: guest
real name: invité (or guest or whatever you want to display in the graphical greeter later on)
profile: desktop user (DO NOT use administrator)
password: password

click ok and close the users and groups tool.

Remove the password for the guest user
open a terminal

sudo passwd -d guest

Authorize login with no passwords in gdm

sudo sed -i 's/#PasswordRequired=false/PasswordRequired=false/' /etc/gdm/gdm.conf

Authorize login with no passwords in pam

sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth

You can now log in with your guest user with no password.

If you want a graphical greeter screen, select it in system/administration/login window [local tab] (example: human list)
Page 1 | Next >>