VB.Net: Convert a rootless XML document to an XMLDocument

I was given a rather unusual task to perform. It involved typing information from several sources into 5 different applications. As I'm not a fun of this type of work, I immediately derived my efforts into a rather automatic way, creating my own merging application that is.
With that in mind, the first problem I encountered was the dissimilarities in formats between the appliactions. One striked my in particular, the application was driving it's data from and to a wrongly constructed XML file. It didn't had a single root, instead it had several different roots. Since I'm not trying to recreate the file but rather pull data from it, and XMLDocument doesn't allow multiple roots, I was in front of a dilema. To use a rather ugly and unperformant XMLReader to deal with the whole file and extract the information I wanted, or find my own method to convert it to an XMLDocument. Of course, I did the second.
That

This evolved into a single method that reads an pseudo-xml document from a text file, create a root (called "root" in this example) and add the elements of the file to it.

    1 'Create our XMLDocument wich will hold our transformed file

    2 Dim xr2 As New XmlDocument

    3 'Loar a default root node

    4 xr2.LoadXml("<root/>")

    5 

    6 'Create a document fragment

    7 Dim docFrag As XmlDocumentFragment = xr2.CreateDocumentFragment()

    8 

    9 'Set the contents of the document fragment to our external file

   10 docFrag.InnerXml = IO.File.ReadAllText("myfile.xml")

   11 

   12 'Add the children of the document fragment to the original document

   13 Dim currNode As XmlNode = docFrag.FirstChild

   14 Dim nextNode As XmlNode = currNode.NextSibling

   15 

   16 Do While nextNode IsNot Nothing

   17 

   18     If nextNode.NodeType = XmlNodeType.Element Then

   19         xr2.DocumentElement.AppendChild(nextNode)

   20         nextNode = currNode.NextSibling

   21 

   22     End If

   23 

   24     nextNode = nextNode.NextSibling

   25 

   26 Loop

   27 

   28 '

   29 Console.WriteLine("Display the modified XML...")

   30 Console.WriteLine(xr2.InnerXml)



The code simply reads the file with IO.File.ReadAllText("myfile.xml"), and parse it to a XMLDocumentFragment.
The snippet may need some optimization, and may be hard to read, but it's working for my purpose.

In case you are wondering how to read it with an XMLReader, here is a possible way:

    1 Public Sub GetXMLFragmentFromFile(ByVal filename As String)

    2 

    3     'We need to tell XMLReader that we are expecting a fragment,

    4     'that is a document with no root or multiple roots

    5     Dim Xsettings As XmlReaderSettings = New XmlReaderSettings()

    6     Xsettings.ConformanceLevel = ConformanceLevel.Fragment

    7 

    8     'Let's read our file

    9     Dim xr As XmlReader = XmlReader.Create("testfile.xml", Xsettings)

   10 

   11     Do While xr.Read

   12 

   13         If xr.NodeType = XmlNodeType.Element Then

   14             'do something with the element found

   15         End If

   16 

   17     Loop

   18 

   19     'Let's dispose our reader

   20     xr.Close()

   21 

   22 End Sub



Comments are welcome.
Read more >>

Make Your Extensions Work with the Firefox 3 Beta

Firefox 3 Beta only: If you've taken the plunge into testing the brand new Firefox 3 beta
but your favorite extensions are disabled, that's because developers
haven't updated them and may not be providing secure updates yet. If
you're an impatient risk-taker who needs your extensions back NOW,
here's a cheat that may get them to work. Big Honking Warning: Only do this if you're willing to deal with possible bleeding edge extension bugs and security risks!




  • Type about:config into Firefox's address bar and click the "I'll be careful, I promise!" button.
  • Right-click anywhere. Choose New&gt;Boolean. Make the name of your new config value extensions.checkCompatibility and set it to false.
  • Make another new boolean pair called extensions.checkUpdateSecurity and set the value to false.
  • Restart Firefox.

All goes well, and any extensions that aren't yet officially Firefox 3 Beta 3 compatible and don't have secure updates (like Better Gmail and friends) will be enabled. Final warning: These changes may lead to unexpected wacky behavior. Proceed at your own risk!

Thank to Lifehacker: http://lifehacker.com/355973/make-your-extensions-work-with-the-firefox-3-beta
Read more >>

Firefox 3 + Ubuntu 8.04 = Huge fonts

For those of you seeing strange and unreasonably large font sizes in Firefox 3 on Ubuntu 8.04, try setting the “layout.css.dpi” (via about:config) to 72 or 96. Either of those values should set all fonts to a reasonable size.
This should have been fixed by now in the final version, but it might help someone who still suffer this problem.
Read more >>

Ubuntu Hardy Heron (8.04) on Thinkpad T61

I've been running Ubuntu 8.04 Beta for quite some time. Now that the final version is out I decided to make a clean sheet and install it over from scratch to remove all the quirks I added by testing.
My setup is the following:

Intel Centrino Pro (Core 2 Duo) T7300(2GHz)
Intel Graphics Media Accelerator X3100
Intel PRO/Wireless 4965AGN Mini-PCI Express Adapter
AD1984 HD Audio controller
4-in-1 Memory reader
2GB RAM DDR2
120GB 5400rpm HD
14.1" in 1440x900 LCD
CDRW/DVDR Multi-Burner

Yours might vary.

Read the full post here.

I installed Hardy with the Desktop CD. A few seconds to boot up from CD was a great start. Partioned using gparted, with dedicated swap, /boot, /home, and /
After some minutes of file copying it was ready to reboot, so I clicked restart but the screen blanked and hang there.
Hard reboot later and Ubuntu started up.
As usual, a quick look at the logs to see if there is something going on behind stage that I need to take care first.
First look: Compiz started by default. Wireless working. Ethernet Working. Video ok. Fonts are a little rugged. Sound working. Capture not working; known problem since internal mic is disabled by default.
Some warnings on xorg.log is the only thing found, particuarly a Bad V_BIOS checksum which I'll check later.
No packages to update. That's good :)
Since I work for IBM and I need some essential software for my day-to-day, I decided to go for the IBM Repositories first and install Lotus Notes, Sametime, and some other software.
First AT&T Global Network Client to connect to work. You can refer to my post for that: http://technobluez.blogspot.com/2008/02/at-global-network-client-for-ubuntu.html

Now let's get the right keys in:
$ wget http://yktgsa.ibm.com/projects/i/ibmubuntu/web/public/ibmubuntu.pub -O - 2> /dev/null | sudo apt-key add -

Since there is no Hardy IBM ubuntu yet:
$ wget -c http://pokgsa.ibm.com/projects/l/lud/utils/installer/lud-config-apt_0.4-1_all.deb
Unpack lud-config-apt and extract lud-gpg.asc and temperance-repositories.list
$ sudo apt-key add lud-gpg.asc
$ sudo cp temperance-repositories.list /etc/apt/sources.list.d/

$ wget -qO- http://olymp.hursley.ibm.com/dc4eb/olymp-repository.crt | sudo apt-key add -

