Wednesday, June 4, 2008

GDM Welcome Theme Tutorial

Step1: Download an existing theme.
You can get one from here: http://www.gnome-look.org/?xcontentmode=150
Step2: Make your own background and foreground images.
Step3: Edit the *.xml file and *.desktop and put in your images.
Step4: Get xnest and get screenshot
* prompt%> sudo apt-get install xnest
* prompt%> gdmflexiserver --xnest
Step5: Tar it all up.



References:
http://live.gnome.org/GnomeArt/Tutorials/GdmThemes

Tuesday, June 3, 2008

Aptitude cheat sheet

Searching:
* apt-cache search ABC
* aptitude search ABC

Installing:
* sudo apt-get install ABC
* sudo aptitude install ABC

Showing version numbers:
* apt-cache show ABC
* aptitude show ABC

Uninstalling:
* sudo apt-get remove ABC
* sudo aptitude remove ABC

Removing configuration files as well:
* sudo apt-get remove --purge ABC
* sudo aptitude purge ABC

References:
* http://monkeyblog.org/ubuntu/installing/

How to install Firefox RC1 on Ubuntu Hardy (8.04)

Step1: System->Administration->software Sources
Step2: Add: deb http://ppa.launchpad.net/mozillateam/ubuntu hardy main universe
Step3: Press Close
Step4: Press Reload
Step5: prompt%> sudo apt-get update

Monday, May 26, 2008

How to use Canon MP210 on Ubuntu 8.04 (Linux printer drivers setup tutorial)

This is how to get your MP210 printer to work on Ubuntu 8.04:

Step1: Get the drivers.

You will need 4 driver packages:
* cnijfilter-common_2.80-1_i386.deb
* cnijfilter-mp210series_2.80-1_i386.deb
* scangearmp-common_1.10-1_i386.deb
* scangearmp-mp210series_1.10-1_i386.deb

Get them from here:
http://support-au.canon.com.au/EN/search?v%3aproject=ABS-EN&binning-state=model%3d%3dPIXMA%20MP210%0Amenu%3d%3dDownload%0Aos%3d%3dLinux&


Step 2: Install the drivers

prompt%> sudo dpkg -i cnijfilter-common_2.80-1_i386.deb cnijfilter-mp210series_2.80-1_i386.deb
prompt%> sudo dpkg -i scangearmp-common_1.10-1_i386.deb scangearmp-mp210series_1.10-1_i386.deb


Step3: Add the printer (if not already added)

* System->Administration->Printing
* Remove MP210_series
* Add new printer
** Device URI hal:///org/freedesktop/Hal/devices/usb_device_4a9_1721_505BD0_if1_printer_noserial

Or do it via CUPS:
http://localhost:631/printers/

If you just need the printer, you're done!


Step4: Download drivers for scanner, Extract & Build
http://internap.dl.sourceforge.net/sourceforge/mp610linux/mp150-0.14.2u.tar.bz2
prompt%> tar jxvf mp150-0.14.2u.tar.bz2
prompt%> cd mp150-0.14.2u
prompt%> make
prompt%> sudo make install

Step5: Setup XSane
prompt%> sudo mv /usr/lib/sane/libsane-pixma.so.1.0.19 /usr/lib/sane/libsane-
pixma.so.1.0.19.old
prompt%> sudo cp libsane-pixma.so /usr/lib/sane/libsane-pixma.so.1.0.19
prompt%> sudo apt-get install xsane

Step6: Run XSane
Click Applications->Graphics->XSane Image Scanner and scan away.


Enjoy!

References:
link1

Sunday, May 25, 2008

How to enable vim syntax highlighting on ubuntu 8.04

Problem:
vim has no syntax highlighting on ubuntu 8.04.

Additional symptoms:

Error detected while processing /home/marky/.vimrc:
line 21:
E319: Sorry, the command is not available in this version: syntax enable
Press ENTER or type command to continue


Solution:

Step1: Install the full version of vim:

prompt%> sudo apt-get install vim-full


Step2-A: Edit system-wide settings to enable syntax highlighting.

prompt%> sudo vi /etc/vim/vimrc

Remove the double-quote on the "syntax on" line

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on



OR


Step2-B: Make changes only for your account.

prompt%> cp /etc/vim/vimrc ~/.vimrc
prompt%> vi ~/.vimrc

Remove the double-quote on the "syntax on" line

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on



All done! Enjoy!

Sunday, April 6, 2008

Saturday, April 5, 2008

Camel Caps Title and Artist in iTunes

I DON'T LIKE ALL CAPS LIKE THIS. I prefer my music titles to: "Use Camel Caps". And I'm tired to renaming each of the 1000 Top Songs Of The 80's. Here is my solution:

1) Save the snippet below into: MarkyCamelCapsSelectedSongs.js




// m_a_r_k_y@yahoo.com 2008-04-05 Initial

var iTunesApp = WScript.CreateObject("iTunes.Application");
var selectedTracks = iTunesApp.SelectedTracks;
var numTracks = selectedTracks.Count;
var ITTrackKindFile = 1;

while (numTracks > 0) {
var currTrack = selectedTracks .Item(numTracks);
// is this a file track?
if (currTrack.Kind == ITTrackKindFile) {
title = currTrack.Name;
artist = currTrack.Artist;

//WScript.Echo(convertToCamelCaps(title) + " : " + convertToCamelCaps(artist));

currTrack.Name = convertToCamelCaps(currTrack.Name);
currTrack.Artist = convertToCamelCaps(currTrack.Artist);

}
numTracks--;
}

// camelcaps string converter
function convertToCamelCaps(str) {
var tempArray = str.split(' ');

for (var i = 0; i < tempArray.length; i++) {
tempArray[i] = tempArray[i].charAt(0).toUpperCase() + tempArray[i].substring(1).toLowerCase();
}

return tempArray.join(' ');
}




2) Open iTunes and select the songs you want to convert.
3) Double click MarkyCamelCapsSelectedSongs.js from explorer to run it.

You should see your selected songs get converted.

More Info here:
http://developer.apple.com/sdk/
http://www.nsc.ru/docs/ms/js/jstoc.htm
http://www.asp.dk/docs/jscript/jstutor.htm

Enjoy!