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...

How to remove red eye in PhotoShop

Create a new layer and paint color of iris, use guassian blur 1.0, blend layers saturation, duplicate this layer and use hue saturation

Refer: http://graphicssoft.about.com/library/nosearch/n-psredeye.htm

Difficulty: Easy
Time Required: 5 minutes
Here's How:

1. Open the image.
2. Go to Image > Duplicate and close the original.
3. In Photoshop 6 or earlier, go to View > New View. In Photoshop 7 go to Window > Documents > New Window. This will open a duplicate window of the same image.
4. Zoom one of the windows so that you can see the eyes as large as possible. Set the other window view to 100%.
5. Arrange the two windows so you can see both the zoomed view and the 100% view at the same time.
6. Create a new layer.
7. Use the eyedropper to pick up a color from the iris of the eye. It should be a fairly gray tint with a hint of the eye color.
8. Paint over the red part of the eye on the new layer, being careful not to paint over the eyelids.
9. Go to Filters > Blur > Gaussian and give it about a 1 pixel blur to soften the edges.
10. Set the layer blend mode to Saturation. This will take the red out without removing the highlights, but in many cases it leaves the eyes too gray and hollow looking.
11. If that's the case, duplicate the saturation layer and change the blend mode to Hue. That should put some color back in while still preserving the highlights.
12. If the color is too strong after adding a Hue layer, lower the opacity of the Hue layer.
13. When you're happy with the results you can merge the extra layers down.

Tips:

1. If you need to darken the pupil area, use the burn tool. It should only take a couple of taps with the burn tool to darken the pupils.
2. Before merging your layers, use the eraser tool to clean up any overspray from painting outsideof the iris.
3. Watch an animated demonstration of how to remove redeye in Photoshop.
4. This technique works in Photoshop 4 and up, including Photoshop LE and Photoshop Elements.