(extracted from here: http://web.opensource.ibm.com/www/lud/ludinstall.html)
(and here https://ltc3.linux.ibm.com/wiki/LinuxDocs/Distro/Ubuntu)

Now let's run Synaptic to upgrade our sources and see if the package is the one we want. cool, working :)

Lotus Sametime 7.5

Install the packages sametime-blue.

# Tested on Edgy/Feisty/Kubuntu
sudo apt-get install sametime-blue
# To add support for sametime protocol for pidgin
sudo apt-get install pidgin libmeanwhile1

First problem, ibm-hannover refuses to install because libicu36 package is not found.
Let's use the Debian Client 4 ebusiness instead:

# dc4eb main olymp repository
deb http://olymp.hursley.ibm.com/dc4eb stable ibm main contrib non-free
#deb http://olymp.hursley.ibm.com/dc4eb testing ibm main contrib non-free #opti$
#deb http://olymp.hursley.ibm.com/dc4eb unstable ibm main contrib non-free #opt$

# source lines - you only need these if you want the sources to our packages
deb-src http://olymp.hursley.ibm.com/dc4eb stable ibm main contrib non-free #mi$
#deb-src http://olymp.hursley.ibm.com/dc4eb testing ibm main contrib non-free #$
#deb-src http://olymp.hursley.ibm.com/dc4eb unstable ibm main contrib non-free $

And on top of the temperance repos:

##
# lud-repositories.list
##
# DESC: Include LUD repositories in apt cache
##

deb http://pokgsa.ibm.com/projects/l/lud temperance stable

So after all this I did a:

$ sudo apt-get install ibm-notes8

Also to fix font problems:

$ sudo apt-get install t1-xfree86-nonfree ttf-xfree86-nonfree

New Lotus openwith

Opening attachments relies on having an old version of GNOME installed. For more recent versions of GNOME it can be made to work by removing/renaming the openwith program and replacing it with a symbolic link to /usr/bin/gnome-open. Note that you will have both /opt/IBM/notesplugin/bin/openwith and a symlink to it in your ~/notesplugin/bin/ . Simply changing the symlink to gnome-open doesn't appear to work, you need to delete (or rename) the actual program in /opt.

If you don't use GNOME then Anthony Moulen has written short script (WorkPlaceAttachmentScript) that can be used to replace the openwith program.

If you use KDE then there is also a script written by Jason Salcido that uses the file associations you already have in that environment.

Setup Printer in IBM

Install this package restart your Firefox and go to IBM Global Print web site to install the printer. http://w3-3.ibm.com/tools/print/index.html

# Tested on Dapper/Edgy/Feisty/Kubuntu
# Restart your Firefox, after install
sudo apt-get install lud-gpws

# for ubuntu 8.04 (Hardy) create a link in
sudo ln -s /usr/lib/firefox/plugins/ibmgpws.so /usr/lib/xulrunner-addons/plugins/ibmgpws.so

Multimedia Codecs, Java, Flash

Install this to be able to listen and view multimedia and sound files with different codecs and enable java and flash in firefox.

# Java browser plugins, java jre, flash, fonts, codecs
# The ubuntu-restricted-extras package installs the Sun JDK, which requires the user to accept the Sun License.
sudo apt-get install ubuntu-restricted-extras

Customizing your Firefox install

* If middle-click on tab to close it does not work, you can enable it by pointing Firefox to "about:config" and set middlemouse.contentLoadURL to false. Voila, middle-click to close works again.
* To enable the autoscroll (where you middle-click and a little arrow-graphic appears and you can scroll just by moving the mouse), go to "about:config" and set general.autoScroll to true.
* To automatically select the entire contents of the URL bar when you click there, open "about:config" and set browser.urlbar.clickSelectsAll to true. I find this a helpful usability improvement.

Speed Up Firefox web browser:

In your location bar, type about:config

In the filter bar type network.http.pipelining
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

In the filter bar again and type network.http.pipelining.maxrequests
Default it says 4 under value field and you need to change it to 8

Go to the filter bar again and type network.http.proxy.pipelining
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Go to the filter bar again and type network.dns.disableIPv6
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Go to the filter bar again and type plugin.expose_full_path
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Now you need to Create new Preference name with interger value for this got to Right click -> New -> Integer
Here you need to type nglayout.initialpaint.delay and click ok
Now you need to enter 0 in value filed and click ok

Now you need to Create one more Preference name with interger value for this got to Right click -> New -> Integer
Here you need to type content.notify.backoffcount and click ok
Now you need to enter 5 in value filed and click ok

Now you need to Create one more Preference name with interger value for this got to Right click -> New -> Integer
Here you need to type ui.submenuDelay and click ok
Now you need to enter 0 in value filed and click ok

Some more Tweaks

Enable the spellchecker for inputfields and textareas (default is textareas only)
layout.spellcheckDefault=2


Ondemand CPU Frequency Governor

The Ondemand CPU Frequency Governor automatically adjusts the CPU frequency in order to save power. It does not simply set the frequency to the lowest setting, because even if you are saving energy, the longer the CPU is in use the more power it uses. So this adjusts the frequency to complete processes as quickly as possible, so it can return to a low power state for longer periods of time, reaching longer and lower sleep levels.

Make sure all package managers are closed, open a terminal and enter each of the following in order:
sudo modprobe acpi-cpufreq
sudo modprobe cpufreq_ondemand
sudo aptitude install sysfsutils
sudo -s
echo "devices/system/cpu/cpu0/cpufreq/scaling_governor=ondemand" >> /etc/sysfs.conf

For the first two, it is good if you do not see any response from the terminal. It only responds on errors. After this, close the terminal window and reboot your computer. After the reboot right-click on the panel where you want the CPU monitor, and select “add to panel” then add the CPU Frequency Monitor. . Then in a terminal enter:
sudo dpkg-reconfigure gnome-applets
select “ok” and “yes” and bam! Now each time you left-click on the CPU Frequency Monitor you can choose from the available frequencies, or the available automatic options. Remember, Ondemand is the best for battery life.

sources: http://forum.thinkpads.com/viewtopic.php?t=50949&postdays=0&postorder=asc&highlight=ubuntu&start=0
http://ubuntu.wordpress.com/2005/11/04/enabling-cpu-frequency-scaling/



Read more >>

Linux useful commands

Regular commands I use every day in Linux plus a few eclectic ones. Basically geared to the new user. Tips or thoughts, please let me know.

Man pages

In Linux there is a manual for just about anything. Learn about almost everything by “man command” in the terminal. (e.g. man ls). Or type “command –help” for a basic description. Also, many man pages also cover configuration files (man resolv.conf).

Basic Commands

  • Up key- Command History
  • Tab - Auto-completion, nice and handy for completing file-names, directory names, and commands.
  • Commands are in this form: command -arguments

Files ( + directories )

ls ( list ), -l ( long ), -a ( shows hidden )
cp ( copy )
mv ( move or rename ), mv filename1 filename2
rm ( remove ) Very dangerous to use as root. Use with caution. -r ( recursive ) -f ( force - needed to remove a link)

Wildcards to expand definitions:

  • * (matches any character), cp *.txt ~/Desktop
  • ? (matches any single character), cp file?.txt ~/Desktop
  • [characters] (Matches a range/set of characters), cp [a-n]*.txt ~/Desktop
  • >
  • [!characters] (Matches any character that is not a member of the set characters)

Directories

cd    ( change directory )
pwd ( print working directory )
mkdir ( mkdir )
  • A name followed by a / means it’s a directory, bash is pretty good about figuring out what you mean if don’t use it but some apps don’t. A safe syntax would be cd myfiles/

Command Output to Text (Standard Output)

ls /usr/bin > /home/user/Desktop/programs.txt

Add to an existing text file:

ls /sbin >> /home/user/Desktop/programs.txt

Pipes ( | )

  • Useful for using programs in conjunction with others
ls -l | less

Filters

Popular filters used after piping.

  • sort
  • uniq - removes duplicate lines of data
  • grep - returns the output of a specified pattern of characters
  • head, tail - outputs the first of last lines of output
  • tr - translates characters - can be used for upper/lower case conversion

Use grep to extract patterns from files

grep EE /etc/X11/xorg.conf

ls -all /dev | grep dvd

glxinfo | grep -i direct

Files and File Permissions

View file permissions

  • List the files in long view:
ls -l

-rwxr--r-- 1 user user 225444 2007-05-01 21:58 abc.pdf
| | | | | |
| | | world | group name
| | group owner name
| owner/user
directory?

r = read = 4
w = write = 2
x = executable = 1

Change File Permissions

owner = 4+2+1 = 7 , group = 4

The above file’s permissions numerically is 744 to change permissions of the above file:

chmod 755 abc.pdf

Change Ownership

chown user:group /home/user/document.txt

Lazy way of make a file executable ;)

chmod +x /usr/bin/gmailto

File Systems

Show all partitions and their types (may not work on all types)

sudo fdisk -l

Show partition used/available space:

df -h

See all file systems mounted:

cat /proc/mounts

Sort Directories by How much space they consume

du | sort -nr

Mount a Volume and add it in permanently:

  • The fstab file tells system of available disks/partitions and can automatically mount it at boot.
sudo mkdir /mnt/USB-Drive
sudo mount /dev/sda2 -t vfat -o rw /mnt/USB-Drive
  • types include hfsplus, vfat…

Enter in /etc/fstab:

/dev/sda2    /mnt/OSX          hfsplus ro,exec,auto,users    0      0
/dev/sda4 /mnt/Shared_Disk vfat users,auto,uid=1000,gid=100,umask=007 0 0
  • ro - read-only, rw - read-write, auto mounts filesystem on boot

Unmount all possible file systems:

umount -a

Check File Systems

  • Mounted file systems should be checked from the Installer CD/DVD or on boot.

Force file system check on next boot (won’t do it immediately):

sudo touch /forcefsck

Reboot immediately and check for errors:

sudo shutdown -Fr now

Change how often fsck runs at boot:

sudo tune2fs -c 30 /dev/hda

Check and mark bad blocks on damaged drives:

mke2fs -j -c /dev/hda3

Get UUID of devices:
At times the fstab file will require a device ID (UUID) be supplied.

ls /dev/disk/by-uuid -alh

Swap

Create swapfile

dd if=/dev/zero of=/swapfile bs=1024 count=2097152
  • Swap is recommended to be 1-1/2 to 2x the value of the RAM to use for hibernation.
  • 1 GB = 1024 MB = 1024 x 1024 kB = 1048576 kB = 1048576 kB x 1024 bytes/kB = 1,073,741,800 bytes10
mkswap /swapfile
swapon /swapfile

Add to /etc/fstab:

/swapfile              swap             swap     defaults

Controlling Swap

Turn off swap:
swapoff -a /swap

  • Swapiness is the input/output priority of swap. To measure the current value:
cat /proc/sys/vm/swappiness

To change the swap priority (higher value means more swapping):

sysctl vm.swappiness=10
  • values of 20 or lower are better for laptops.

File Compression

Pack:

tar gunzip:
tar cvpzf /AreaToSaveTo/yourcompressedfile.tgz –exclude=/this/folderorfile /CompressionStarts/Here
tar.bz2(tbz2) (block sorted, better compression):
tar -cvjf files.tar.bz2 fileorfolder
bzcat linux-2.6.XX.tar.bz2 | tar x

Unpack:

tar gunzip:
tar -xf file.tgz
tar xvjpf file.bz2 /startplace
tar.bz2(.tbz2):
bzcat file.tbz2 | tar file.tar

View contents of tar files:

tar tzvf name_of_file.tar.gz | less

unrar

unrar e file.part01.rar
  • Now works in conjunction with file roller.

Span Multiple Volumes

create:

tar -c -M --tape-length=2294900 --file=part1.tar too-large-archive.tgz

extract:

tar -x -M --file=part1.tar too-large-archive.tgz
  • At prompt specify new (n),
  • then specify volume name (e.g. n part2.tar)
  • tape-length is 1024 bytes measurement
    • or (1 computer kilo)

Or use “split” to break a large volume:split -b 2m largefile LF_

  • 2m = 2 megabytes LF is the prefix for new name
tar -cvj /full/path/to/mybigfile | split -b 650m

Put back together:

cat file* > newfile

Backup and Restore

Tar - From Install CD

cd /mnt/gentoo
tar -czpvf /mnt/gentoo/MacBook-Gentoo-Backup.tgz *

Rsync - Full Backup

rsync -avtp --delete --exclude=/home/user/somedir /source/dir /destination/dir
  • -a archive, -v verbose
  • -t preserve modification times, -p permissions
  • –delete removes destination file if has been removed from source
  • –links recreate symlinks
  • -z compress from source to destination - good for slow connections.
  • use “-a e ssh source name@hostname:dest” for ssh

Rsync - Incremental Backup
NEEDED? I think the above does Incremental too.rsync -b –backup-dir= combination

  • used for daily or every other day

Users

Add user

useradd -m -G adm,audio,cdrom,cdrw,cron,games,plugdev,portage,shutdown,usb,users,video,wheel -s /bin/bash user
  • Groups may vary some per distribution, this one is for Gentoo.
  • Some groups may not be available until installation is finished

Add/delete user to group

gpasswd -a user plugdev
gpasswd -d user plugdev

See what groups user belongs to

id

Remove user

userdel username

CD / DVD

Writing to CD/DVD with Rock-Ridge support

  • Rock-ridge support add Unix file extensions and attributes for iso9660 standard disks.
  • DVD are marked as 4.7GB capacity but thats just the marketing measure. In terms the computer understand the space on a DVD is 4.368 GB’s
  • 1 GB = 1048576 kB x 1024 bytes/kB
  • DVD +R at 4x or 8x for best performance

DVD

growisofs -Z /dev/dvd -lrJ -joliet-long /path/to/files
  • -Z means to start at the beginning of the dvd
  • -l allows long filenames (breaks DOS compatability)
  • -r Rock-ridge support
  • -J Add Joiliet support
  • -joliet-long - allows Joliet filenames to be 103 characters long instead of 64 - breaks joliet compatibility but works in most cases.

CD

mkisofs -o my.iso -lrJ /path/to/files
  • Then burn iso to CD.
  • Not sure if I can write directly to CD, from what I’ve seen it would seem that I can’t.

Blanking a Disk

  • If you want to blank a disk or it already has a file-system on it you’ll see an error like “WARNING: /dev/hda already carries isofs!” then reinitialize the filesystem:

DVD

dvd+rw-format -f /dev/dvd
growisofs -Z /dev/hda=/dev/zero

CD

cdrecord -v dev=/dev/hda blank=fast
cdrecord -v dev=/dev/hda speed=2 blank=fast
cdrecord -vv dev=1,0 blank=all

ISO

Write ISO to CD/Drive:

dd if=name.iso of=/dev/sdb1

Mount ISO:

mount -t iso9660 -o loop,ro name.iso /mnt/cdrom/
mount /path/to/name.iso /mnt/cdrom -t iso9660 -o ro,loop=/dev/loop0

Create an ISO from a DVD or CD:

dd if=/dev/hda of=name.iso

Create and ISO from a file/directory:

mkisofs -o name.iso /path/to/file_or_directory

CDRWin (.bin/.cue) images to .iso:

bchunk name.bin name.cue name.iso
bin2iso name.cue

Converting CloneCD images to ISO:

ccd2iso name.img name.iso

Converting nrg (Nero) images to ISO:

nrg2iso name.nrg name.iso

Support for writting large file sizes

  • ISO has file size limit of 4GB
  • untested - udf support is still in alpha
mkisofs -o my.iso -lrJ -allow-limited-size -udf file-or-pathtofiles
growisofo -Z /dev/dvd -lrJ -allow-limited-size -udf file-or-pathtofiles

Mouse/Keyboard

Change keymaps:

setxkbmap dvorak

Map pointer buttons to keyboard:

xmodmap -e 'keycode 116 = Pointer_Button2'
xmodmap -e 'keycode 108 = Pointer_Button3'
xkbset exp m

Hardware Info

Kernel messages about hardware

dmesg | less

Cpu info:

cat /proc/cpuinfo

List all PCI devices

lspci

Detect hardware as it’s plugged in

tail -f /var/log/messages

For more detail

lshal --monitor

Icons / Cursors / Fonts …

Reset Icon Cache

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

Convert Windows Icons to Linux

Reset cache for fonts:

fc-cache -vf

Build font info per directory:

mkfontscale
mkfontdir

Replace fonts script

cd /etc/fonts/conf.d/ && ln -sf ../conf.avail/61-replace-corefonts.

Take screenshot of selected area

import filename.png

Set gamma

  • If you have ability to calibrate your own icc profile ( Macintosh’s do ) copy the icc profile to Linux and use “xcalib icc.profile”, otherwise a basic gamma can be set:
xgamma -bgamma 0.925 -ggamma 0.925 -rgamma 0.925

System

Shutdown at a specific time

shutdown -h 22:33

Manually Shutdown

shutdown -P now

date
use “date” to check date and to set system clock:

date MonthDayHourMinuteYear

Find out kernel version:

uname -r

Start Program that isn’t in the Systems Path

  • Only programs that are in a system’s PATH setting can be started by typing the command
./program

Disable Touchpad whilest Typing

syndaemon -d -t -i 2

Networking

Samba

Change or add password to smbconf:

sudo smbpasswd -L -a user

Mount SMB share to folder

sudo smbmount //192.168.1.105/user/ mnt/directory -o username=username,password=pass,uid=1000,mask=000

Mount all Samba Shares in fstab

mount -a -t smbfs

SSH / SCP

Remote login with ssh with username (diiferent that the one you’re using)

ssh -l username 192.168.1.101

Copy remote file to local file

scp -p user@192.168.1.101:~/Desktop/file.name file.name

Download entire website:

wget -r http://www.robot-frog.com/

Advanced

Bash

The ~/.bashrc file

  • Adding PATHs to the ~/.bashrc file will make the system aware of another folder that has executables.
  • Shortcuts can be created for common commands
export PATH=$PATH:/home/user/.scripts
alias capscreen="import ~/Desktop/screen.png"

Analyze Bash History

cat .bash_history | tr '|' '\n' | awk '{print $1}' | \
egrep -o '([^/]+)$’ | sort | uniq -c | sort -nr | awk ‘{print $2 “,” $1}’

To see the preset variables already defined for bash:

set

Search History

ctrl-r

Cron

  • Cron is the system timer. It checks every minute for commands to run.

To edit a crontab (cron jobs)

crontab -e

# minute (0-59),
# | hour (0-23),
# | | day of the month (1-31),
# | | | month of the year (1-12),
# | | | | day of the week (0-6 with 0=Sunday).
# | | | | | user
# | | | | | | commands
43  08  *   *   *       env DISPLAY=:0.0 audacious [[/home/user]] /My\ Music/Other/Alarms/301gq.mp3

chroot - (changing root)

  • Userful for logging into your current Linux from an installtion CD
su
mkdir /mnt/osname
mount /dev/sda3 /mnt/osname
mount -t proc none /mnt/osname/proc
mount -o bind /dev /mnt/osname/dev
chroot /mnt/osname /bin/bash

Compile Kernel

make oldconfig
make menuconfig
make clean zImage modules modules_install install

For PPC “make pmac32_defconfig” will generate a basic config.

Find Modules

find /lib/modules/2.6.20-gentoo-r2-ibook-SE-g3 -type f -iname ‘*.o’ -or -iname ‘*.ko’

Add the screen program to be able to background a terminal process
screen command

  • CTRL + A + D to background it, to return it:screen -r

Use noup to continue a process even if you log out
noup command

Unsorted / Less Used

sudo echo >> no work

echo "my text" | tee /etc/portage/package.use

See whats taking up ram:

ps auxf --sort size

Generate Modelines for xorg.conf

gtf screenwidth screenheight vertrefresh

Reset settings in gconf:

gconftool-2 --recursive-unset /apps/compiz 

GDM conf file

Touch Entire System
(careful I’ve done this before when my files got dated wrong from a dead battery. But I tried again and the files are put where the command is executed - all 0 bytes)

find /| xargs touch - m

Allow window executables to run directly (will need Wine and misc. binaries enabled in kernel)
In /etc/sysctl.conf add

fs.binfmt_misc.register = :WINEXE:M::MZ::/usr/bin/cedega:

and add to fstab

none  /proc/sys/fs/binfmt_misc  binfmt_misc  defaults 0 0

Re-size Images

  • requires imagemagick
convert writes new image, mogrify overwritesconvert image.jpg --resize 800x600 newresized.pngmogrify -geometry 1024x768 *.png

Copy ALL Files (+invisible, hard links, softlinks)

find . -depth -print0 | cpio –null –sparse -pvd /mnt/newhome/

Create random numbers, hex letters

dd if=/dev/random bs=1 count=5 2>/dev/null | xxd -ps

Run programs sequentially or concurrently

program && program
program & program

Hardware acceleration enabled?

glxinfo | grep rendering

A simple web server

Share files in directory and all subfolders:

python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

View in:

http://localhost:8000 or http://your_ip:8000/

Debian Specific:

Run Program as normal user:

sudo dpkg-statoverride --update --add root root 4755 /usr/share/app

drive space show taken by installed packages

dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n

Rebuild Font Directory

dpkg-reconfigure fontconfig
Read more >>

How to get special keys to work in ubuntu and Firefox 3.0

Thankfully the people at Mozilla decided to include the expected functionality for the XF86Back and XF86Forward keysyms in the new release so all you need to do is:
# printf 'keycode 234 = XF86Back\nkeycode 233 = XF86Forward' &gt;&gt; /etc/X11/Xmodmap
And to make this take effect immediately (i.e., without having to log out and log in again), as a regular user run:
$ Xmodmap /etc/X11/Xmodmap
For Hardy Heron, the xmodmap command is all lowercase. Also, the /etc/X11/Xmodmap file is not being read on boot. I've added the command to my .bashrc to have it called on startup.

For more information go to the original link.
Read more >>

Widescreen resolution in VMWare guest on Linux host

If your LCD Panel resolution is not listed by VMware on your Windows Guest, you will need to manually modify your Host configuration. For that, find the vmx that keeps the config and edit it.
$ nano "~/vmware/Windows XP Professional/Windows XP Professional.vmx"

and enter the lines:
svga.maxWidth = "1440"
svga.maxHeight = "900"
Read more >>

Howto: Remove the brown background color during login

You may have noticed that the background color turns light brown for a second before and after login. If you had, then you probably noticed it because you changed the default GDM login or the background in gnome.
Turns out the program is straight in the login manager. Specifically, in the file /etc/gdm/PreSession/Default. Thankfully, it’s easy to fix with a text editor.

So from the command line type:
# gksudo gedit /etc/gdm/PreSession/Default
Scroll down to:
—————————–
# Default value
if [ “x$BACKCOLOR” = “x” ]; then
BACKCOLOR=”#dab082
fi

“$XSETROOT” -cursor_name left_ptr -solid “$BACKCOLOR”
fi

exit 0

————————–
then change
BACKCOLOR=”#dab082
to any hexcolor you prefer, for instance
BACKCOLOR=”#000000”
Read more >>

Installing Ubuntu 7.04 (Feisty) on IBM Thinkpad T60 1951-A33

Unfortunately my t60 was stolen last week with all my notes on the progress, luckily enought for some, I had some backup on my office's intranet which I'll share with you on installing ubuntu on a Thinkpad T60.

The following are my personal steps for installing ubuntu on the Thinkpad T60. Yours might vary and this is by no means an official guide, it's just my personal notes on how to do it. Also unless you work on Big Blue, some portions of the review will not apply. Please be so kind to drop a comment if it works for you or if you have anything to add.

The image “http://shop.unl.edu/salesgraphics/ThinkPadT60.png” cannot be displayed, because it contains errors.


First a quick review of what this T60's hardware looks like (what I remember at least):

  • Interl Core Solo T1300 1.66 Ghz 2 MB cache
  • 1 GB RAM
  • Intel 82801G (ICH7 Family) Ultra ATA Storage Controllers - 27DF
  • Intel 82801GBM SATA AHCI Controller
  • Mobile Intel 945GM Express Chipset Family
  • HD Hitachi 60GB HTS721060G9SA00 7200 rpm
  • MATSHITA DVD-RAM UJ-842 (DVDRW-CDRW)
  • Texas Instruments PCI-1510 CardBus Controller
  • Intel 82801G (ICH7 Family) USB Universal Host Controller - 27C8
  • Intel 82801G (ICH7 Family) USB Universal Host Controller - 27C9
  • Intel 82801G (ICH7 Family) USB Universal Host Controller - 27CA
  • Intel 82801G (ICH7 Family) USB Universal Host Controller - 27CB
  • Intel 82801G (ICH7 Family) USB2 Enhanced Host Controller - 27CC
  • SoundMAX Integrated Digital HD Audio
  • CXT ThinkPad Modem
  • Atheros 11a/b/g Wireless LAN Mini PCI Express Adapter
  • Intel PRO/1000 PL Network Connection
  • Bluetooth, synaptics touchpad and trackpoint

Installed onto free-space on local hdd and left Windows Partition untouched.
Installation was quick and successful. Used Guided partition with free space option.
Upon boot, resolution is a little bit odd, this is a known bug of Intel 945GM and odd resolutions, this laptop uses 1400x1050 as default, but it's running at 1280x1024 instead. We'll fix it later by installing Intel drivers instead of i810.
GDM incorrectly detected the DPI settings and font is a little big. I'll fix this bug later.

Wireless:

The new restricted driver icon is on the tray.
upon click, it informed me that the Atheros Hardware Access Layer (HAL) driver is using proprietary closed source software.
My home network has a low-cost, ad-hoc setup that I know does not work on the drivers installed and did not connect. The network-manager connects on AP Setups thou extremely well and it's easy to set up.
So I opened the network settings and configured the settings (that it took from the livecd installation when I tried to connect to home unsuccessfully) to enable roaming profile. When I tried clicking on the nm-applet for my home network, it closed without any notification.
So I opened System.Administration.System Logs to try to figure out why and the following was on the syslog:

Aug 15 13:02:00 geraldes NetworkManager: ^I[1187193720.347668] nm_device_802_11_wireless_get_activation_ap (): Forcing AP 'SanMartin'
Aug 15 13:02:00 geraldes NetworkManager: file nm-device-802-11-wireless.c: line 865 (nm_device_802_11_wireless_get_activation_ap): assertion failed: (security)


Ethernet:

Known-BUG with T60: If the network cable is not plugged in when you boot the computer, the system does not recognize it.
Rebooted with the network cable plugged-in. Started Synaptic package manager.

downloaded vidalia-eeprom-mod-script (e1000 script from Lenovo) to fix the Net issue.
Reboot: it worked!

No need to have the net plugged in for it to be detected. Issue fixed.


Disabling IP6:

ip a | grep inet6
inet6 ::1/128 scope host
inet6 fe80::215:58ff:fe2f:5ecc/64 scope link
inet6 fe80::216:cfff:fe22:7cfd/64 scope link

Create a file named bad_list in /etc/modprobe.d containing this line:

alias net-pf-10 off

reboot. IPv6 no more!


Upgrading the kernel:

Open Synaptic: Reload and upgrade.
Upgraded to Linux-2.6.20-16 + 180MB worth of update-downloads.
Restarted to apply. After reboot, no apparent changes, everything working as usual.


Uninstall Unneeded services:

Un-install Avahi, no need for that service:
sudo apt-get remove avahi-autoipd avahi-daemon --purge
The following packages will be REMOVED:
avahi-autoipd* avahi-daemon* libnss-mdns* ubuntu-desktop*

NOTE: Ubuntu-desktop is a meta-package, so don't worry about that, it won't remove your ubuntu.


Fixing the Brightness keys:

The first problem I noticed was that the screen brightness adjustment buttons (Fn+home and Fn+end) did not work correctly: the screen would turn off when they were pressed.
This turned out to be a bug related to the "video" module. This module can simply be blacklisted and the buttons will then work after a reboot.

Add the following line to your /etc/modprobe.d/blacklist file to blacklist "video":
blacklist video

Bluetooth:

Bluetooth on this laptop is supported. You should install the bluez packages, for example:

sudo apt-get install bluez-gnome bluez-utils

The device is detected by the bluez Gnome applet and it disappears when you turn it off by toggling the "Radio" button (Fn+F5).
I have not tested it further because I do not have any Bluetooth devices to try.

File Management Preferences:

Options I like:
Use Compact Layout
Show Hidden and Backup files
List view
By Type
List Columns: Group, Owner, Permissions


Fixing the wireless network:

complete-remove linux-restricted-modules-* purging configuration files.
sudo apt-get install build-essential

iwconfig ath0
ath0 IEEE 802.11a ESSID:"" Nickname:""
Mode:Managed Frequency:5.17 GHz Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power:8 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid:2325 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

reboot!

iwconfig ath0
ath0 No such device

removed!

Madwifi installation + aircrack:

MadWifi drivers allows to run the Wireless Card in Master, Monitor, Ad-Hoc modes. Aircrack allows to see and crack wireless APs.

To install MadWifi:
rmmod wlan_wep ath_rate_sample ath_rate_onoe ath_pci wlan ath_hal ath_rate_amrr

wget http://snapshots.madwifi.org/madwifi-ng-current.tar.gz

wget http://patches.aircrack-ng.org/madwifi-ng-r2277.patch

tar -zxvf madwifi-ng-current.tar.gz

cd madwifi-ng-XXXX-YYYY

*Patch with aircrack:
patch -Np1 -i ../madwifi-ng-r2277.patch

*The patches change often, so please change them if you need, just navigate to the web and search for the proper ones.
*http://patches.aircrack-ng.org

make
sudo make install

sudo depmod -ae *not needed on last patches.

sudo modprobe ath_pci

WORKED!

Known Workarounds:

sudo iwconfig ath0 mode monitor

*if it gives an error, we destroy the interface ath0:

sudo wlanconfig ath0 destroy

*Then create a single interface in monitor mode:

sudo modprobe -r ath_pci

sudo modprobe ath_pci autocreate=monitor

autocreate:Create ath device in [sta|ap|wds|adhoc|ahdemo|monitor] mode. defaults to sta, use 'none' to disable (charp)

No luck with NetworkManager!!!! still closing when selecting an ad-hoc network. But Adhoc, monitor and master modes are now working!!!


Installing AT&T VPN Client:

IBMers should use Lotus-Mobile-Connect. But for that we need to request access in ASO. So first thing to do is install the ATT Client to get conectivity.

using mts using: mts-client_1.1.1-2.3_i386.deb && mts-client-gui_0.4-3.1_i386.deb
working ok out of the box, account ARHQ, service vida.

Update: there is a new AGNC client available, read my previews post to get it.

Installing Sametime 7.5.1 from LUD Repo:

I downloaded the file from the IBM repos (IBM employees only, do not ask for it) for offline install and it worked ok. I have basic connectivity to IBM for the moment.

HDAPS (HDD Protection):

HDD Protection is done by software. No single packet yet, you have to manually install and configure everything.

sudo apt-get install hdapsd hdaps-utils
** not useful, wait for proper kernel support, maybe 7.10

I will not do this for the moment and wait for future kernel patchs and software.


Installing Eye-Candy:

Open synaptic and enable all repositories (backports, etc)

sudo apt-get install bluez-gnome libgnome-compiz-manager0 gtk-engines-xenophilia \
compiz-extra metacity-themes gtk-theme-switch openoffice.org-style-default \
gtk2-engines-redmond95 libgconf2-ruby gnome-art gtk2-engines-thingeramik \
libcairo-ruby network-manager-pptp libgtk1.2 gnome-icon-theme-suede \
industrial-cursor-theme libatk1-ruby libglib1.2 gtk-engines-eazel \
gnome-icon-theme-gartoon gtk2-engines-mist gparted gtk2-engines-clearlooks \
gnome-icon-theme-gperfection2 gtk2-engines-metal gtk2-engines-geramik \
openoffice.org-style-industrial libglib2-ruby gtk-engines-thinice libpcre3 \
gtk-engines-lighthouseblue libglade2-ruby gtk-engines-geramik-data mysql-common \
gtk-engines-begtk libpango1-ruby gtk-engines-industrial gtk-engines-mist \
gtk-smooth-themes pptp-linux libfuse2 libmysqlclient15off ruby1.8 \
gnome-themes-extras libcairomm-1.0-1 gtk-engines-mono libglibmm-2.4-1c2a \
libgdk-pixbuf2-ruby librexml-ruby network-manager-vpnc mysql-navigator ruby \
gnome-splashscreen-manager mysql-admin gtk2-engines-smooth gtk2-engines-qtpixmap \
gtk-engines-thingeramik msttcorefonts mysql-admin-common libntfs9 \
libgtkmm-2.4-1c2a gtk2-engines-magicchicken gtk-engines-notif gtk2-engines-cleanice \
gtk-engines-redmond95 libgdk-pixbuf2 openoffice.org-style-andromeda cabextract \
gnome-humility-icon-theme libcairo-ruby1.8 gtk2-engines-thinice \
gnome-icon-theme-dlg-neu vpnc grub-splashimages openoffice.org-style-crystal \
gtk2-engines-crux gtk-engines-metal libgtk1.2-common ntfsprogs imlib-base \
gtk2-engines-industrial conky gnome-commander gdk-imlib11 myspell-es \
gtk-engines-pixmap openoffice.org-style-tango gtk2-engines-highcontrast \
gtk2-engines-murrine gnome-icon-theme-nuovo ntfs-config gnome-icon-theme-blankon \
libqt3-mt libgtk2-ruby openvpn fuse-utils libruby1.8 gtk2-engines-spherecrystal \
gtk-clearlooks-gperfection2-theme gtk-engines-geramik gtk2-engines-wonderland \
gnome-compiz-manager bluez-btsco gtk-engines-qtpixmap libntfs-3g0 ntfs-3g \
network-manager-openvpn gnome-extra-icons openoffice.org-l10n-es \
gtk2-engines-lighthouseblue gtk-engines-thingeramik-data

Configuring Keymaping in .xmodmap:

To enable Multimedia control (usable with Rhythmbox,totem, and maybe more), add the following lines to your ~/.xmodmap or /etc/X11/Xmodmap (thanks to http://thinkwiki.org/wiki/Installing_Ubuntu_6.10_%28Edgy_Eft%29_on_a_ThinkPad_T60 )

keycode 234 = XF86Back
keycode 233 = XF86Forward
keycode 159 = XF86Start
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 153 = XF86AudioNext
keycode 144 = XF86AudioPrev
keycode 227 = XF86LaunchF
keycode 249 = XF86ZoomIn


Graphics:

The graphics card of course works out of the box. However one T60-specific problem worth mentioning is that video output switching does not seem to work on these laptops. This is needed, for example, when you are giving a presentation and wish to switch to the VGA port for a projector. The work-around is to connect the projector at boot time.

Installing OpenSource Intel Video Drivers:

remove i810 and install intel

1. Update package database:
$ sudo apt-get update

2. Switch to virtual console 1 with Ctrl+Alt+F1

3. Stop Gnome Display Manager:
$ sudo /etc/init.d/gdm stop

4. Remove and purge i810 video driver:
$ sudo apt-get remove --purge xserver-xorg-video-i810

5. Install latest intel video driver:
$ sudo apt-get install xserver-xorg-video-intel

6. Configure intel video driver:
$ sudo dpkg-reconfigure xserver-xorg
[during driver setup process, select "intel" driver and include 1280x800 resolution]

7. Restart Gnome Display Manager:
$ /etc/init.d/gdm start


I was interested in trying out the fancy desktop effects via compiz and beryl, and I found that the following modifications (taken from this forum post) to the /etc/X11/xorg.conf file are useful:

1. In Section "Module", add:

Load "dbe" #this enables double buffering extensions

2. In Section "Device" add:

Option "XAANoOffscreenPixmaps"

3. At the end of the file, add the following section:

Section "Extensions"
Option "Composite" "Enable"
EndSection

Restart the X server (or just log out of Gnome and log back in) for this to take affect. Now enable Compiz or Beryl and try them out.

Created 3 xorg.conf files: single, double, experimental
added alias to .bashrc for ll, lla, l, dir, vdir, xsingle, xdouble, xperimental
enabled colored prompt in .bashrc

Installing automatix???
There are some problems with automatix and the LUD packages, also some of the packages doesn't install properly. So I'm avoiding that soft for the moment and wait to see if it's really needed.

Fixing problems so far:
gdm\0.log:
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
The XKEYBOARD keymap compiler (xkbcomp) reports:
/&gt; Warning: Type "ONE_LEVEL" has 1 levels, but has 2 symbols
/&gt; Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server

Could not init font path element /usr/X11R6/lib/X11/fonts/misc, removing from list!
Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1, removing from list!


Install Xorg-Edit:

xorg-edit is a graphical interface for editing xorg configuration files the easy way. Most features and options understood by the Xserver can be modified or created.
http://sourceforge.net/project/downloading.php?group_id=169700&use_mirror=ufpr&filename=xorg-edit_07.06.15-0ubuntu1_i386.deb&42219252


Customizing your Firefox install

* If middle-click on tab to close it does not work, you can enable it by pointing Firefox to "about:config" and set middlemouse.contentLoadURL to false. Voila, middle-click to close works again.
* To enable the autoscroll (where you middle-click and a little arrow-graphic appears and you can scroll just by moving the mouse), go to "about:config" and set general.autoScroll to true.
* To automatically select the entire contents of the URL bar when you click there, open "about:config" and set browser.urlbar.clickSelectsAll to true. I find this a helpful usability improvement.

Installing Internet Explorer on Ubuntu:

Before you can use the IEs4Linux installation script, there are two packages you need first, and they're in the Universe repositories

Wine:

Adding the official WinHQ Packages:
First, open a terminal window. Then add the repository's key to your system's list of trusted APT keys by copy and pasting the following:

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

Next, add the repository to your system's list of APT sources:

For Ubuntu Feisty (7.04):
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list

So, to get the required packages:
sudo apt-get update
sudo apt-get install wine cabextract msttcorefonts

Get and use the IEs4Linux Script:

1. Go to the IEs4Linux website: http://www.tatanka.com.br/ies4linux/index-en.html
If you're in Firefox, you can just type ies4linux in the address bar, and you'll automatically be taken there. Do not type ies4linux.com—that would take you to an ad site instead of the IEs4Linux homepage.
2. Find the Download link on the website and click the link.
3. Save it to your desktop or to your home folder.

OR the console WAY:

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux


NOTE: For some reason, wget timedout on me when downloading from microsoft. So I added the IBM proxy to the equation by doing:
export http_proxy=http://proxy1.argentina.ibm.com:8080

IT WORKED! After prompting you with some questions it will download IE6 from microsoft. There is also a Beta version of IES4Linux that will download and configure IE7. That's outside of this instructions but you can do it if you want.



Windows NTFS Partitions Read/write support made easy in Ubuntu Feisty:

sudo apt-get install ntfs-config

This will install all the required packages for ntfs-config including ntfs-3g

Using Ntfs-Config:
*If you want to open this application go to Applications—&gt;System Tools—&gt;NTFS Configuration Tool
*Now it will prompt for root password enter root password and click ok
*It will show the available NTFS partition as follows in this example /dev/sda1 in NTFS partition
You need to select the partitions you want to configure,add the name of the mount point and click on apply.
*Tick the check box next to /dev/sda1 and click under mount enter the name you want to use.
I have entered "windows", so now the mount point shows as /media/windows. Click on apply.
*Select the NTFS Write support which is suitable for you i.e internal or external
Tick the check box next to Enable write support for internal device. I am using dualboot with windows.
*If you are using external hard drive select external option and click on ok

Once it finished you should see the mount point on your desktop.

Speed Up Firefox web browser:

In your location bar, type about:config

In the filter bar type network.http.pipelining
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

In the filter bar again and type network.http.pipelining.maxrequests
Default it says 4 under value field and you need to change it to 8

Go to the filter bar again and type network.http.proxy.pipelining
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Go to the filter bar again and type network.dns.disableIPv6
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Go to the filter bar again and type plugin.expose_full_path
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Now you need to Create new Preference name with interger value for this got to Right click -&gt; New -&gt; Integer
Here you need to type nglayout.initialpaint.delay and click ok
Now you need to enter 0 in value filed and click ok

Now you need to Create one more Preference name with interger value for this got to Right click -&gt; New -&gt; Integer
Here you need to type content.notify.backoffcount and click ok
Now you need to enter 5 in value filed and click ok

Now you need to Create one more Preference name with interger value for this got to Right click -&gt; New -&gt; Integer
Here you need to type ui.submenuDelay and click ok
Now you need to enter 0 in value filed and click ok

Some more Tweaks

Enable the spellchecker for inputfields and textareas (default is textareas only)
layout.spellcheckDefault=2


Install artwiz fonts:

The artwiz fonts are a set of small futuristic fonts for x11, created by Artwiz,TigerT,and Daniel Erat.These fonts are most popular with openbox/fluxbox users.

sudo mkdir /usr/lib/X11/fonts

sudo aptitude install xfonts-artwiz

sudo mkdir /usr/lib/X11/fonts/misc

*Enable bitmapped fonts using the following command
sudo dpkg-reconfigure fontconfig-config

Now it will prompt for some questions first one is font tuning method for screen i have selected native and press enter
Enable Subpixel rendering for scree select automatic and press enter
It will ask whether you want to enable bitmapped fonts by default select “yes” and press enter.

Restart your x by pressing Ctrl+Alt+Backspace.


Remove stuff from /etc/network/interfaces:

Comment the all network interfaces except lo and eth0

this will speed up boot times considerably

Canonical Ubuntu Commercial Repository:

# Canonical Commercial Repository (Opera,Real Player10.. etc)
deb http://archive.canonical.com/ubuntu feisty-commercial main


Recommended Software:

gnome-launch-box - application launcher.)
Currently supported modules are:

* Application starting and launch
* Evolution contacts lookup and mail to
* Recent files lookup and open
* Files in your desktop and open
* Firefox bookmarks lookup and opening

j2re1.4-mozilla-plugin java-common libqt4-core bookmarkbridge mozilla-livehttpheaders j2re1.4 libqt4-gui firefox-themes-ubuntu gnome-launch-box firefox-greasemonkey flashplugin-nonfree firefox-launchpad-plugin firefox-webdeveloper gsfonts-x11

Gip - IP calculator for GNOME desktop environment
Gip is an IP address calculator that integrates well with the GNOME desktop environment.Gip provides system administrators with tools for IP address based calculations. For example, an administrator who needs to find out which IP prefix length equals the IP netmask 255.255.240.0, just types in the mask and gets the prefix length presented. But many more advanced calculations can be made. Gip can convert an address range into a list of prefix lengths. It can also split subnets using a given IP netmask or IP prefix length. Many more calculations are possible.

Schedule Tasks Using Gnome-schedule (A cron & at GUI) in Ubuntu
Gnome-schedule is a grapichal user interface to ‘crontab’ and ‘at’, both used to schedule tasks. It supports periodical tasks and tasks that happens once in the future. It is written in python using pygtk


INSTALLLING IBM SOFTWARE:

Added the repos for LUD STORM and Notes 8
installed notes-hannover and the productivity suit.

I did some more modifications and patches but nothing I can remember and as I said all my notes were stolen with the notebook. Anyway I think this should get you started.

Please drop a comment if it helped you or you know something else that could help me or the next folk that reads this :)

