Using apt-get

Update your cache:
apt-get update

Get a list of all packages available, make sure to
apt-cache pkgnames > readme.txt

Install the following:
sudo apt-get install apt-show-versions

This allows you to show all versions installed:
apt-show-versions | sort > readme.txt

A couple of switches are available too:
-u (print only upgradeable packages)

There are more switches available, use apt-show-versions --help for more information.

Completely remove a package
apt-get --purge remove

Session Monitor timeoutd

Use this daemon to monitor logon usage and timeout the user.  For example:

# Format:  TIMES:TTYS:USERS:GROUPS:MAXIDLE:MAXSESS:MAXDAY:WARN
Al:*:joseph:*:*:30:*:5

30 minutes of session usage with 5 minutes of warning

This is started, you can monitor if it exists by

ps -A | grep -i timeoutd

The configuration file is:
/etc/timeouts

Ubuntu Installation

Seeing Network Drives / Get Samba Working

For the Desktop it looks like only the workgroup was added to get the network drive to work.

Step 1: SMBNetFS is a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows. (Refer: ubuntuforums) Run the following command:
sudo apt-get smbnetfs

Step 2: Change you work group:
sudo gedit /etc/samba/smb.conf

Scroll down until you find the Global Settings section and look for WORKGROUP, change it to your workgroup, save and reboot for changes to take effect.

Step 3: User the following command to add a user to samba:
sudo smbpassd -a username

Get a list of all shares for that host name, it means samba is working but nautilus is not interpreting the output as it should. HOSTNAME = host name or ip address.
smbclient --list=HOSTNAME

Playback Codecs and other goodies

Step 1: Install fonts and various codecs by add/remove programs, searching for "Ubuntu Restricted Extras"

DVD Playback
How to install DVD playback for Ubuntu 8.10

Step 1: Get libdvdread3 package
sudo apt-get install libdvdread3

Step 2: Run setup
sudo /usr/share/doc/libdvdread3/install-css.sh

Microsoft Fonts
Refer: Installing libdvdcss2Installing Microsoft Truetype fonts on Ubuntu

Step 1: You can install the MS core fonts by installing the msttcorefonts package. To do this, enable the "Universe" component of the repositories. This is done by default in Feisty. After you do that, use the following command from the command line:
sudo apt-get install msttcorefonts

This will give you the core fonts, but if there are other TrueType fonts that you want installed, it is as easy as copying the font files to the ~/.fonts/ directory.

Step 2: After installing new fonts, you will have to log out and log in again to be able to see and use the new fonts. If you want to avoid this, you can regenerate the fonts cache by issuing the following command:
sudo fc-cache -fv

Other Tweaks

  • Turn off thumbnail previews in Nautilus, it creates a .Thumbnails folder in your home directory that can get quite large over time; otherwise, you probably want to institute some type of regular cleanup for it.  It's currently in Edit, Preferences, Preview, Show Thumbnails (never)

Virtual PC and Windows 2003 Server activation

Refer: www.tipandtrick.net

To fix the Shared Network (NAT) Internet no connection or not working issue, the resolution is to manually assign the IP address for the DNS Server for the guest operating system to 192.168.131.254, the virtual gateway IP address used by Virtual PC. To make the change (in guest operating system), open Network Connections folder (in Windows Vista, access via Network and Sharing Center), and right click Local Area Connection network icon to select its Properties. Then double click on Internet Protocl (TCP/IP) under General tab or Internet Protocol Version 4 (TCP/IPv4) under Networking (for Windows Vista) tab.

Windows 2003 IP Settings for Virtual PC
Windows 2003 IP Settings for Virtual PC

Scanning for CR/LF, want valid bash script

Quick Conversion Command

find . -name "*" -type f -exec dos2unix {} \;

Sample Script

#!/bin/sh
# MAKE SURE TO ALWAYS SAVE THIS FILE AS UNIX FORMAT.</code>

# Date: Monday, November 17, 2008 8:30 AM
# Author: Maurice Ruckman
#
# Description: Scan scripts directory looking for CR/LF which indicates
# a script was not saved in UNIX format. This would cause the script
# to fail.

grep -l -r $'\r\n' /devl/scripts > scan_for_crlf.output.txt

if [ -s scan_for_crlf.output.txt ]; then
echo "FAILURE CR/LF DETECTED IN SCRIPTS FOLDER"
echo "Found CR/LF when scanning scripts folder" | mailx -s "FAILURE FAILURE FAILURE CR/LF DETECTED IN SCRIPTS FOLDER" mruckman@hollandamerica.com
else
echo "ALL OKAY"
echo "All scripts passed test scan." | mailx -s "Scripts Folder Passed Scan" mruckman@hollandamerica.com
fi
find "/home/jboss1/workspace/HAL" -type f -name "*.java" > list.txt

We can easily convert the code with dos2unix

and find the problem code with something like this:

grep -l -r $'\r\n' /home/jboss1/workspace/HAL

or just convert everything by scripting it, here's a start

find "/home/jboss1/workspace/HAL" -type f -name "*.java"

Attempt to speed up FTP in Ubuntu

Try installing FileZilla instead.

sudo gedit /etc/modprobe.d/aliases

Replace

alias net-pf-10 ipv6

with

alias net-pf-10 off

and reboot.  After that, 'ifconfig' should no longer show any scary looking hex-notated IP addresses.

Update: It did not help FTP speed.  Change rolled back...