Thank you for reading.

Read more >>

AT&T Global Network Client for Ubuntu (AGNC)

I use AT&T Global Network Client to connect to my office, also called MTS by big blue (IBM). On the AT&T website you can download the latest version, only that it is a rpm package. So I converted the rpm to deb to be able to install it on my distro with the default deb package manager.

  1. Download the installer: agnclient_1.0~2.0.0.3000-1.1_i386.deb
  2. You may need to install tcl as a dependency. In a aconsole type:
    # sudo apt-get install tcl8.4
  3. Proceed with the installation by double-clicking the downloaded file. deb package manager should pop-up and do the rest.
If you want to do it yourself there is a script that can convert the last rpm to deb for you: AT&T Client Debianizer

Read more >>

Tip: Tweaking Ubuntu the easy way

Ubuntu Tweak is an application designed to config Ubuntu easier for everyone.

It provided many usefull desktop and system options that the default desktop environment isn’t provided.

At present, It is only designed for Ubuntu GNOME Desktop, and often follows the newest Ubuntu distribution.

The image “http://ubuntu-tweak.com/wp-content/uploads/2007/12/ubuntu-tweak-024-2.png” cannot be displayed, because it contains errors.

Features of Ubuntu Tweak:

  • View of Basic System Information(Distribution, Kernel, CPU, Memory, etc.)
  • GNOME Session Control
  • Auto Start Program Control
  • Show/Hide and Change Splash screen
  • Show/Hide desktop icons or Mounted Volumes
  • Show/Hide/Rename Computer, Home, Trash icon or Network icon
  • Tweak Metacity Window Manager’s Style and Behavior
  • Compiz Fusion settings, Screen Edge Settings, Window Effects Settings, Menu Effect Settins
  • GNOME Panel Settings
  • Nautilus Settings
  • Advanced Power Management Settings
  • System Security Settings

How to add the source of Ubuntu Tweak

No matter which Ubuntu do you use, open your terminal, type the command to run gedit(or other editor in your opinion) to modify the sources.list:

sudo gedit /etc/apt/sources.list

And put the two line into it:

deb http://ppa.launchpad.net/tualatrix/ubuntu gutsy main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu gutsy main

Then update the source and install or upgrade Ubuntu Tweak:

sudo apt-get update
sudo apt-get install ubuntu-tweak

if you have installed, just type:

sudo apt-get dist-upgrade

Read more >>

HOWTO: Ubuntu Eye-Candy with Murrine engine

Murrine is an Italian word meaning the glass artworks done by Venicians glass blowers. Murrine Engine is a Gtk2 engine that will make your desktop look like a beautiful Murrina (which is the italian singular of Murrine).

Features:

  • Modern, Clean, Shiny desktop experience.
  • Antialiased widgets using Cairo libraries.
  • Highly customizable trough an optional GUI, the Murrine Configurator.
  • Good rendering speed.
  • Animated progressbar, radiobuttons and checkbuttons.
It is simple to install in Ubuntu:

1. Install theme engine (universe repo must be enabled)

# sudo apt-get install gtk2-engines-murrine

2. Download gtk themes (extract in .themes) here

All set!

http://img216.imageshack.us/img216/4841/fedorametacityuh6.png
Read more >>

HOWTO: functional eye-candy with Avant-Window-Navigator

http://images.apple.com/support/mac101/customize/images/customize05-5.jpg

DISCLAIMER: I do my best to keep the packages in this repo high-quality. However, 3rd party repositories such as this one are completely unsupported by Ubuntu. Any problems caused by this repo should be reported to me in this thread, not to Ubuntu.

Before we begin, make sure you have all the needed ubuntu repositories installed, namely universe and ubuntu-updates. This can be done in System -> Administration -> Software Sources by enabling 'recommended updates' under the 'Updates' tab, and also enabling 'Community-maintained Open Source software' under the 'Ubuntu Software' tab.

Now open a terminal (Applications -> Accessories -> Terminal), we'll be pasting a lot of commands. Remember, paste only 1 line at a time unless otherwise directed.

First, add my AWN repo:
Code:
echo 'deb http://ppa.launchpad.net/reacocard-awn/ubuntu gutsy main'  |  sudo tee -a /etc/apt/sources.list
echo 'deb-src http://ppa.launchpad.net/reacocard-awn/ubuntu gutsy main' | sudo tee -a /etc/apt/sources.list
Now update your software lists. If you are asked any questions during this, respond with 'y'.
Code:
sudo apt-get update
Then install AWN:
Code:
sudo apt-get install avant-window-navigator-bzr awn-core-applets-bzr
That's it! You can now start AWN from Applications->Accessories->Avant Window Navigator.
If installation fails, go back to the beginning and make sure you followed all instructions correctly, and then check the FAQ section at the bottom of this guide.

Available packages:
avant-window-navigator-bzr - the latest development version of AWN.
awn-core-applets-bzr - extra applets for AWN (development version)
libawn-bzr - applet library for AWN
libawn-bzr-dev - headers for the AWN applet library. Install this only if you need to compile applets from source.
python-libawn-bzr - python bindings for libawn
All -bzr packages are updated perodically from AWN bzr.

NOTE: There is no stable AWN currently available in my repository. There will be a stable AWN package in Ubuntu Hardy's universe, or in the meantime, you can use the getdeb package. Note that I do not support either of these installation methods and can provide no help in using them.

- How to make it start automatically at login:
Assuming you are using Gnome, here is what you need to do:
1) Go to System>Preferences>Sessions
2) Click Add
3) Fill out forms (the "Command" form should have /usr/bin/avant-window-navigator)
4) Click OK
That's it!
Read more >>

Have you been blacklisted?

Trying to run compiz and getting the following output?
Code:
Blacklisted PCIID '8086:2972' found
This means your video card has been blacklisted due to driver issues. This applies to some Radeon Mobility cards, Radeon rv350 and rv450 cards, and the Intel 965 (X3000, X3100). You can dodge that blacklist (at your own peril) with the following:
Code:
mkdir -p ~/.config/compiz/ && echo SKIP_CHECKS=yes >> ~/.config/compiz/compiz-manager
If you do this please do not post about any issues you have with stability or video playback problems, that's why your card was blacklisted in the first place.

-How do I know if my card is blacklisted?
Go to http://wiki.compiz-fusion.org/Hardware/Blacklist to see if your card is blacklisted.


Read more >>